A pragmatic walkthrough of automating Grafana dashboard creation using an LLM-powered CLI workflow. The approach explores a ClickHouse data source column by column, lets an AI (o4-mini) propose panels and generate SQL queries, then uses deterministic code to produce the final Grafana JSON. Key lessons include enforcing read-only, LIMIT-guarded queries for safety, avoiding LLMs for tasks simple functions handle better, and sidestepping Grafana's poorly-documented JSON formats by restricting output to time series and stat panels while generating the JSON programmatically.

7m read timeFrom quesma.com
Post cover image
Table of contents
Dashboarding is a full time jobGrafana with AILessons learnedThe future is (partially) automated

Sort: