Authentication
Grafana uses API Token (Bearer token) authentication.Prerequisites
- Grafana Cloud account or self-hosted Grafana instance
- Permissions to create service accounts (Grafana Cloud) or API tokens (self-hosted)
Setup Steps
Create Service Account (Grafana Cloud)
- Go to Grafana Cloud and select your stack
- Navigate to Administration > Service accounts
- Click Add service account
- Name:
Aurora, Role:Viewer - Click Add service account token
- Copy the generated token (you won’t see it again)
Create API Token (Self-Hosted)
For self-hosted Grafana:
- Go to Configuration > API Keys
- Click Add API key
- Name:
Aurora, Role:Viewer - Copy the generated token
Configuration
No environment variables are required. API tokens are entered through the Aurora UI.Self-Hosted Grafana
For self-hosted instances, provide your Grafana URL during connection:Webhook Setup (Optional)
Receive real-time alerts from Grafana Alerting:Create Contact Point
- In Grafana, go to Alerting > Contact points
- Click + Add contact point
- Name:
Aurora - Type:
Webhook - URL: Paste your Aurora webhook URL
- Click Test to verify connectivity
- Save the contact point
Development with ngrok
For local development:.env
What Aurora Can Query
Once connected, Aurora can:Organization Info
- Retrieve organization details
- Verify connection status
- Access user profile information
GET /grafana/status
Response:
Webhook Alerts
- Receive real-time alerts from Grafana
- Auto-create incidents from firing alerts
- Track alert state transitions (firing, resolved)
- Correlate related alerts
- Generate AI-powered root cause analysis
- Alert UID and title
- Alert state (alerting, resolved, no_data)
- Rule name and URL
- Dashboard and panel URLs
- Labels and annotations
- Alert values and evaluation info
GET /grafana/alerts
Parameters:
limit- Number of alerts (default: 50)offset- Pagination offset (default: 0)state- Filter by state (alerting, resolved, no_data)
Troubleshooting
Connection Failed- Verify API token is valid and not expired
- Check base URL is correct and accessible
- Ensure service account has at least
Viewerrole - For self-hosted: verify Aurora can reach your Grafana instance
- Verify
NGROK_URLis set correctly (for local development) - Ensure ngrok tunnel is running
- Check contact point is configured with correct webhook URL
- Send a test notification from Grafana contact point settings
- Verify notification policy routes alerts to Aurora contact point
- Use format:
https://your-stack.grafana.net - Do not include
/apior other paths - Ensure URL uses HTTPS (HTTP will be auto-upgraded)
API Reference
Base Path:/grafana
| Method | Endpoint | Description |
|---|---|---|
| POST | /connect | Connect Grafana account |
| GET | /status | Check connection status |
| DELETE | /disconnect | Remove Grafana connection |
| GET | /alerts | List webhook alerts |
| POST | /alerts/webhook/{user_id} | Receive webhooks |
| GET | /alerts/webhook-url | Get webhook URL |