Grafana Query Export

Export every Grafana dashboard target—SQL, PromQL, LogQL, TraceQL, Flux, InfluxQL, Graphite, expressions, and unknown JSON—into project context files

datus-ai 0d0fdfa 1.1 KB Updated

File contents

Grafana Query Export

Run:

datus grafana context export-dashboard <dashboard-uid>

The default destination is reference_sql/grafana/<dashboard-slug>/. Each target gets its own language-appropriate file. Grafana expressions and unknown target models remain structured JSON so information is not discarded. manifest.json records dashboard/panel/refId, datasource, variables/macros, language, checksum, and status; _source/ holds redacted dashboard and resolved library-panel documents.

Existing output is protected. Use --overwrite only after inspecting the path, and --include-hidden only when hidden targets should be context. Retain $variable, ${variable:format}, $__timeFilter, interval macros, and datasource templating; do not substitute runtime values. Review the manifest before consuming files as project context and report incomplete resolution rather than guessing query semantics.

datus-ai/datus-plugins/tree/main/datus-grafana-plugin/datus_grafana_plugin/skills/grafana-query-export commit 0d0fdfab58

Frequently asked questions

npx skillmds@latest add datus-ai/grafana-query-export