{
  "title": "Prometheus Health (Ops)",
  "uid": "ops-prom-health",
  "tags": ["ops","prometheus","health"],
  "time": { "from": "now-1h", "to": "now" },
  "schemaVersion": 42,
  "panels": [
    {
      "type": "stat",
      "title": "Targets DOWN (total)",
      "gridPos": { "x": 0, "y": 0, "w": 6, "h": 4 },
      "datasource": "prometheus",
      "fieldConfig": { "defaults": { "unit": "none" }, "overrides": [] },
      "options": { "reduceOptions": { "calcs": ["lastNotNull"], "fields": "" } },
      "targets": [
        { "refId": "A", "expr": "sum(1 - up)" }
      ]
    },
    {
      "type": "stat",
      "title": "Alerts firing",
      "gridPos": { "x": 6, "y": 0, "w": 6, "h": 4 },
      "datasource": "prometheus",
      "fieldConfig": { "defaults": { "unit": "none" }, "overrides": [] },
      "options": { "reduceOptions": { "calcs": ["lastNotNull"], "fields": "" } },
      "targets": [
        { "refId": "A", "expr": "count(ALERTS{alertstate=\"firing\"})" }
      ]
    },
    {
      "type": "stat",
      "title": "Ingest rate (samples/s)",
      "gridPos": { "x": 12, "y": 0, "w": 12, "h": 4 },
      "datasource": "prometheus",
      "fieldConfig": { "defaults": { "unit": "ops" }, "overrides": [] },
      "options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
      "targets": [
        { "refId": "A", "expr": "rate(prometheus_tsdb_head_samples_appended_total[5m])" }
      ]
    },
    {
      "type": "timeseries",
      "title": "Targets UP by job",
      "gridPos": { "x": 0, "y": 4, "w": 12, "h": 8 },
      "datasource": "prometheus",
      "fieldConfig": { "defaults": { "unit": "none" }, "overrides": [] },
      "options": { "legend": { "showLegend": true, "placement": "bottom" } },
      "targets": [
        { "refId": "A", "expr": "sum by(job)(up)" }
      ]
    },
    {
      "type": "timeseries",
      "title": "Scrape duration (s) by job",
      "gridPos": { "x": 12, "y": 4, "w": 12, "h": 8 },
      "datasource": "prometheus",
      "fieldConfig": { "defaults": { "unit": "s" }, "overrides": [] },
      "options": { "legend": { "showLegend": true, "placement": "bottom" } },
      "targets": [
        { "refId": "A", "expr": "avg by(job)(scrape_duration_seconds)" }
      ]
    },
    {
      "type": "timeseries",
      "title": "Rule group eval duration (s)",
      "gridPos": { "x": 0, "y": 12, "w": 12, "h": 8 },
      "datasource": "prometheus",
      "fieldConfig": { "defaults": { "unit": "s" }, "overrides": [] },
      "options": { "legend": { "showLegend": true, "placement": "bottom" } },
      "targets": [
        { "refId": "A", "expr": "max by(rule_group) (prometheus_rule_group_last_duration_seconds)" }
      ]
    },
    {
      "type": "timeseries",
      "title": "TSDB head chunks",
      "gridPos": { "x": 12, "y": 12, "w": 12, "h": 8 },
      "datasource": "prometheus",
      "fieldConfig": { "defaults": { "unit": "short" }, "overrides": [] },
      "options": { "legend": { "showLegend": true, "placement": "bottom" } },
      "targets": [
        { "refId": "A", "expr": "prometheus_tsdb_head_chunks" }
      ]
    }
  ]
}
