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
- Go to Dashboard → Settings → Integrations
- Click Add Integration
- Select Grafana
- Fill in the configuration:
| Field | Description | Example |
|---|---|---|
| Name | Friendly name | Production Grafana |
| URL | Grafana API URL | https://grafana.example.com |
| API Key | Service account token | glsa_xxx... |
Generate API Key
In Grafana:
- Go to Administration → Service Accounts
- Create new service account
- Add token with
Viewerrole - 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])) * 100InfluxDB 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:
- In Grafana, go to Alerting → Contact Points
- Add new contact point
- Select Webhook
- 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:
- In Grafana, open the panel
- Share → Embed
- Copy the iframe code
- Use in ReliaPulse custom HTML widget
Time Range Sync
Use URL parameters for dynamic time ranges:
&from=now-1h&to=nowMulti-Series Metrics
For queries returning multiple series:
- Enable Multi-Series Mode in metrics query
- Configure group-by tags
- 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