Grafana

Manage Grafana dashboards, data sources, and alerts via API. Visualize metrics and logs.

kbarbel640-del Updated 1 repo stars

File contents

Grafana

Observability dashboards.

Environment

export GRAFANA_URL="https://grafana.example.com"
export GRAFANA_API_KEY="xxxxxxxxxx"

List Dashboards

curl "$GRAFANA_URL/api/search?type=dash-db" -H "Authorization: Bearer $GRAFANA_API_KEY"

Get Dashboard

curl "$GRAFANA_URL/api/dashboards/uid/{uid}" -H "Authorization: Bearer $GRAFANA_API_KEY"

List Data Sources

curl "$GRAFANA_URL/api/datasources" -H "Authorization: Bearer $GRAFANA_API_KEY"

Create Alert Rule

curl -X POST "$GRAFANA_URL/api/v1/provisioning/alert-rules" \
  -H "Authorization: Bearer $GRAFANA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title": "High CPU", "condition": "A", "data": [...]}'

Links

kbarbel640-del/skills/tree/main/skills/mrgoodb/grafana commit 0c18d03b40

Frequently asked questions

npx skillmds@latest add kbarbel640-del/grafana