Skip to content
CloudOps
Newsletter
All prompts
AI for Prometheus & Monitoring Difficulty: Intermediate ClaudeChatGPT

Grafana Mixed Data Sources Panel Prompt

Build panels combining multiple data sources — Mixed DS, cross-DS variables, correlated queries from Prometheus + Loki + cloud metrics.

Target user
Engineers building cross-DS dashboards
Difficulty
Intermediate
Tools
Claude, ChatGPT

The prompt

You are a senior SRE who has built panels combining metrics from different sources — Prometheus + CloudWatch in one panel, Loki + Prometheus correlated.

I will provide:
- The DS combination
- Use case
- Current panel
- Symptom

Your job:

1. **Mixed DS panel**:
   - Select "Mixed" as DS
   - Each query picks its source
   - Combine in display
2. **For unit alignment**:
   - Different sources may have different units
   - Override per series
3. **For time alignment**:
   - Each DS may aggregate differently
   - Use `$__interval` consistently
4. **For correlated queries**:
   - Common time range
   - Common variable (env, region)
5. **For Prometheus + CloudWatch**:
   - Hybrid on-prem + cloud
   - Same panel
6. **For Prometheus + Loki**:
   - Metric series + log count
   - In single panel
7. **For variable scope**:
   - DS variable selects which
   - Conditional panel based on variable
8. **For panel performance**:
   - Multiple DS = compound query time

Mark DESTRUCTIVE: cross-DS panel with vastly different scrape rates (misaligned), DS variable change breaking panels.

---

DS combination: [DESCRIBE]
Use case: [DESCRIBE]
Symptom: [DESCRIBE]

Why this prompt works

Mixed DS enables cross-system views. This prompt walks design.

How to use it

  1. Use Mixed DS for the panel.
  2. Align time + variable.
  3. Watch performance.
  4. Test DS variable changes.

Patterns

Mixed DS panel

{
  "type": "timeseries",
  "datasource": "-- Mixed --",
  "targets": [
    {
      "datasource": { "uid": "prometheus" },
      "expr": "sum(rate(http_requests_total[5m]))",
      "legendFormat": "On-prem RPS"
    },
    {
      "datasource": { "uid": "cloudwatch" },
      "namespace": "AWS/ApplicationELB",
      "metricName": "RequestCount",
      "statistic": "Sum",
      "legendFormat": "AWS ELB RPS"
    }
  ]
}

Prometheus + Loki log count

{
  "type": "timeseries",
  "datasource": "-- Mixed --",
  "targets": [
    {
      "datasource": { "uid": "prometheus" },
      "expr": "rate(http_requests_total{job=\"$job\"}[$__interval])",
      "legendFormat": "Requests"
    },
    {
      "datasource": { "uid": "loki" },
      "expr": "sum(rate({job=\"$job\"} |= \"error\" [$__interval]))",
      "legendFormat": "Errors (log)"
    }
  ]
}

DS variable

Variable: $ds
Type: datasource
Type filter: prometheus

# Use in panel:
datasource: $ds

User picks DS at dashboard top; all panels switch.

Common findings this catches

  • Panel slow → multiple DS each query.
  • Series visible but wrong scale → unit mismatch.
  • Time alignment off → step / interval mismatch.
  • DS variable doesn’t apply to all → check panels.
  • Cloud DS rate limit → reduce query frequency.
  • Auth fail on one DS → token; per-DS auth.
  • Series naming collision → use legend format.

When to escalate

  • Cross-DS pattern across many dashboards — design review.
  • Cloud DS cost — finops.
  • Auth strategy — security.

Related prompts

Newsletter

Free: the DevOps AI Incident-Triage Cheat Sheet

Subscribe and we’ll send you the one-page cheat sheet — plus weekly AI prompts, automation ideas, and tool reviews for infrastructure engineers. One email a week. No spam, unsubscribe anytime.

  • AI Incident-Triage Cheat Sheet (PDF)
  • Access to 1,603 DevOps AI prompts
  • One practical workflow email per week