• RAW DATA
  • SEARCH
  • DEBUG
  • HUMAN

How to extract and debug dashboard queries with your AI

Connect your agent to Grafana once. After that, you can just ask it to find specific dashboards and pull the exact queries powering your panels.

Ask AI about this page

Short answer

How can I get PromQL or LogQL queries from a Grafana dashboard using AI?

Your agent uses the connector to locate the dashboard you need and then pulls the raw query strings from individual panels. This lets you inspect the logic behind a visualization without clicking through the Grafana UI. You'll get the exact syntax used for your metrics or logs.

Where every issue lands.

The outcomes of your request.

Depending on what you ask, your agent delivers specific data or identifies where you need to step in.

RAW DATA

Direct query extraction

The agent pulls the exact PromQL or LogQL strings from a specific panel. You get the raw logic used to generate the graph.

SEARCH

Dashboard discovery

If you don't know the exact name, the agent finds the right dashboard by searching your Grafana instance.

DEBUG

Logic troubleshooting

Your agent reads the query syntax and explains why a specific metric might be returning no data or incorrect values.

HUMAN

Manual UI fixes

The agent cannot edit your dashboards. You still need to go into the Grafana editor to change a query or update a panel.

The workflow

What your AI does when you ask for a query.

The agent handles the navigation and data retrieval so you can focus on the math.

  1. Locate the dashboard

    The agent scans your Grafana environment to find the specific dashboard you mentioned by name or keyword.

    search_dashboards
  2. Fetch dashboard details

    Once found, the agent pulls the full JSON definition of the dashboard to see all its panels and settings.

    get_dashboard
  3. Isolate the query

    The agent parses the dashboard data to find the specific PromQL or LogQL string tied to the panel you're asking about.

    get_dashboard
  4. Explain the logic

    Your agent interprets the extracted query and explains what it's actually measuring in plain English.

    get_dashboard

Try it

Copy these to start.

Use these prompts to kick off a troubleshooting session.

Starting points

Replace the bracketed text with your actual dashboard names or specific metric types.

Grafana Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_GY4fnTT6ubjB2NS0Nlt9HtI8gm9rlHDIhOeLcpat/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Grafana capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "grafana-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_GY4fnTT6ubjB2NS0Nlt9HtI8gm9rlHDIhOeLcpat/mcp"
    }
  }
}
Copy into chat04
  • Find the 'Production Cluster' dashboard and give me the PromQL query for the CPU usage panel.

  • Search for dashboards related to 'error rates' and pull the LogQL query from the first one you find.

  • Get the dashboard named 'Kubernetes Overview' and explain the query used in the memory consumption graph.

  • I can't find the query for the latency panel in my 'API Gateway' dashboard. Can you find it for me?

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Grafana once, then ask.

Just link your Grafana instance to Vinkius. Your credentials stay encrypted and secure, and you can immediately start querying your dashboards through your favorite AI client.

Connect Grafana to your AI

FAQ

How this task behaves.

  • 01

    Can the AI change my dashboard queries?

    No. The agent can only read and extract queries. You must manually edit dashboards in the Grafana UI.

  • 02

    Can it create new dashboards for me?

    No. This connector is designed for searching and retrieving existing dashboard data.

  • 03

    Does it work with all Grafana panels?

    It works with any panel that uses standard PromQL or LogQL queries.

  • 04

    How does it find a dashboard if I don't know the exact name?

    The agent uses the search tool to look for matches based on the keywords you provide.

  • 05

    Can the AI see my Grafana credentials?

    No. Your credentials are encrypted and managed by Vinkius; your agent only sees the data it needs to perform the requested tasks.

  • More questions about Grafana? See everything the Grafana Connector can do

Connect Grafana to Claude, Cursor, ChatGPT & more