Grafana

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

modbender Updated 12 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

modbender/skill-library-mcp/tree/main/data/grafana commit e3b8d7fafb

Frequently asked questions

npx skillmds@latest add modbender/grafana