-
Notifications
You must be signed in to change notification settings - Fork 1
Troubleshooting
leoswing edited this page May 25, 2026
·
1 revision
This page covers common issues when using CompareQueries (leoswing-comparequeries-datasource) in dashboards and Grafana Alerting.
- Confirm Grafana version and plugin version.
- For Grafana 13+, use Target Datasource flow (not legacy RefId).
- In dashboards, set panel datasource to
-- Mixed --. - Verify your target datasource query works by itself first.
- Check CompareQueries datasource auth mode:
- Default:
No Authentication - If backend/alerting fails auth:
Basic authentication+ Service Account Token
- Default:
- For alert rules, configure query directly in CompareQueries editor (not panel mixed flow).
Possible causes and fixes:
- Target query itself returns no data.
- Run the same query directly against the target datasource first.
- Panel datasource is not
-- Mixed --.- Switch panel datasource to
-- Mixed --.
- Switch panel datasource to
- Time range too short for your shift amount.
- If shift is
1w, use a panel range that still contains historical points.
- If shift is
- Invalid shift syntax.
- Use formats like
1d,1w,30m,2h.
- Use formats like
- Grafana 13+ does not support the old third-party RefId mixed flow.
- Fix:
- Open CompareQueries query row.
- Click Migrate to Target Datasource.
- Select target datasource.
- Rebuild query inline.
- Save dashboard.
- Check Process TimeShift option:
- Enabled: shifted data is moved to align with current time window.
- Disabled: historical timestamps stay in original time.
- Backend query cannot authenticate to Grafana API.
- Fix:
- Open CompareQueries datasource settings.
- Set
AuthenticationtoBasic authentication. - Set
Service Account Token(Viewer or higher). - Set
Grafana URLonly if auto-detection is incorrect.
- Panel mixed flow and backend alerting flow are different.
- In alerting, always configure CompareQueries query directly:
- Target Datasource
- Inline target query
- Time shift rows
- Verify plugin ID:
leoswing-comparequeries-datasource. - Restart Grafana after install/upgrade.
- Check server logs for plugin load errors.
Install via CLI:
grafana-cli plugins install leoswing-comparequeries-datasource
## Symptom: UI looks stale after upgrade
- Hard refresh browser cache.
- Restart Grafana service/container.
- Reopen panel editor.
———
## 5. Debugging Tips for Self-Hosted Grafana
Enable debug logs and inspect backend plugin logs:
docker logs -f <grafana-container-name>
Useful log keywords:
- Plugin Request Started
- Executing shifted query
- Proxying query to Grafana
- Plugin Request Completed
For local dev environments, you can use:
- GF_LOG_LEVEL=debug
- GF_LOG_FILTERS=plugin.leoswing-comparequeries-datasource:debug
———
## 6. Before Opening an Issue
Please include:
1. Grafana version
2. CompareQueries plugin version
3. Target datasource type (Prometheus/Loki/Elasticsearch/SQL/other)
4. Whether this is Dashboard or Alerting
5. Query JSON (with secrets removed)
6. Relevant Grafana logs and screenshots
Issue tracker:
https://github.com/leoswing/comparequeries-datasource-rc/issues