Lodol Docs

Grafana

API actions for the Grafana integration.

Grafana

Visualize metrics, explore logs, and annotate incidents with Grafana.


Create annotation

Create an annotation on a Grafana dashboard to mark events.

Parameters

ParameterTypeRequiredDescription
dashboard_uidstringYesUID of the dashboard to annotate
textstringYesAnnotation text content
tagsarrayNoList of tags for the annotation
timenumberNoEpoch timestamp in milliseconds for the annotation

Response

{
  "id": 42,
  "message": "Annotation added"
}

Get dashboard

Retrieve details of a specific Grafana dashboard by UID.

Parameters

ParameterTypeRequiredDescription
uidstringYesUnique identifier of the dashboard

Response

{
  "tags": [
    "infrastructure",
    "monitoring"
  ],
  "title": "System Metrics",
  "uid": "abc123xyz",
  "url": "/d/abc123xyz/system-metrics"
}

List alerts

List alerts from Grafana Alertmanager.

Parameters

ParameterTypeRequiredDescription
activebooleanNoShow active alerts (default true)
silencedbooleanNoShow silenced alerts (default true)
inhibitedbooleanNoShow inhibited alerts (default true)

Response

{
  "alerts": [
    {
      "labels": {
        "alertname": "HighCPUUsage",
        "severity": "warning"
      },
      "name": "HighCPUUsage",
      "startsAt": "2024-01-15T10:30:00Z",
      "state": "active"
    }
  ]
}

Search dashboards

Search for Grafana dashboards by query string.

Parameters

ParameterTypeRequiredDescription
querystringNoSearch query to filter dashboards by title or tag
limitnumberNoMaximum number of dashboards to return

Response

{
  "dashboards": [
    {
      "title": "System Metrics",
      "type": "dash-db",
      "uid": "abc123xyz",
      "uri": "db/system-metrics",
      "url": "/d/abc123xyz/system-metrics"
    }
  ]
}

On this page