On this page
Grafana Operations Manual
Grafana is a data visualization platform. Core concepts: datasource, dashboard (collection of panels), panel (individual chart), alert rule, contact point (notification channel), provisioning (file-driven configuration management).
Provisioning
Grafana supports automatic creation of dashboards and alert rules via files—no manual UI interaction required. File changes take effect automatically after ~10s; use systemctl reload grafana to force a refresh.
provider yaml:
apiVersion: 1
providers:
- name: host
folder: Host Status # target folder (created if it doesn't exist)
type: file
options:
path: /etc/grafana/provisioning/dashboards/json-all/host
datasource yaml:
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
url: http://localhost:9090
access: proxy
uid: dfguyfutpcnpca # fixed UID (referenced in dashboard JSON)
Dashboard JSON Debugging
# View datasource and panels of a dashboard
# View template variables
# Batch modify datasource uid
Unified Storage Operations (Grafana 12+)
Grafana 12 uses SQLite to store all objects (unified storage). Dashboards created via the UI are stored in the database, not in files.
Alerts
# List contact points
|
# Export contact points including secrets
|
# Test alert template (does not send notifications, only renders)
Troubleshooting
# Dashboard not showing data
# → Check if the UID pointed to by the panel's datasource exists
|
# → Check if the datasource itself is reachable: curl http://localhost:9090/api/v1/query?query=up
# Alert not triggering
# → Check if the rule's datasourceUid is correct
# → Check evaluation interval: /etc/grafana/grafana.ini → [alerting] → evaluation_interval
# Grafana fails to start
# → Often due to DB corruption or permission issues: journalctl -u grafana -e
# → Check if /var/lib/grafana/grafana.db is writable