Overview
The Grafana integration enables Steadwing to access your Prometheus metrics and Loki logs during incident analysis. This helps our AI identify root causes faster by analyzing your observability data - from error rates and latency spikes to application logs and stack traces.Why Use Grafana with Steadwing?
Metrics Analysis
Analyze CPU, memory, error rates, and latency from Prometheus
Log Analysis
Search Loki for error messages, stack traces, and patterns
Smart Correlation
Automatically link metric spikes to error logs
Complete Picture
Combine observability data with code analysis for faster RCA
Setup Instructions
Step 1: Get Your Grafana URL
Your Grafana web address. Examples:- Grafana Cloud:
https://yourcompany.grafana.net - Self-hosted:
https://grafana.yourcompany.com - AWS EC2:
https://ec2-xx-xx-xx-xx.compute.amazonaws.com:3000 - On-premises:
https://10.0.1.50:3000
Works with any Grafana deployment - Cloud, self-hosted, or on-premises.
Step 2: Create a Service Account Token
- Open Grafana and navigate to Administration → Service Accounts
- Direct link:
https://your-grafana-url/org/serviceaccounts
- Direct link:
- Click Add service account
- Configure the account:
- Display name: Steadwing Integration (or your preferred name)
- Role: Viewer (read-only access)
- Click Create
- Click Add service account token
- Configure the token:
- Display name: Steadwing Token
- Expiration: Choose your preferred duration (or no expiration)
- Click Generate token
- Copy the token (starts with
glsa_...)
Step 3: Connect Grafana in Steadwing
- Navigate to Steadwing Settings
- Find the Grafana integration card
- Click to expand the collapsible form
- Fill in the required fields:
- Grafana URL: Your Grafana web address (e.g.,
https://yourcompany.grafana.net) - Service Account Token: Your token (starts with
glsa_)
- Grafana URL: Your Grafana web address (e.g.,
- Toggle the switch to Enable the integration
Step 4: Verify Connection
- Return to Steadwing Settings
- Confirm the Grafana integration shows as Connected
- You’re all set! Steadwing will now use your Grafana data during incident analysis
How It Works
When analyzing an incident, Steadwing automatically:- Checks your Grafana for Prometheus and Loki datasources
- Queries Prometheus metrics (if available) - error rates, CPU/memory usage, latency
- Queries Loki logs (if available) - error messages, stack traces, application logs
- Correlates metric spikes with log errors to find patterns
- Combines findings with code analysis to identify the root cause
- Provides evidence-based diagnosis with relevant metrics and logs
Requirements
- Grafana version: 9.0 or newer
- Service account role: Viewer (read-only)
- Datasources: At least one of:
- Prometheus (for metrics)
- Loki (for logs)
- Both (recommended for best results)
Datasource Flexibility
The integration automatically adapts to what you have:| Your Setup | What Happens |
|---|---|
| Prometheus only | Analyzes metrics (CPU, errors, latency) |
| Loki only | Analyzes logs (error messages, stack traces) |
| Both Prometheus + Loki | Best results! Correlates metrics with logs |
You don’t need both datasources - Steadwing uses whatever you have configured.
What Data Can Steadwing Access?
Prometheus Metrics:- Performance data (CPU, memory, latency)
- Error rates and request counts
- Custom application metrics
- Only data around incident timeframes
- Application logs and error messages
- Stack traces and exceptions
- Service logs for affected applications
- Only relevant time ranges
Uninstall
To disconnect the integration:- In Steadwing Settings, disable the Grafana integration
- In Grafana, delete the service account:
- Navigate to Administration → Service Accounts
- Find “Steadwing Integration” (or your chosen name)
- Click Delete service account
FAQs
Can Steadwing modify my dashboards or alerts?
Can Steadwing modify my dashboards or alerts?
No. Steadwing has read-only access and can only query data. It cannot modify any Grafana configuration, dashboards, alerts, or data.
Do I need both Prometheus and Loki?
Do I need both Prometheus and Loki?
No. The integration works with either one or both. Having both provides the best results since it can correlate metrics with logs.
Can I revoke access later?
Can I revoke access later?
Yes. Simply delete the service account token in Grafana anytime to immediately revoke access.
What if I only have Prometheus?
What if I only have Prometheus?
Perfect! Steadwing will analyze metrics like error rates, latency, CPU, and memory usage.
What if I only have Loki?
What if I only have Loki?
Great! Steadwing will analyze logs including error messages, stack traces, and patterns.
Does this work with self-hosted Grafana?
Does this work with self-hosted Grafana?
Yes! Works with Grafana Cloud, self-hosted, or on-premises installations.
How much data does it query?
How much data does it query?
Only relevant data around the incident timeframe (typically a few hours). Queries are optimized to focus on error patterns and anomalies.
What if no datasources are found?
What if no datasources are found?
Add at least one Prometheus or Loki datasource in Grafana, then reconnect the integration.