English
Integrations
Grafana

Grafana Integration

Connect ReliaPulse to Grafana to leverage its unified alerting and datasource capabilities.

Prerequisites

  • Grafana instance (8.0+ recommended)
  • API access enabled
  • Service account or API key

Configuration

Create Integration

  1. Go to Dashboard → Settings → Integrations
  2. Click Add Integration
  3. Select Grafana
  4. Fill in the configuration:
FieldDescriptionExample
NameFriendly nameProduction Grafana
URLGrafana API URLhttps://grafana.example.com
API KeyService account tokenglsa_xxx...

Generate API Key

In Grafana:

  1. Go to Administration → Service Accounts
  2. Create new service account
  3. Add token with Viewer role
  4. Copy the token to ReliaPulse

Creating Metrics Queries

Grafana supports multiple datasources. The query format depends on your datasource.

Prometheus Datasource

avg(rate(node_cpu_seconds_total{mode!="idle"}[5m])) * 100

InfluxDB Datasource

from(bucket: "metrics")
  |> range(start: -5m)
  |> filter(fn: (r) => r._measurement == "cpu")
  |> mean()

Elasticsearch Datasource

Configure via Grafana's query builder.

Unified Alerting Integration

Webhook Receiver

Configure Grafana to send alerts to ReliaPulse:

  1. In Grafana, go to Alerting → Contact Points
  2. Add new contact point
  3. Select Webhook
  4. Enter ReliaPulse webhook URL:
    https://status.example.com/api/webhooks/grafana/{token}

Alert Rules

Grafana alerts can automatically:

  • Create incidents in ReliaPulse
  • Update component status
  • Trigger on-call notifications

Alert Payload

ReliaPulse processes Grafana's alert payload:

{
  "status": "firing",
  "alerts": [
    {
      "status": "firing",
      "labels": {
        "alertname": "HighCPU",
        "severity": "critical"
      },
      "annotations": {
        "summary": "CPU usage above 90%"
      }
    }
  ]
}

Dashboard Embedding

Embed Panels

Grafana panels can be embedded in custom widgets:

  1. In Grafana, open the panel
  2. Share → Embed
  3. Copy the iframe code
  4. Use in ReliaPulse custom HTML widget

Time Range Sync

Use URL parameters for dynamic time ranges:

&from=now-1h&to=now

Multi-Series Metrics

For queries returning multiple series:

  1. Enable Multi-Series Mode in metrics query
  2. Configure group-by tags
  3. Set aggregation method

Troubleshooting

Connection Failed

  • Verify Grafana URL includes protocol (https://)
  • Check API key has not expired
  • Ensure network connectivity

Query Errors

  • Test query in Grafana first
  • Check datasource configuration
  • Verify datasource is accessible

Webhook Not Received

  • Check contact point configuration
  • Verify webhook URL is correct
  • Check ReliaPulse webhook logs

Security

  • Use HTTPS for all connections
  • Rotate API keys periodically
  • Use service accounts instead of user tokens
  • Limit permissions to viewer role

Related