Skip to content

MCP CLI Tool: List All Alerts for a Given Grafana Dashboard UID #320

@PrakharMehrotra-source

Description

@PrakharMehrotra-source

As part of the Grafana MCP toolkit, we need a tool that, given a dashboard UID, can enumerate all alerts associated with that dashboard UID across all environments returning the results in structured JSON format.

Key Requirements

Input:

dashboard_uid (e.g., abcd1234)

Output:

A JSON array, where each entry contains:

alert_name: The alert rule’s name or title
panel_title: The title of the linked panel (if applicable)
panel_id: The ID of the linked panel (if applicable)
condition: The alert condition or expression (e.g., metric, threshold, and duration)
status: The alert’s current state (enabled or paused)
notification_channels: List of notification channels (e.g., Slack, Opsgenie, etc.)
runbook_url: Associated runbook URL or alert message (if present)
environment: Environment name/context (e.g., prd, dev, stg, etc.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions