Overview
Connect CodeWolf to Grafana to create custom dashboards and visualizations for your code quality, performance, and security metrics.Prerequisites
- Grafana instance (8.0+)
- Admin access to Grafana
- CodeWolf account and API key
Setup
1
Install CodeWolf data source plugin
In Grafana, navigate to Configuration > Data sources > Add data source.Search for “CodeWolf” and click Install.
If the plugin isn’t available in the marketplace, you can install it manually from the CodeWolf GitHub repository.
2
Configure data source
After installation, configure the CodeWolf data source:
- Name: CodeWolf
- URL:
https://api.codewolf.ai - API Key: Your CodeWolf API key from the dashboard
3
Import dashboards
Import pre-built CodeWolf dashboards:Go to Dashboards > Import and use these dashboard IDs:
- 15001: Code Quality Overview
- 15002: Security Metrics
- 15003: Performance Monitoring
- 15004: Deployment Tracking
Available metrics
Query these CodeWolf metrics in Grafana:Code quality
codewolf_quality_score: Overall code quality score (0-100)codewolf_complexity: Cyclomatic complexitycodewolf_duplication: Code duplication percentagecodewolf_coverage: Test coverage percentage
Security
codewolf_vulnerabilities_total: Total security vulnerabilitiescodewolf_vulnerabilities_by_severity: Vulnerabilities grouped by severitycodewolf_security_score: Security posture score
Performance
codewolf_build_duration: Build time in secondscodewolf_test_duration: Test execution timecodewolf_deployment_frequency: Deployments per day
Activity
codewolf_commits_total: Total commitscodewolf_pull_requests: Pull request countcodewolf_contributors: Active contributors
Dashboard examples
Code quality dashboard
- Quality score trend over time
- Repository comparison
- Top issues by category
- Coverage vs. complexity scatter plot
Security dashboard
Monitor security metrics:- Vulnerability severity breakdown (pie chart)
- New vulnerabilities over time (time series)
- Mean time to remediation (stat panel)
- Security score by project (bar chart)
Performance dashboard
Track development velocity:- Build duration trend
- Test execution time
- Deployment frequency
- CI/CD pipeline success rate
Query editor
Use the CodeWolf query editor in Grafana:- Metrics
- Logs
- Alerts
Select from available metrics, apply filters, and choose aggregation methods.
Alerting
Create Grafana alerts based on CodeWolf metrics:1
Define alert rule
2
Configure notification channel
Send alerts to Slack, email, PagerDuty, or other channels.
3
Set alert message
Variables
Use dashboard variables for dynamic filtering:$repository: Filter by repository$branch: Filter by branch$environment: Filter by environment$time_range: Dynamic time range selection
Annotations
Display CodeWolf events as Grafana annotations:- Deployment markers
- Release tags
- Security scan completions
- Critical alerts
Troubleshooting
Data source connection failed
Data source connection failed
- Verify your API key is correct and active
- Check that Grafana can reach
https://api.codewolf.ai - Ensure firewall rules allow outbound HTTPS traffic
- Confirm your CodeWolf account has API access enabled
No data in panels
No data in panels
- Check the time range includes data points
- Verify metric names are spelled correctly
- Ensure filters aren’t excluding all data
- Confirm your account has access to the selected repositories
Slow query performance
Slow query performance
- Reduce the time range for queries
- Use aggregation to limit data points
- Enable query caching in data source settings
- Consider downsampling high-frequency metrics

