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
1
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)
2
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
3
Connect to Aurora
- In Aurora, navigate to Integrations > Grafana
- Enter your Grafana base URL (e.g.,
https://your-stack.grafana.net) - Paste your API token
- Click Connect
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:1
Get Webhook URL
In Aurora’s Grafana integration page, copy your unique webhook URL:
2
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
3
Configure Notification Policy
- Go to Alerting > Notification policies
- Edit the default policy or create a new one
- Add the Aurora contact point to receive alerts
- Save the policy
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
For detailed information about Grafana APIs, see: