Grafana
Read Grafana alerts, silences, annotations, dashboards and datasources through a read-only connection.
What it covers
Grafana shows which alert rules exist and at which thresholds, whether notifications were silenced, deployment annotations for timestamp correlation, and the datasources behind dashboards when a telemetry gap may be an observability problem. Rule lists are configuration, not firing state.
Connect
Use one connection per Grafana server. If each environment has its own server,
tie each connection to it with --for-env:
reckon connect grafana-prod --org acme --provider grafana --for-env prodFill in ~/.reckon/orgs/acme/secrets/grafana-prod.env:
GRAFANA_URL=https://grafana.example.com
GRAFANA_TOKEN=replace_meSet GRAFANA_TOKEN, or GRAFANA_USERNAME with GRAFANA_PASSWORD.
GRAFANA_ORG_ID is optional. Instead of the file, you can run
reckon login grafana-prod in your own terminal: it runs grafana login and
keeps the profile in that connection's private config.
reckon verify grafana-prod runs grafana org current -o json.
Read-only contract
Reckon runs grafana with GRAFANA_READ_ONLY=true and
GRAFANA_NO_INPUT=true, so the CLI refuses writes. It also refuses --url,
--token, --username, --password, --org-id, --profile, --read-only
and --no-input, --output-file (exports go to standard output instead), and
the login, config and update commands. A Viewer
service account token keeps the server side read-only too.
Key commands
reckon run grafana -- alert rule list -o json
reckon run grafana -- alert silence list -o json
reckon run grafana -- annotation list --tags deploy --from <time> --to <time> -o json
reckon run grafana -- dashboard list -o json
reckon run grafana -- datasource list -o json