Grafana MCP

Grafana MCP

от grafana
MCP сервер для интеграции с Grafana: управляйте дашбордами, выполняйте запросы к Prometheus, Loki, CloudWatch и другим источникам через MCP. Упрощает мониторинг, анализ метрик и логов — полезен для инженеров и DevOps.

Grafana MCP server

Unit Tests Integration Tests E2E Tests Go Reference MCP Catalog

A [Model Context Protocol][mcp] (MCP) server for Grafana.

This provides access to your Grafana instance and the surrounding ecosystem.

Quick Start

Requires uv. Add the following to your MCP client configuration (e.g. Claude Desktop, Cursor):

{
  "mcpServers": {
    "grafana": {
      "command": "uvx",
      "args": ["mcp-grafana"],
      "env": {
        "GRAFANA_URL": "http://localhost:3000",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN": "<your service account token>"
      }
    }
  }
}

For Grafana Cloud, replace GRAFANA_URL with your instance URL (e.g. https://myinstance.grafana.net). See Usage for more installation options including Docker, binary, and Helm.

Requirements

  • Grafana version 9.0 or later is required for full functionality. Some features, particularly datasource-related operations, may not work correctly with earlier versions due to missing API endpoints.

Features

The following features are currently available in MCP server. This list is for informational purposes only and does not represent a roadmap or commitment to future features.

Инструменты были проиндексированы:
add_activity_to_incident

Добавляет заметку (действие userNote) на временную шкалу существующего инцидента по его ID. Тело заметки может содержать URL-адреса, которые будут прикреплены в качестве контекста. Используйте это, чтобы добавить контекст к инциденту.

Параметры
  • bodystringобязательный

    The body of the activity. URLs will be parsed and attached as context

  • eventTimestring

    The time that the activity occurred. If not provided, the current time will be used

  • incidentIdstringобязательный

    The ID of the incident to add the activity to

alerting_manage_routingтолько чтениеидемпотентный

Управляет конфигурацией маршрутизации оповещений Grafana, включая notification policies, contact points и time intervals. Notification policies определяют, как группируются и маршрутизируются оповещения, а также какие contact points их получают. Time intervals определяют активные периоды и периоды отключения для уведомлений об оповещениях. Когда использовать: - Чтобы понять, как оповещения маршрутизируются к contact points/получателям - Чтобы отладить, почему оповещение ушло конкретному получателю - Чтобы проверить настройки группировки, тайминга или интервалов отключения Когда НЕ использовать: - Чтобы проверить конфигурацию или состояние правил оповещений (используйте alerting_manage_rules)

Параметры
  • contact_point_titlestring

    Title of the contact point to retrieve (required for get_contact_point operation)

  • datasource_uidstring

    Optional: UID of an Alertmanager-compatible datasource to query for receivers. If omitted, returns Grafana-managed contact points. Only used with get_contact_points.

  • limitinteger

    The maximum number of results to return. Default is 100. Only used with get_contact_points.

  • namestring

    Filter contact points by name (exact match). Only used with get_contact_points.

  • operationenumобязательный

    The operation to perform: 'get_notification_policies' to retrieve the notification policy tree, 'get_contact_points' to list all contact points, 'get_contact_point' to get a specific contact point by name, 'get_time_intervals' to list all time intervals, 'get_time_interval' to get a specific time interval by name

  • time_interval_namestring

    Name of the time interval to retrieve (required for get_time_interval operation)

alerting_manage_rules

Управляет правилами оповещений Grafana с полной поддержкой CRUD и фильтрацией. Когда использовать: - Понимание, почему оповещение срабатывает или не срабатывает - Аудит конфигурации правил оповещений (запросы, условия, метки, настройки уведомлений) - Поиск правил оповещений по состоянию, папке, группе или имени - Создание, обновление или удаление правил оповещений - Сравнение версий правил, чтобы увидеть изменения Когда НЕ использовать: - Проверка того, как оповещения направляются получателям (используйте alerting_manage_routing)

Параметры
  • annotationsobject

    Optional annotations for the alert rule

  • conditionstring

    The query condition identifier, e.g. 'A', 'B' (required for 'create', 'update')

  • dataobject[]

    Array of alert query objects (required for 'create'/'update'). Each object has: datasourceUid (string, required), model (object with expr for data queries or type/expression/conditions for expressions), refId (string, auto-assigned if omitted), relativeTimeRange ({from, to} in seconds, defaults to {from:600,to:0}). For server-side expressions use datasourceUid 'expr'. Example: [{datasourceUid: 'prometheus', model: {expr: 'up == 0'}}, {datasourceUid: 'expr', model: {type: 'threshold', expression: 'A', conditions: [{evaluator: {type: 'gt', params: [0]}}]}}]

  • datasource_uidstring

    Optional: UID of a Prometheus or Loki datasource to query for datasource-managed alert rules (for 'list' operation)

  • disable_provenanceboolean

    If true, the alert remains editable in the Grafana UI (sets X-Disable-Provenance header). Defaults to true.

  • exec_err_statestring

    State on execution error: NoData, Alerting, OK (required for 'create', 'update')

  • folder_uidstring

    The folder UID. For 'list': filter by exact folder UID (mutually exclusive with search_folder). For 'create'/'update': the folder to store the rule in (required).

  • forstring

    Duration before alert fires, e.g. '5m' (required for 'create', 'update')

  • is_pausedboolean

    If true, the alert rule remains inactive, Default is false

  • keep_firing_forstring

    Enables continous firing of alert for specified time even when condition is no longer met. Default is 0 (resolves immediately)

  • labelsobject

    Optional labels for the alert rule

  • label_selectorsstring[]

    Prometheus-style selectors to filter alert rules by labels. Each string is a selector e.g. '{severity="critical", team=~"backend.*"}'. All selectors must match (AND).

  • limit_alertsinteger

    Limit alert instances per rule. For list: 0 omits alerts. For get: <=0 defaults to 200. Max 200.

  • matchersstring[]

    Label matchers to filter alert instances. Each string is a Prometheus-style matcher e.g. 'severity="critical"', 'env!="dev"', 'team=~"backend.*"'. Requires Grafana 12.4+.

  • missing_series_evals_to_resolveinteger

    Consecutive evaluation intervals with no data required to mark the alert as resolved. Default is 2.

  • no_data_statestring

    State when no data: NoData, Alerting, OK (required for 'create', 'update')

  • notification_settingsobject

    Notification settings object. Fields: receiver (string, required), groupBy ([]string), groupWait/groupInterval/repeatInterval (duration strings), muteTimeIntervals/activeTimeIntervals ([]string).

  • operationenumобязательный

    The operation to perform: 'list', 'get', 'versions', 'create', 'update', or 'delete'. To create a rule, use operation 'create' and provide all required fields in a single call. To update a rule, first use 'get' to retrieve its full configuration, then 'update' with all required fields plus your changes.

  • org_idinteger

    The organization ID (required for 'create', 'update')

  • recordobject

    Recording rule config. Fields: from (string, required - ref ID e.g. 'A'), metric (string, required - metric name), targetDatasourceUid (string, optional).

  • rule_groupstring

    The rule group name (required for 'create', 'update')

  • rule_limitinteger

    Maximum number of rules to return (default 200, max 200). Requires Grafana 12.4+ (for 'list' operation)

  • rule_typeenum

    Filter by rule type (for 'list' operation)

  • rule_uidstring

    The UID of the alert rule (required for 'get', 'versions', 'update', 'delete'; optional for 'create')

  • search_folderstring

    Search folders by path using partial matching (for 'list' operation). Requires Grafana 12.4+. Mutually exclusive with folder_uid.

  • search_rule_namestring

    Search alert rule names/titles using partial matching. Requires Grafana 12.4+ (for 'list' operation)

  • statesstring[]

    Filter by alert state: firing, pending, normal, recovering, nodata, error (for 'list' operation)

  • titlestring

    The title of the alert rule (required for 'create', 'update')

alerting_manage_silences

Управление тишинами оповещений Grafana. Тишина временно подавляет уведомления для оповещений, чьи метки соответствуют набору матчеров, не изменяя при этом сами правила оповещений. Операции: - 'list': список существующих тишин. Опционально можно фильтровать по rule_uid (соответствует alert_rule_uid) или по матчерам. - 'get': получить одну тишину по silence_id. - 'create': создать новую тишину. Требуются matchers, starts_at, ends_at (RFC3339) и comment. - 'update': изменить существующую тишину по silence_id. Требуются matchers, starts_at, ends_at и comment. Идентификатор сохраняется только если отправленные matchers и starts_at совпадают с текущими, поэтому передавайте starts_at, возвращённый из 'get'; иначе Alertmanager истечёт по сроку старую тишину и создаст новую с новым идентификатором. - 'delete': истечь/удалить тишину по silence_id. Когда использовать: - Заглушение шумных или ожидаемых оповещений во время окон технического обслуживания - Просмотр и очистка существующих тишин Когда не использовать: - Изменение конфигурации или состояния правил оповещений (используйте alerting_manage_rules) - Изменение маршрутизации оповещений к получателям (используйте alerting_manage_routing)

Параметры
  • commentstring

    A human-readable comment explaining the silence (required for 'create' and 'update')

  • created_bystring

    Author of the silence. Defaults to 'grafana-assistant'.

  • ends_atstring

    Silence end time in RFC3339 format, e.g. '2026-07-11T12:00:00Z' (required for 'create' and 'update')

  • matchersobject[]

    Label matchers. Required (at least one) for 'create' and 'update'. For 'list', used as an optional filter.

  • operationenumобязательный

    The operation to perform: 'list' to list silences, 'get' to retrieve a silence by id, 'create' to create a new silence, 'update' to modify an existing silence by id, 'delete' to expire a silence by id

  • rule_uidstring

    Optional: filter listed silences to those scoped to this alert rule UID (matches the alert_rule_uid label). Only used with 'list'.

  • silence_idstring

    The silence id (required for 'get', 'update' and 'delete')

  • starts_atstring

    Silence start time in RFC3339 format, e.g. '2026-07-11T10:00:00Z' (required for 'create' and 'update'). Grafana clamps a start time in the past to the moment of creation, so for 'update' pass back the starts_at returned by 'get' to keep the silence id stable.

analyze_loki_labelsтолько чтениеидемпотентный

Аудирует стратегию меток Loki и опционально диагностирует производительность запросов. Возвращает вердикты по каждой метке, отсутствующие базовые метки, проблемы нормализации и рекомендуемый набор. Передайте datasourceUid для оценки мощности в реальном времени или метки для статической оценки; можно комбинировать.

Параметры
  • datasourceUidstring

    Datasource UID (live mode).

  • endRfc3339string
  • expectedBaseLabelsstring[]
  • labelsobject[]

    Caller-supplied labels (static mode).

  • maxLabelsinteger
  • perfMetricsobject

    Runtime metrics; presence triggers perf diagnosis.

  • selectorstring

    Optional LogQL selector for stats / perf diagnosis.

  • startRfc3339string
check_datasources_healthтолько чтениеидемпотентный

Проверяет работоспособность источника данных. Фильтрует по типу или UID; если оба не указаны, проверяет все.

Параметры
  • offsetinteger

    Number to skip for pagination

  • typestring

    Plugin type filter; omit to check all

  • uidsstring[]

    UIDs to check

create_annotation

Создает новую аннотацию на дашборде или панели. Устанавливает формат 'graphite' и предоставляет 'what' для аннотаций в формате Graphite.

Параметры
  • dashboardUidstring

    Dashboard UID

  • dataobject

    Optional JSON payload

  • formatenum

    Set to 'graphite' to create a Graphite-format annotation

  • graphiteDatastring

    Optional string payload for Graphite format

  • panelIdinteger

    Panel ID

  • tagsstring[]

    Optional list of tags

  • textstring

    Annotation text (required unless format is graphite)

  • timeinteger

    Start time epoch ms

  • timeEndinteger

    End time epoch ms

  • whatstring

    Annotation text for Graphite format (required when format is graphite)

  • wheninteger

    Epoch ms timestamp for Graphite format

create_datasource

Создаёт источник данных. Если тип неоднозначен, сначала вызовите search_plugin_information; установите плагин при необходимости. ВАЖНО: всегда вызывайте этот инструмент дважды. Первый вызов: укажите только тип — инструмент возвращает схему полей. После получения схемы вы ОБЯЗАНЫ явно спросить у пользователя каждое обязательное значение поля; не делайте предположений и не используйте значения по умолчанию без подтверждения пользователя. Второй вызов: укажите тип, отображаемое имя в аргументе name верхнего уровня, schemaReviewed=true и карту полей, заполненную значениями, подтверждёнными пользователем. Никогда не обрабатывайте учётные данные — напомните пользователю сменить любые обнаруженные. Возвращает UID, проверку работоспособности и ссылку на страницу конфигурации.

Параметры
  • accessstring

    How Grafana should access the datasource (proxy or direct)

  • basicAuthboolean

    Whether Grafana should use basic auth

  • databasestring

    Optional database name

  • fieldsobject

    Datasource field values to provision, keyed by field key from the schema returned on the first call. The server uses each field's target (root or jsonData) to place values correctly in the YAML. Example: {"url": "http://prometheus:9090", "httpMethod": "POST"}.

  • isDefaultboolean

    Whether this should become the default datasource

  • namestringобязательный

    Datasource display name

  • schemaReviewedboolean

    Set to true on the second call to confirm you reviewed the schema and collected values from the user.

  • typestringобязательный

    Grafana datasource plugin type, for example prometheus

  • urlstring

    Datasource base URL when required by the plugin

  • withCredentialsboolean

    Whether Grafana should forward credentials such as cookies

create_folder

Создаёт папку Grafana. Предоставляет заголовок и необязательный UID. Возвращает созданную папку.

Параметры
  • parentUidstring

    Optional parent folder UID. If set, the folder will be created under this parent.

  • titlestringобязательный

    The title of the folder.

  • uidstring

    Optional folder UID. If omitted, Grafana will generate one.

create_incident

Создаёт новый инцидент Grafana. Требует указания названия, уровня серьёзности и префикса комнаты. Позволяет задать статус, метки и пользовательские поля. Этот инструмент следует использовать обдуманно и только после подтверждения пользователя, так как он может оповестить или встревожить большое количество людей.

Параметры
  • attachCaptionstring

    The caption of the attachment

  • attachUrlstring

    The URL of the attachment

  • customFieldsobject[]

    Custom field values to set on the new incident. Use list_incident_custom_fields to discover the available fields and their valid values

  • isDrillboolean

    Whether the incident is a drill incident

  • labelsobject[]

    The labels to add to the incident

  • roomPrefixstringобязательный

    The prefix of the room to create the incident in

  • severitystringобязательный

    The severity of the incident

  • statusstring

    The status of the incident

  • titlestringобязательный

    The title of the incident

create_snapshot

Создаёт снимок Grafana из полной полезной нагрузки панели управления. Поддерживает опциональные поля срока действия и внешнего снимка.

Параметры
  • dashboardobjectобязательный

    Complete dashboard model to snapshot (as returned by Grafana dashboard APIs)

  • deleteKeystring

    Secret key for deleting external snapshots. Required when external is true

  • expiresinteger

    Snapshot expiration in seconds (e.g. 3600 for 1 hour)

  • externalboolean

    Store snapshot on external server. Requires key and deleteKey when true

  • keystring

    Custom snapshot key. Required when external is true

  • namestring

    Optional snapshot name

delete_annotation

Permanently delete an annotation by ID. The annotation cannot be recovered afterwards.

Параметры
  • idintegerобязательный

    Annotation ID to delete

delete_snapshot

Удаляет снимок Grafana по ключу снимка.

Параметры
  • keystringобязательный

    Snapshot key to delete

find_error_pattern_logs

Ищет в журналах Loki аномальные шаблоны ошибок по сравнению со средним значением за последний день, ожидает завершения анализа и возвращает результаты, включая найденные шаблоны.

Параметры
  • endstring

    End time for the investigation. Defaults to now if not specified.

  • labelsobjectобязательный

    Labels to scope the analysis

  • namestringобязательный

    The name of the investigation

  • startstring

    Start time for the investigation. Defaults to 30 minutes ago if not specified.

find_slow_requests

Ищет медленные запросы в соответствующих источниках данных Tempo, ожидает завершения анализа и возвращает результаты.

Параметры
  • endstring

    End time for the investigation. Defaults to now if not specified.

  • labelsobjectобязательный

    Labels to scope the analysis

  • namestringобязательный

    The name of the investigation

  • startstring

    Start time for the investigation. Defaults to 30 minutes ago if not specified.

generate_deeplink

Генерирует deeplink URL-адреса для ресурсов Grafana. Поддерживает дашборды (требуется dashboardUid или provisioningPreview), панели (требуется dashboardUid или provisioningPreview, плюс panelId) и запросы Explore (требуется datasourceUid и опционально queries). Для ссылок на дашборды и панели provisioningPreview указывает на дашборд, размещённый на ветке репозитория provisioning (например, предпросмотр PR git-sync). Для ссылок на explore временной диапазон и запросы встраиваются в состояние explore Grafana. Установите shorten=true, чтобы также попробовать короткую ссылку /goto/<uid>; если сокращение не удаётся, возвращается полный deeplink.

Параметры
  • dashboardUidstring

    Dashboard UID (for stored dashboards). Mutually exclusive with provisioningPreview for dashboard and panel types.

  • datasourceUidstring

    Datasource UID (required for explore type)

  • panelIdinteger

    Panel ID (required for panel type)

  • provisioningPreviewobject

    Identifies a dashboard staged on a provisioning repository branch (e.g. a git-sync PR preview). Mutually exclusive with dashboardUid for dashboard and panel types.

  • queriesobject[]

    List of query objects for explore links (e.g. [{"refId":"A","expr":"up"}])

  • queryParamsobject

    Additional URL query parameters (for dashboard/panel types)

  • resourceTypestringобязательный

    Type of resource: dashboard, panel, or explore

  • shortenboolean

    If true, try to shorten the generated URL to /goto/<uid>. If shortening fails, return the original deeplink.

  • timeRangeobject

    Time range for the link

get_alert_groupтолько чтениеидемпотентный

Получает конкретную группу оповещений из Grafana OnCall по её ID. Возвращает полные сведения о группе оповещений, включая последнее оповещение и его исходную полезную нагрузку, если API OnCall предоставляет эти данные. Полезные нагрузки оповещений содержат fingerprint'ы, специфичные для интеграции (например, payload.data.event.hashes у Sentry или payload.alerts[].fingerprint у Alertmanager), которые идентифицируют повторяющиеся оповещения в разных группах оповещений.

Параметры
  • alertGroupIdstringобязательный

    The ID of the alert group to retrieve

get_annotationsтолько чтениеидемпотентный

Получает аннотации Grafana по фильтрам, таким как UID панели, временной диапазон и теги.

Параметры
  • alertUidstring

    Filter by alert UID

  • dashboardUidstring

    Filter by dashboard UID

  • frominteger

    Epoch ms start time

  • limitinteger

    Max results default 100

  • matchAnyboolean

    If true, match any tag (OR). If false, match all tags (AND). Default: false

  • panelIdinteger

    Filter by panel ID

  • tagsstring[]

    Filter by tags. Multiple tags allowed; use matchAny to control AND/OR logic

  • tointeger

    Epoch ms end time

  • typestring

    annotation or alert

  • userIdinteger

    Filter by creator user ID

get_annotation_tagsтолько чтениеидемпотентный

Возвращает теги аннотаций с опциональной фильтрацией по имени тега. Применяются только предоставленные фильтры.

Параметры
  • limitstring

    Max results, default 100

  • tagstring

    Optional filter by tag name

get_assertionsтолько чтениеидемпотентный

Получает сводку утверждений для заданной сущности с её типом, именем, окружением, сайтом, пространством имён и временным диапазоном.

Параметры
  • endTimestringобязательный

    The end time in RFC3339 format (e.g. 2024-01-01T00:00:00Z) or relative format (e.g. now)

  • entityNamestring

    The name of the entity to list

  • entityTypestring

    The type of the entity to list (e.g. Service, Node, Pod, etc.)

  • envstring

    The env of the entity to list

  • namespacestring

    The namespace of the entity to list

  • sitestring

    The site of the entity to list

  • startTimestringобязательный

    The start time in RFC3339 format (e.g. 2024-01-01T00:00:00Z) or relative format (e.g. now-1h)

get_current_oncall_usersтолько чтениеидемпотентный

Получает список пользователей, находящихся на дежурстве в данный момент для конкретного идентификатора расписания Grafana OnCall. Возвращает идентификатор расписания, название и список подробных объектов пользователей для тех, кто сейчас на дежурстве.

Параметры
  • scheduleIdstringобязательный

    The ID of the schedule to get current on-call users for

get_dashboard_by_uidтолько чтениеидемпотентный

Получает полную панель мониторинга (dashboard), включая панели, переменные и настройки, для конкретной панели мониторинга, идентифицированной по её UID. Ответ содержит 'apiVersion' и 'isV2': если 'isV2' равен true, панель мониторинга использует схему v2 (панели находятся в 'elements', ключом служит имя, расположение задаётся через 'layout'; переменные — в 'variables'), иначе это классическая v1 ('panels[]' с 'templating.list'). ПРЕДУПРЕЖДЕНИЕ: Большие панели мониторинга могут занимать значительное место в контекстном окне. Рассмотрите возможность использования get_dashboard_summary для общего обзора или get_dashboard_property для получения конкретных данных вместо этого.

Параметры
  • uidstringобязательный

    The UID of the dashboard

get_dashboard_panel_queriesтолько чтениеидемпотентный

Извлекает запросы панелей из дашборда Grafana. Поддерживает все типы источников данных (Prometheus, Loki, CloudWatch, SQL и т.д.) и панели, вложенные в строки. Опционально фильтрует по конкретной панели по ID с помощью panelId. Опционально передаёт variables для подстановки шаблонных переменных, что заполняет поля processedQuery и requiredVariables. Возвращает массив объектов с полями: title, query (сырое выражение), datasource (объект с uid и type), а также опционально processedQuery, refId, requiredVariables и target. Цели, созданные в визуальном редакторе (поиск метрик CloudWatch, конструктор запросов InfluxDB), не имеют строкового выражения: они возвращают пустой query плюс target - необработанный JSON запроса панели. Запускайте их с помощью run_panel_query, а не инструмента запросов.

Параметры
  • panelIdinteger

    Optional panel ID to filter to a specific panel

  • uidstringобязательный

    The UID of the dashboard

  • variablesobject

    Optional variable substitutions (e.g., {"job": "api-server"})

get_dashboard_propertyтолько чтениеидемпотентный

Получает определённые части дашборда с помощью выражений JSONPath, чтобы минимизировать использование контекстного окна. JSONPath обращается к нативной схеме дашборда. Классические пути v1: '$.title' (заголовок), '$.panels[].title' (заголовки всех панелей), '$.panels[0]' (первая панель), '$.templating.list' (переменные), '$.annotations.list' (сохранённые запросы/определения аннотаций дашборда), '$.tags' (теги), '$.panels[].targets[*].expr' (все запросы). Дашборды v2 (см. isV2 из get_dashboard_by_uid) используют другие пути: '$.title', '$.elements' (панели, сгруппированные по имени), '$.variables' (переменные), '$.annotations'. Используйте этот инструмент вместо get_dashboard_by_uid, когда нужны только определённые свойства дашборда.

Параметры
  • jsonPathstringобязательный

    JSONPath expression to extract specific data (e.g., '$.panels[0].title' for first panel title, '$.panels[*].title' for all panel titles, '$.templating.list' for variables, '$.annotations.list' for saved dashboard annotation queries/definitions)

  • uidstringобязательный

    The UID of the dashboard

get_dashboard_summaryтолько чтениеидемпотентный

Получает компактную сводку по дашборду, включая заголовок, количество панелей, типы панелей, переменные и другие метаданные, без полного JSON. Используйте для обзора дашборда и планирования изменений, не расходуя большие контекстные окна.

Параметры
  • uidstringобязательный

    The UID of the dashboard

get_datasourceтолько чтениеидемпотентный

Извлекает подробную информацию о конкретном источнике данных по UID или имени. Возвращает полную модель источника данных, включая имя, тип, URL, настройки доступа, JSON-данные и статус защищённого JSON-поля. Укажите uid или имя; uid имеет приоритет, если указаны оба.

Параметры
  • namestring

    The name of the datasource. Used if UID is not provided.

  • uidstring

    The UID of the datasource. If provided, takes priority over name.

get_docтолько чтениеидемпотентныйвнешний мир

Получите страницу документации Grafana. Сначала установите outline_only=true, чтобы получить структуру заголовков, затем вызовите снова с названием раздела для ограниченного получения.

Параметры
  • limitinteger

    Max lines to return (default ~80)

  • offsetinteger

    Line offset for paging (0-indexed)

  • outline_onlyboolean

    Return only the heading outline (use to discover section names before fetching content)

  • sectionstring

    Heading text to extract (returns only that section)

  • urlstringобязательный

    The grafana.com/docs/ URL to fetch

get_incidentтолько чтениеидемпотентный
Параметры
  • idstringобязательный

    The ID of the incident to retrieve

get_oncall_shiftтолько чтениеидемпотентный

Получает подробную информацию о конкретной смене Grafana OnCall по её ID. Смена означает заданный период времени в расписании, когда пользователи активно дежурят. Возвращает полные детали смены.

Параметры
  • shiftIdstringобязательный

    The ID of the shift to get details for

get_panel_imageтолько чтениеидемпотентный

Рендерит панель дашборда Grafana или целый дашборд в PNG-изображение. Возвращает изображение в виде данных в кодировке base64. Требует установки сервиса Grafana Image Renderer. Нужно указать либо dashboardUid (для сохранённых дашбордов), либо provisioningPreview (для дашбордов, выложенных на ветку репозитория подготовки, например, в PR git-sync). Используйте для создания визуальных снимков дашбордов для отчётов, оповещений или презентаций.

Параметры
  • dashboardUidstring

    The UID of a stored dashboard containing the panel. Required unless provisioningPreview is provided.

  • heightinteger

    Height of the rendered image in pixels. Defaults to 500

  • panelIdinteger

    The ID of the panel to render. If omitted, the entire dashboard is rendered

  • provisioningPreviewobject

    Render a dashboard from a provisioning repository branch (e.g. a git-sync PR preview). Mutually exclusive with dashboardUid.

  • scaleinteger

    Scale factor for the image (1-3). Defaults to 1

  • themestring

    Theme for the rendered image: light or dark. Defaults to dark

  • timeoutinteger

    Rendering timeout in seconds. Defaults to 60

  • timeRangeobject

    Time range for the rendered image

  • variablesobject

    Dashboard variables to apply. Values can be a single string or an array of strings for multi-value variables (e.g., {"var-datasource": "prometheus", "var-instance": ["server1", "server2"]})

  • widthinteger

    Width of the rendered image in pixels. Defaults to 1000

get_pluginтолько чтениеидемпотентный

Проверяет, установлен ли плагин Grafana, и получает его сведения (имя, версию, тип, статус включения). Возвращает installed=false, если плагин не найден. Используйте install_plugin, если плагин не установлен, чтобы установить его после подтверждения этого действия с пользователем.

Параметры
  • pluginIdstringобязательный

    The plugin ID to check (e.g. 'prometheus', 'grafana-piechart-panel', 'grafana-oncall-app')

get_sift_analysisтолько чтениеидемпотентный

Извлекает конкретный анализ из расследования по его UUID. Идентификатор расследования и идентификатор анализа должны предоставляться в виде строк в формате UUID.

Параметры
  • analysisIdstringобязательный

    The UUID of the specific analysis to retrieve

  • investigationIdstringобязательный

    The UUID of the investigation as a string (e.g. '02adab7c-bf5b-45f2-9459-d71a2c29e11b')

get_sift_investigationтолько чтениеидемпотентный

Получает существующее расследование Sift по его UUID. ID нужно передать в виде строки в формате UUID (например, '02adab7c-bf5b-45f2-9459-d71a2c29e11b').

Параметры
  • idstringобязательный

    The UUID of the investigation as a string (e.g. '02adab7c-bf5b-45f2-9459-d71a2c29e11b')

get_snapshotтолько чтениеидемпотентный

Получить Grafana snapshot по ключу, включая метаданные snapshot и полезную нагрузку дашборда.

Параметры
  • keystringобязательный

    Snapshot key to retrieve

grafana_api_request

Выполняет аутентифицированный HTTP-запрос к Grafana API. Аналогично 'gh api' для GitHub. Поддерживает любой эндпоинт Grafana API с опциональной фильтрацией ответа в стиле jq. Используется для эндпоинтов API, для которых нет специального инструмента.

Параметры
  • bodystring

    Request body (JSON string). Used with POST, PUT, and PATCH requests.

  • endpointstringобязательный

    The API path relative to the Grafana base URL (e.g. '/api/org', '/api/dashboards/uid/abc123'). Must start with '/'.

  • headersobject

    Additional HTTP headers to include in the request.

  • jqstring

    A jq expression to filter or transform the JSON response (e.g. '.dashboards[] | .title').

  • methodenum

    HTTP method. Defaults to GET

install_pluginвнешний мир

Устанавливает плагин Grafana по его идентификатору плагина. Если версия ещё не подтверждена пользователем, опускает её: инструмент найдёт последнюю версию и вернёт её для подтверждения перед установкой.

Параметры
  • pluginIdstringобязательный

    The plugin ID to install (e.g. 'grafana-image-renderer', 'grafana-piechart-panel')

  • versionstring

    The exact version to install. Must be confirmed with the user before calling — if unknown, omit this field to look up the latest version first.

list_alert_groupsтолько чтениеидемпотентный

Выводит список групп оповещений из Grafana OnCall с возможностью фильтрации. Поддерживает фильтрацию по ID группы оповещений, ID маршрута, ID интеграции, состоянию (new, acknowledged, resolved, silenced), ID команды, временному диапазону, меткам и имени. Для временных диапазонов используйте формат '{start}_{end}': диапазон временных меток ISO 8601 (например, '2025-01-19T00:00:00_2025-01-19T23:59:59' для конкретного дня). Для меток используйте формат 'key:value' (например, ['env:prod', 'severity:high']). Возвращает список объектов групп оповещений с их деталями. Поддерживает пагинацию.

Параметры
  • idstring

    Filter by specific alert group ID

  • integrationIdstring

    Filter by integration ID

  • labelsstring[]

    Filter by labels in format key:value (e.g., ['env:prod', 'severity:high'])

  • namestring

    Filter by alert group name

  • pageinteger

    The page number to return

  • routeIdstring

    Filter by route ID

  • startedAtstring

    Filter by time range in format '{start}_{end}' ISO 8601 timestamp range (UTC assumed, no timezone indicator needed) (e.g., '2025-01-19T00:00:00_2025-01-19T23:59:59')

  • statestring

    Filter by alert group state (one of: new, acknowledged, resolved, silenced)

  • teamIdstring

    Filter by team ID

list_datasourcesтолько чтениеидемпотентный

Перечисляет все настроенные источники данных в Grafana. Позволяет обнаружить доступные источники данных и их UID. Поддерживает фильтрацию по типу и/или имени (совпадение подстроки без учёта регистра) и постраничный вывод.

Параметры
  • limitinteger

    Maximum number of datasources to return (max 100)

  • namestring

    Case-insensitive substring match on the datasource name. For example, 'prod' matches datasources named 'prometheus-prod-eu' and 'loki-prod-us'. Useful on instances with many datasources where filtering by type alone returns too many results.

  • offsetinteger

    Number of datasources to skip for pagination

  • typestring

    The type of datasources to search for. For example, 'prometheus', 'loki', 'tempo', etc...

list_incident_custom_fieldsтолько чтениеидемпотентный

Перечислите настраиваемые поля, сконфигурированные для инцидентов Grafana, включая их тип и, для полей выбора, возможные варианты значений. Используйте это, чтобы узнать, какие поля существуют и какие значения допустимы, перед тем как задавать их с помощью create_incident или update_incident.

Параметры
  • includeArchivedboolean

    Whether to include archived custom fields. Archived fields cannot be set on new incidents but may still hold values on older ones

list_incidentsтолько чтениеидемпотентный

Получает список инцидентов Grafana. Позволяет фильтровать по статусу ('active', 'resolved') и опционально включать связанные инциденты. Возвращает предварительный список с основными деталями, а также значения настраиваемых полей по запросу.

Параметры
  • drillboolean

    Whether to include drill incidents

  • includeCustomFieldsboolean

    Whether to include each incident's custom field values. Off by default because it costs an extra request and makes the response considerably larger

  • limitinteger

    The maximum number of incidents to return

  • statusstring

    The status of the incidents to include. Valid values: 'active', 'resolved'

list_loki_label_namesтолько чтениеидемпотентный

Lists all available label/field names (keys) found in logs within a specified Loki or VictoriaLogs datasource and time range. Returns a list of unique label strings (e.g., ["app", "env", "pod"]). If the time range is not provided, it defaults to the last hour. Optionally narrow the search to a subset of streams with matcher (e.g. {namespace="prod"}).

Параметры
  • datasourceUidstringобязательный

    The UID of the datasource to query

  • endRfc3339string

    Optionally, the end time of the query in RFC3339 format or relative time (e.g. 'now') (defaults to now)

  • matcherstring

    Optionally, a stream selector to narrow the search to matching streams (Loki: LogQL, e.g. '{namespace="prod"}'; VictoriaLogs: LogsQL). Defaults to searching across all streams.

  • startRfc3339string

    Optionally, the start time of the query in RFC3339 format or relative time (e.g. 'now-1h') (defaults to 1 hour ago)

list_loki_label_valuesтолько чтениеидемпотентный

Retrieves all unique values associated with a specific labelName within a Loki or VictoriaLogs datasource and time range. Returns a list of string values (e.g., for labelName="env", might return ["prod", "staging", "dev"]). Useful for discovering filter options. Defaults to the last hour if the time range is omitted. Optionally narrow the search to a subset of streams with matcher (e.g. {namespace="prod"}) — for example, to list service values seen only within a specific namespace.

Параметры
  • datasourceUidstringобязательный

    The UID of the datasource to query

  • endRfc3339string

    Optionally, the end time of the query in RFC3339 format or relative time (e.g. 'now') (defaults to now)

  • labelNamestringобязательный

    The name of the label to retrieve values for (e.g. 'app', 'env', 'pod')

  • matcherstring

    Optionally, a stream selector to narrow the search to matching streams (Loki: LogQL, e.g. '{namespace="prod"}'; VictoriaLogs: LogsQL). Defaults to searching across all streams.

  • startRfc3339string

    Optionally, the start time of the query in RFC3339 format or relative time (e.g. 'now-1h') (defaults to 1 hour ago)

list_oncall_schedulesтолько чтениеидемпотентный

Выводит расписания Grafana OnCall с возможностью фильтрации по ID команды. Если указан конкретный ID расписания, возвращает данные только по нему. Возвращает список сводок расписаний: ID, название, ID команды, часовой пояс и ID смен. Поддерживает постраничную навигацию.

Параметры
  • pageinteger

    The page number to return (1-based)

  • scheduleIdstring

    The ID of the schedule to get details for. If provided, returns only that schedule's details

  • teamIdstring

    The ID of the team to list schedules for

list_oncall_teamsтолько чтениеидемпотентный

Выводит список команд, настроенных в Grafana OnCall. Возвращает список объектов команд с их деталями. Поддерживает пагинацию.

Параметры
  • pageinteger

    The page number to return

list_oncall_usersтолько чтениеидемпотентный

Выводит список пользователей из Grafana OnCall. Это пользователи OnCall (отдельные от пользователей Grafana). Можно получить всех пользователей в каталоге OnCall, конкретного пользователя по ID или отфильтровать по имени пользователя. Возвращает список объектов пользователей с их деталями. Поддерживает пагинацию.

Параметры
  • pageinteger

    The page number to return

  • userIdstring

    The ID of the user to get details for. If provided, returns only that user's details

  • usernamestring

    The username to filter users by. If provided, returns only the user matching this username

list_prometheus_label_namesтолько чтениеидемпотентный

Выводит имена меток (label names) в источнике данных, совместимом с PromQL (Prometheus, Thanos, Mimir, Cloud Monitoring и т.д.). Поддерживает фильтрацию по селекторам рядов и временному диапазону.

Параметры
  • datasourceUidstringобязательный

    The UID of the datasource to query

  • endRfc3339string

    Optionally, the end time of the time range to filter the results by. Supports RFC3339 or relative time (e.g. 'now')

  • limitinteger

    Optionally, the maximum number of results to return

  • matchesobject[]

    Optionally, a list of label matchers to filter the results by

  • projectNamestring

    GCP project name to query (Cloud Monitoring datasources only). Overrides or substitutes the defaultProject configured on the datasource.

  • startRfc3339string

    Optionally, the start time of the time range to filter the results by. Supports RFC3339 or relative time (e.g. 'now-1h')

list_prometheus_label_valuesтолько чтениеидемпотентный

Используйте после list_prometheus_metric_names, чтобы находить значения меток для фильтрации запросов. Получает значения для конкретного имени метки в источнике данных, совместимом с PromQL (Prometheus, Thanos, Mimir, Cloud Monitoring и т.д.). Позволяет фильтровать по селекторам рядов и временному диапазону.

Параметры
  • datasourceUidstringобязательный

    The UID of the datasource to query

  • endRfc3339string

    Optionally, the end time of the query. Supports RFC3339 or relative time (e.g. 'now')

  • labelNamestringобязательный

    The name of the label to query

  • limitinteger

    Optionally, the maximum number of results to return

  • matchesobject[]

    Optionally, a list of selectors to filter the results by

  • projectNamestring

    GCP project name to query (Cloud Monitoring datasources only). Overrides or substitutes the defaultProject configured on the datasource.

  • startRfc3339string

    Optionally, the start time of the query. Supports RFC3339 or relative time (e.g. 'now-1h')

list_prometheus_metric_metadataтолько чтениеидемпотентный

Выводит метаданные метрик Prometheus. Возвращает метаданные о метриках, которые в данный момент собираются с целей. Примечание: этот endpoint экспериментальный.

Параметры
  • datasourceUidstringобязательный

    The UID of the datasource to query

  • limitinteger

    The maximum number of metrics to return

  • limitPerMetricinteger

    The maximum number of metrics to return per metric

  • metricstring

    The metric to query

  • projectNamestring

    GCP project name to query (Cloud Monitoring datasources only). Overrides or substitutes the defaultProject configured on the datasource.

list_prometheus_metric_namesтолько чтениеидемпотентный

DISCOVERY: вызывайте первым, чтобы найти доступные метрики перед запросом. Перечисляет имена метрик в источнике данных, совместимом с PromQL (Prometheus, Thanos, Mimir, Cloud Monitoring и т.д.). Извлекает все имена метрик и фильтрует их с помощью указанного regex. Поддерживает пагинацию и дополнительный временной диапазон, чтобы ограничить результаты метриками, активными в этом диапазоне.

Параметры
  • datasourceUidstringобязательный

    The UID of the datasource to query

  • endRfc3339string

    Optionally, the end time of the time range to filter the results by. Supports RFC3339 or relative time (e.g. 'now')

  • limitinteger

    The maximum number of results to return

  • pageinteger

    The page number to return

  • projectNamestring

    GCP project name to query (Cloud Monitoring datasources only). Overrides or substitutes the defaultProject configured on the datasource.

  • regexstring

    The regex to match against the metric names

  • startRfc3339string

    Optionally, the start time of the time range to filter the results by. Supports RFC3339 or relative time (e.g. 'now-1h')

list_provisioning_repositoriesтолько чтениеидемпотентный

Выводит список репозиториев подготовки (например, источники git-sync), настроенных для этого экземпляра Grafana. Возвращает slug каждого репозитория вместе с его исходным URL, веткой, путём, состоянием синхронизации и состоянием здоровья. Используйте возвращённое name как аргумент repo при рендеринге предпросмотра ещё не применённой панели через параметр provisioningPreview функции get_panel_image.

Параметры

Без параметров.

list_pyroscope_label_namesтолько чтениеидемпотентный

Перечисляет все доступные имена меток (ключи), найденные в профилях в указанном источнике данных Pyroscope, временном диапазоне и при наличии — в метках-фильтрах. Метки-фильтры обычно используются для уточнения имени сервиса ({service_name="foo"}). Возвращает список уникальных строк меток (например, ["app", "env", "pod"]). Имена меток с двойным подчёркиванием (например, name) являются внутренними и редко полезны пользователям. Если временной диапазон не указан, по умолчанию берётся последний час.

Параметры
  • data_source_uidstringобязательный

    The UID of the datasource to query

  • end_rfc_3339string

    Optionally, the end time of the query in RFC3339 format or relative time (e.g. 'now') (defaults to now)

  • matchersstring
  • start_rfc_3339string

    Optionally, the start time of the query in RFC3339 format or relative time (e.g. 'now-1h') (defaults to 1 hour ago)

list_pyroscope_label_valuesтолько чтениеидемпотентный

Выводит все доступные значения меток для указанного имени метки, найденные в профилях в заданном источнике данных Pyroscope, временном диапазоне и с опциональными фильтрами меток (label matchers). Фильтры меток обычно уточняют имя сервиса ({service_name="foo"}). Возвращает список уникальных строк меток (например, для имени метки "env": ["dev", "staging", "prod"]). Если временной диапазон не указан, по умолчанию используется последний час.

Параметры
  • data_source_uidstringобязательный

    The UID of the datasource to query

  • end_rfc_3339string

    Optionally, the end time of the query in RFC3339 format or relative time (e.g. 'now') (defaults to now)

  • matchersstring

    Optionally, Prometheus style matchers used to filter the result set (defaults to: {})

  • namestringобязательный

    A label name

  • start_rfc_3339string

    Optionally, the start time of the query in RFC3339 format or relative time (e.g. 'now-1h') (defaults to 1 hour ago)

list_pyroscope_profile_typesтолько чтениеидемпотентный

Перечисляет все доступные типы профилей в указанном источнике данных Pyroscope и временном диапазоне. Возвращает список всех доступных типов профилей (пример типа профиля: "process_cpu:cpu:nanoseconds:cpu:nanoseconds"). Тип профиля имеет следующую структуру: <name>:<sample type>:<sample unit>:<period type>:<period unit>. Не все типы профилей доступны для каждого сервиса. Если временной диапазон не указан, по умолчанию используется последний час.

Параметры
  • data_source_uidstringобязательный

    The UID of the datasource to query

  • end_rfc_3339string

    Optionally, the end time of the query in RFC3339 format or relative time (e.g. 'now') (defaults to now)

  • start_rfc_3339string

    Optionally, the start time of the query in RFC3339 format or relative time (e.g. 'now-1h') (defaults to 1 hour ago)

list_sift_investigationsтолько чтениеидемпотентный

Получает список расследований Sift с опциональным лимитом. Если лимит не указан, по умолчанию возвращается 10 расследований.

Параметры
  • limitinteger

    Maximum number of investigations to return

list_snapshotsтолько чтениеидемпотентный

Вывести список снимков дашбордов Grafana с необязательными фильтрами по запросу и лимиту результатов.

Параметры
  • limitinteger

    Maximum number of snapshots to return (Grafana defaults to 1000 when omitted)

  • querystring

    Optional search query for snapshot name

query_loki_logsтолько чтениеидемпотентный

Выполняет запрос логов к источнику данных Loki или VictoriaLogs и возвращает соответствующие записи логов (или метрические выборки в Loki). По умолчанию используется последний час, лимит 10 записей и направление «назад» (сначала новые). Параметр logql принимает LogQL в Loki и LogsQL в VictoriaLogs (например, Loki: {app="foo"} |= "error"; VictoriaLogs: {app="foo"} "error"). Чтобы точно подсчитать строки логов, используйте метрический запрос count_over_time() с queryType='instant'. Сначала предпочтительно использовать query_loki_stats для дешёвой проверки наличия данных в потоке (избегая дорогих запросов к пустым потокам) и list_loki_label_names / list_loki_label_values для проверки существования меток перед запросом. Обратите внимание: query_loki_stats возвращает приблизительные оценки на уровне хранилища, а не точные подсчёты строк. Для широких запросов, совпадающих с множеством строк, установите format в 'compact', чтобы сгруппировать результаты по потокам и не повторять метаданные меток в каждой строке. Если на сервере включён механизм ограничения стоимости Loki, дорогие запросы отклоняются до выполнения: стоимость — это количество просканированных байт, определяемое только селектором потока и временным диапазоном — фильтры строк (|=) и парсеры (| json) уменьшают возвращаемые данные, а не сканируемые. Используйте селектор потока с хотя бы одним положительным селектором метки (никогда {}, =~".*"/=~".+" или только отрицательные селекторы), держите временные диапазоны узкими и сначала проверяйте размер с помощью query_loki_stats; отклонённые запросы возвращают рекомендации по переписыванию.

Параметры
  • datasourceUidstringобязательный

    The UID of the datasource to query

  • directionstring

    Optionally, the direction of the query: 'forward' (oldest first) or 'backward' (newest first, default)

  • endRfc3339string

    Optionally, the end time of the query in RFC3339 format or relative time (e.g. 'now')

  • formatenum

    Output format for log (streams) queries: 'full' (default) returns every entry with its own label metadata; 'compact' groups lines by stream so each label set is emitted only once (and per-line structured/parsed metadata is dropped), substantially reducing response size for broad queries. Ignored for metric queries.

  • limitinteger

    Optionally, the maximum number of log lines to return (default max: 100, configurable by MCP server).

  • logqlstringобязательный

    The LogQL query to execute against Loki. This can be a simple label matcher or a complex query with filters, parsers, and expressions. Supports full LogQL syntax including label matchers, filter operators, pattern expressions, and pipeline operations.

  • queryTypestring

    Query type: 'range' (default) or 'instant'. Instant queries return a single value at one point in time. Range queries return values over a time window. Use 'instant' for metric queries when you want the current value.

  • startRfc3339string

    Optionally, the start time of the query in RFC3339 format or relative time (e.g. 'now-1h')

  • stepSecondsinteger

    Resolution step in seconds for range metric queries. When running metric queries with queryType='range', this controls the time resolution of the returned data points.

query_loki_patternsтолько чтениеидемпотентный

Получает обнаруженные шаблоны логов из источника данных Loki для указанного селектора потока и временного диапазона. Возвращает список шаблонов, каждый из которых содержит строку шаблона и общее количество вхождений. Шаблоны помогают выявить типичные структуры логов и аномалии. Параметр logql должен быть селектором потока (например, {job="nginx"}) и не поддерживает фильтры строк или агрегации. Если временной диапазон не указан, по умолчанию берётся последний час. Не поддерживается на источниках данных VictoriaLogs: используйте вместо этого конвейер | stats.

Параметры
  • datasourceUidstringобязательный

    The UID of the datasource to query

  • endRfc3339string

    Optionally, the end time of the query in RFC3339 format or relative time (e.g. 'now') (defaults to now)

  • logqlstringобязательный

    A LogQL stream selector to identify the logs to analyze for patterns (e.g. {job="foo", namespace="bar"})

  • startRfc3339string

    Optionally, the start time of the query in RFC3339 format or relative time (e.g. 'now-1h') (defaults to 1 hour ago)

  • stepstring

    Optionally, the query resolution step (e.g. '5m')

query_loki_statsтолько чтениеидемпотентный

Извлекает статистику на уровне индекса по лог-потокам, соответствующим заданному селектору, в пределах источника данных Loki или VictoriaLogs и временного диапазона. Возвращает объект с количеством потоков, чанков, записей и общим объёмом в байтах (например, {"streams": 5, "chunks": 50, "entries": 10000, "bytes": 512000}). Важно: количество entries отражает записи индекса на уровне хранилища (метаданные чанков), а НЕ количество отдельных лог-строк, соответствующих селектору. Чтобы подсчитать фактические совпадающие лог-строки, используйте query_loki_logs с метрическим запросом count_over_time(). В VictoriaLogs заполняется только entries; остальные поля остаются нулевыми. Параметр logql обязательно должен быть простым селектором меток (например, {app="nginx", env="prod"}) и не поддерживает фильтры строк, парсеры или агрегации. По умолчанию используется последний час, если временной диапазон не указан.

Параметры
  • datasourceUidstringобязательный

    The UID of the datasource to query

  • endRfc3339string

    Optionally, the end time of the query in RFC3339 format or relative time (e.g. 'now')

  • logqlstringобязательный

    The LogQL matcher expression to execute. This parameter only accepts label matcher expressions and does not support full LogQL queries. Line filters, pattern operations, and metric aggregations are not supported by the stats API endpoint. Only simple label selectors can be used here.

  • startRfc3339string

    Optionally, the start time of the query in RFC3339 format or relative time (e.g. 'now-1h')

query_prometheusтолько чтениеидемпотентный

WORKFLOW: list_prometheus_metric_names -> list_prometheus_label_values -> query_prometheus. Выполните запрос к источнику данных, совместимому с PromQL (Prometheus, Thanos, Mimir, Cloud Monitoring и т.д.), используя выражение PromQL. Поддерживает мгновенные запросы (одна точка) и запросы с диапазоном (временной диапазон). Время: RFC3339 или относительные выражения, например 'now', 'now-1h'.

Параметры
  • datasourceUidstringобязательный

    The UID of the datasource to query

  • endTimestringобязательный

    The end time. Supported formats are RFC3339 or relative to now (e.g. 'now', 'now-1.5h', 'now-2h45m'). Valid time units are 'ns', 'us' (or 'µs'), 'ms', 's', 'm', 'h', 'd'.

  • exprstringобязательный

    The PromQL expression to query

  • projectNamestring

    GCP project name to query (Cloud Monitoring datasources only). Overrides or substitutes the defaultProject configured on the datasource.

  • queryTypestring

    The type of query to use. Either 'range' or 'instant'

  • startTimestring

    The start time. Required if queryType is 'range', ignored if queryType is 'instant' Supported formats are RFC3339 or relative to now (e.g. 'now', 'now-1.5h', 'now-2h45m'). Valid time units are 'ns', 'us' (or 'µs'), 'ms', 's', 'm', 'h', 'd'.

  • stepSecondsinteger

    The time series step size in seconds. Required if queryType is 'range', ignored if queryType is 'instant'

query_prometheus_histogramтолько чтениеидемпотентный

Запрашивает процентили гистограмм Prometheus. СНАЧАЛА ОПРЕДЕЛИТЕ: используйте list_prometheus_metric_names с regex='.*_bucket$', чтобы найти гистограммы. Генерирует histogram_quantile PromQL. Пример: metric='http_duration', percentile=95, labels='job="api"' Форматы времени: 'now-1h', '2026-02-02T19:00:00Z', '1738519200000' (Unix ms)

Параметры
  • datasourceUidstringобязательный

    The UID of the Prometheus datasource

  • endTimestring

    End time (default: now). Supports RFC3339, relative, or Unix ms.

  • labelsstring

    Label selector (e.g. job="api", service="gateway")

  • metricstringобязательный

    Base histogram metric name (without _bucket suffix)

  • percentilenumberобязательный

    Percentile to calculate (e.g. 50, 90, 95, 99)

  • projectNamestring

    GCP project name to query (Cloud Monitoring datasources only). Overrides or substitutes the defaultProject configured on the datasource.

  • rateIntervalstring

    Rate interval for the query (default: 5m)

  • startTimestring

    Start time (default: now-1h). Supports RFC3339, relative (now-1h), or Unix ms.

  • stepSecondsinteger

    Step size in seconds for range query (default: 60)

query_pyroscopeтолько чтениеидемпотентный

Единый инструмент запросов Pyroscope получает профили или метрики из Pyroscope. Профильные данные показывают, КАКИЕ функции потребляют ресурсы; метрики показывают, КОГДА потребление резко возросло. Используйте query_type="both" для полного анализа за один вызов. Параметры query_type (расширяет Grafana's PyroscopeQueryType): - "profile": возвращает профильные данные (форма задаётся параметром format) - "metrics": возвращает точки временных рядов - "both" (по умолчанию): возвращает и профиль, и метрики в одном ответе Параметры format (форма профильных данных): - "table" (по умолчанию): таблица по функциям с собственными (self) и накопленными значениями, отсортированными по собственным - "dot": граф вызовов в формате Graphviz DOT; узлы соответствуют отдельным строкам исходного кода, поэтому одна функция может быть представлена несколькими узлами

Параметры
  • data_source_uidstringобязательный

    The UID of the datasource to query

  • end_rfc_3339string

    End time in RFC3339 or relative time (e.g. 'now') (defaults to now)

  • formatstring

    Profile output format: "table" (default) for a per-function flat/cum table, or "dot" for a call graph in Graphviz DOT format

  • group_bystring[]

    Labels to group metrics series by

  • matchersstring

    Prometheus style matchers (defaults to: {})

  • max_node_depthinteger

    Max functions in the profile table or nodes in the call graph; it is a count, not a depth (default: 100)

  • profile_typestringобязательный

    The profile type, use list_pyroscope_profile_types to discover available types

  • query_typestring

    Query type: "profile" (flamegraph), "metrics" (time-series), or "both" (default). Use "both" for complete analysis

  • start_rfc_3339string

    Start time in RFC3339 or relative time (e.g. 'now-1h') (defaults to 1 hour ago)

  • stepnumber

    Seconds between metrics data points (default: auto)

search_dashboardsтолько чтениеидемпотентный

Search Grafana dashboards by query and/or folderUid, tag, and starred. Returns matching dashboards with title, UID, folder, tags, and URL.

Параметры
  • folderUidstring

    Optional immediate folder UID (not nested)

  • limitinteger

    Maximum number of results to return (max 100)

  • pageinteger

    Page number for pagination (1-indexed)

  • querystring

    Optional query. Omit to filter by folderUid, tag, or starred

  • starredboolean

    If true, only starred dashboards

  • tagstring[]

    Optional tags to match (AND)

search_docsтолько чтениеидемпотентныйвнешний мир
Параметры
  • limitinteger

    Maximum results to return (default 5)

  • productstring

    Filter results to a specific product (e.g. 'Grafana Tempo', 'Grafana Loki')

  • querystring

    Search query for Grafana documentation. Omit to list all available product groups.

search_foldersтолько чтениеидемпотентный

Ищет папки Grafana по строке запроса. Возвращает подходящие папки с деталями: название, UID и URL.

Параметры
  • querystring

    The query to search for

search_plugin_informationтолько чтениеидемпотентныйвнешний мир

Искать в каталоге плагинов Grafana по ключевому слову, чтобы найти доступные плагины перед установкой или получением сведений о плагине на конкретном экземпляре. Возвращает результаты, отсортированные по доверию: сначала официальные плагины Grafana Labs, затем коммерческие партнёрские плагины, затем плагины сообщества. Используйте этот инструмент, когда пользователь описывает плагин по назначению или частичному имени (например, 'azure monitoring', 'loki', 'database') - он возвращает точный pluginId для передачи в get_plugin или install_plugin. Результаты содержат предупреждения о плагинах только для Enterprise или на основе Angular.

Параметры
  • querystringобязательный

    Keyword to search for plugins (e.g. 'azure', 'prometheus', 'loki', 'database'). Matches against plugin name, slug, description, and keywords.

suggest_loki_alloy_label_configтолько чтениеидемпотентный

Генерирует фрагмент Alloy loki.process, принудительно применяющий утверждённый набор меток с помощью stage.label_keep, с опциональной нормализацией уровня логирования и заглушками для мягкого принуждения.

Параметры
  • approvedLabelsstring[]обязательный

    Labels to keep on the index.

  • componentNamestring
  • forwardTostring
  • normalizeLogLevelboolean
  • requiredLabelsstring[]

    Labels that get an 'unknown' placeholder when missing.

update_alert_group

Обновляет состояние группы оповещений Grafana OnCall: подтверждает, снимает подтверждение, разрешает или снимает разрешение по ID. Возвращает итоговое состояние группы оповещений OnCall (одно из: new, acknowledged, resolved, silenced) или stateWarning с объяснением, почему состояние не удалось прочитать после успешного обновления.

Параметры
  • alertGroupIdstringобязательный

    The ID of the alert group to update

  • statestringобязательный

    New state for the alert group. One of: acknowledged, unacknowledged, resolved, unresolved

update_annotation

Обновляет указанные свойства аннотации по ID. Изменяются только поля, включенные в запрос; пропущенные поля остаются без изменений.

Параметры
  • dataobject

    Optional JSON payload

  • idinteger

    Annotation ID to update

  • tagsstring[]

    Tags to replace existing tags

  • textstring

    New annotation text

  • timeinteger

    New start time epoch ms

  • timeEndinteger

    New end time epoch ms

update_dashboard

Создаёт или обновляет дашборд. Два режима: (1) Full JSON — предоставляет 'dashboard' для новых дашбордов или полных замен. (2) Patch — предоставляет 'uid' + 'operations' для целевых изменений существующего дашборда. Один из этих двух режимов обязателен; 'folderUid', 'message' и 'overwrite' — дополнительные параметры и сами по себе ничего не делают. Рекомендации по созданию дашборда: если сохранённый запрос должен поддерживать одно, несколько или Все значения из переменной с множественным выбором внутри регулярного выражения или сопоставителя, сохраняйте '${var:regex}' вместо простого '$var'. Сохранённые запросы/определения аннотаций дашборда должны быть записаны в JSON дашборда в раздел 'annotations.list'; инструмент create_annotation создаёт события аннотаций и не добавляет повторно используемый запрос/определение аннотации дашборда в сохранённый дашборд. Для stat-панелей по текущему диапазону дашборда делайте так, чтобы запрос возвращал результат на уровне диапазона, который должна отображать статистика; редукция на стороне панели только сокращает возвращаемые ряды и не вычисляет за вас семантику пика по диапазону или отношения пиков. Операции патча поддерживают JSONPath вида '$.panels[0].targets[0].expr', '$.panels[1].title', '$.panels[2].targets[0].datasource', '$.templating.list/-' и '$.annotations.list/-'. Добавление в массивы с помощью синтаксиса '/-': '$.panels/- '. Удаление по индексу: {"op": "remove", "path": "$.panels[2]"}. Множественные удаления из одного массива автоматически переупорядочиваются, чтобы избежать проблем со смещением индексов. Примечание: в путях патча поддерживаются только числовые индексы массивов; фильтрующие выражения вида [?(@.id==2)] и подстановочные знаки вида [*] не поддерживаются. Дашборды v2 (проверяйте 'isV2' через get_dashboard_by_uid) используют другую структуру: патчьте '$.elements.<name>.spec.title' или '$.elements.<name>.spec.data.spec.queries[0].spec' и редактируйте '$.variables'/'$.layout' вместо '$.panels'/'$.templating.list'. Сохранения в формате Full-JSON, содержащие 'elements'/'layout' верхнего уровня, записываются как v2 и требуют Grafana с поддержкой Kubernetes. После создания или обновления дашборда убедитесь, что запросы панелей...

Параметры
  • dashboardobject

    The full dashboard JSON. Use for creating new dashboards or complete updates. Saved dashboard annotation queries/definitions live in 'annotations.list' inside this JSON; they are different from annotation events created with create_annotation. Large dashboards consume significant context - consider using patches for small changes.

  • folderUidstring

    The UID of the dashboard's folder

  • messagestring

    Set a commit message for the version history

  • operationsobject[]

    Array of patch operations for targeted updates. More efficient than full dashboard JSON for small changes. Common paths: '$.templating.list/-' to add a variable, '$.annotations.list/-' to add a saved dashboard annotation query/definition, '$.panels[0].targets[0].expr' to replace a panel query.

  • overwriteboolean

    Overwrite the dashboard if it exists. Otherwise create one

  • uidstring

    UID of existing dashboard to update. Must be used together with 'operations'. Providing 'uid' without 'operations' will fail.

  • userIdinteger

    ID of the user making the change

update_datasourceидемпотентный

Обновляет несекретные поля источника данных по UID. Опущенные поля сохраняются. ВАЖНО: всегда вызывайте этот инструмент дважды. Первый вызов: передайте только uid — инструмент возвращает схему полей источника данных. После получения схемы спросите пользователя, какие поля он хочет изменить, и подтвердите каждое новое значение; не додумывайте и не сбрасывайте поля, которые пользователь не упомянул. Второй вызов: передайте uid, schemaReviewed=true и изменённые значения в fields map. Возвращает сообщение об обновлении и проверку работоспособности. Для секретов направьте пользователя в Grafana UI.

Параметры
  • accessstring

    proxy or direct

  • basicAuthboolean

    Enable basic auth

  • databasestring

    Database name

  • fieldsobject

    Datasource field values to change, keyed by field key from the schema returned on the first call. The server uses each field's target (root or jsonData) to place values correctly, merging jsonData changes into the existing settings. Only include the fields you want to change. Example: {"httpMethod": "POST"}.

  • isDefaultboolean

    Make this the default datasource

  • jsonDataobject

    Non-secret plugin settings; replaces existing jsonData when set

  • namestring

    Display name

  • schemaReviewedboolean

    Set to true on the second call to confirm you reviewed the schema and collected the changes from the user.

  • uidstringобязательный

    UID of the datasource to update

  • urlstring

    Base URL

update_incidentидемпотентный

Обновляет существующий инцидент Grafana по идентификатору. Позволяет изменять статус ('active' или 'resolved'), серьёзность, заголовок и значения настраиваемых полей. Изменяются только переданные поля. Используйте это для закрытия инцидента, исправления серьёзности или заголовка либо для заполнения настраиваемых полей в рамках рабочего процесса дежурного.

Параметры
  • customFieldsobject[]

    Custom field values to set. Only the listed fields are changed. Use list_incident_custom_fields to discover the available fields and their valid values

  • incidentIdstringобязательный

    The ID of the incident to update

  • severitystring

    The new severity of the incident, e.g. 'minor', 'major', 'critical'

  • statusstring

    The new status of the incident. Valid values: 'active', 'resolved'

  • titlestring

    The new title of the incident

user_infoтолько чтениеидемпотентный

Получает информацию о текущей учётной записи Grafana: логин, электронную почту, имя, является ли она администратором Grafana (сервера), текущую организацию и организации, к которым она имеет доступ (с ролями). Вызовите этот инструмент, чтобы узнать, какие значения orgId допустимы, прежде чем указывать конкретную организацию, и чтобы понять возможности учётной записи.

Параметры

Без параметров.

validate_provisioning_fileтолько чтениеидемпотентный

Проверяет файл в репозитории подготовки (provisioning) в заданной ветке или коммите с помощью пробного применения (dry-run). Возвращает, будет ли файл принят (валиден), какое действие с ресурсом последует (создание/обновление), целевой тип ресурса и все структурированные ошибки проверки. Используйте, чтобы подтвердить, что черновой дашборд или другой ресурс будет принят до слияния или применения PR, это та же поверхность проверки, которую сообщает комментатор PR в Grafana.

Параметры
  • pathstringобязательный

    File path within the repository (e.g. 'folder/dashboard.json').

  • refstring

    Branch or commit SHA. Defaults to the repository's main branch.

  • repostringобязательный

    Provisioning repository slug. Get one from list_provisioning_repositories.

Похожие MCP-сервера

tumf/grafana-loki-mcp

tumf/grafana-loki-mcp

MCP сервер для запросов логов из Grafana Loki: позволяет выполнять LogQL-запросы, получать метки и значения, форматировать результаты. Полезен разработчикам и DevOps для анализа логов через MCP-инструменты.

Python29
pab1it0/prometheus-mcp-server

pab1it0/prometheus-mcp-server

MCP-сервер для прямого доступа к метрикам Prometheus. Позволяет AI-ассистентам выполнять PromQL-запросы, просматривать список метрик и получать их метаданные. Полезен инженерам, работающим с observ...

Python513
alimuratkuslu/byok-observability-mcp

alimuratkuslu/byok-observability-mcp

MCP сервер для запросов к observability-стекам (Grafana, Prometheus, Kafka UI, Datadog). Данные хранятся локально — ключи не покидают машину. Разработчики и SRE анализируют метрики, алерты и логи прямо из Claude Code, Codex или любого MCP клиента без настройки инфраструктуры.

TypeScript4
edgedelta/edgedelta-mcp-server

edgedelta/edgedelta-mcp-server

MCP сервер для интеграции с Edge Delta API: автоматизирует сбор и анализ observability данных, а также создание AI-инструментов на платформе. Полезен разработчикам для взаимодействия с данными мониторинга.

Go9
yincongcyincong/VictoriaMetrics-mcp-server

yincongcyincong/VictoriaMetrics-mcp-server

MCP-сервер для работы с VictoriaMetrics: записывает и считывает временные ряды, выполняет PromQL-запросы, управляет лейблами. Идеально для DevOps и SRE, автоматизирующих мониторинг через ИИ-агенты.

JavaScript8
VictoriaMetrics-Community/mcp-victorialogs

VictoriaMetrics-Community/mcp-victorialogs

официальный

MCP-сервер для VictoriaLogs. Предоставляет AI-агентам доступ к чтению логов, метрик, полей и встроенной документации через LogsQL-запросы. Упрощает отладку и мониторинг для инженеров.

Go97
© Каталог MCP, 2026. Все права защищены.
Проект не аффилирован с Anthropic и любыми упомянутыми продуктами.
Все названия и торговые марки принадлежат их владельцам.
Контакты для связи: hi@mcp-katalog.ru

Лука Никитин