{
  "uid": "gha-doctor",
  "title": "gha-doctor \u2014 GitHub Actions CI health",
  "description": "CI health, waste and cache telemetry from gha-doctor --prom. https://github.com/linnea-bakshi/gha-doctor",
  "tags": [
    "gha-doctor",
    "github-actions",
    "ci"
  ],
  "timezone": "browser",
  "editable": true,
  "graphTooltip": 1,
  "time": {
    "from": "now-24h",
    "to": "now"
  },
  "refresh": "",
  "schemaVersion": 39,
  "templating": {
    "list": [
      {
        "name": "datasource",
        "label": "Data source",
        "type": "datasource",
        "query": "prometheus",
        "current": {},
        "hide": 0
      },
      {
        "name": "repo",
        "label": "Repository",
        "type": "query",
        "datasource": {
          "type": "prometheus",
          "uid": "${datasource}"
        },
        "query": "label_values(gha_doctor_info, repo)",
        "refresh": 2,
        "sort": 1,
        "current": {},
        "hide": 0
      }
    ]
  },
  "annotations": {
    "list": []
  },
  "links": [
    {
      "title": "gha-doctor docs",
      "type": "link",
      "url": "https://linnea-bakshi.github.io/gha-doctor/",
      "targetBlank": true
    }
  ],
  "panels": [
    {
      "id": 1,
      "type": "row",
      "title": "Overview",
      "gridPos": {
        "x": 0,
        "y": 0,
        "w": 24,
        "h": 1
      },
      "collapsed": false,
      "panels": []
    },
    {
      "id": 2,
      "type": "gauge",
      "title": "Health score",
      "gridPos": {
        "x": 0,
        "y": 1,
        "w": 4,
        "h": 6
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "0\u2013100, static checks + run history. See docs/honesty.md for what gates the graded score.",
      "targets": [
        {
          "expr": "gha_doctor_health_score_points{repo=\"$repo\"}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "instant": true,
          "range": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "unit": "none",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "red",
                "value": null
              },
              {
                "color": "yellow",
                "value": 50
              },
              {
                "color": "green",
                "value": 80
              }
            ]
          },
          "min": 0,
          "max": 100
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      }
    },
    {
      "id": 3,
      "type": "stat",
      "title": "Findings",
      "gridPos": {
        "x": 4,
        "y": 1,
        "w": 4,
        "h": 6
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Current static findings by severity.",
      "targets": [
        {
          "expr": "gha_doctor_findings{repo=\"$repo\"}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "legendFormat": "{{severity}}",
          "instant": true,
          "range": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "unit": "none",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "yellow",
                "value": 1
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "orientation": "auto",
        "textMode": "auto",
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "noValue": "no data"
      }
    },
    {
      "id": 4,
      "type": "stat",
      "title": "Runs sampled",
      "gridPos": {
        "x": 8,
        "y": 1,
        "w": 4,
        "h": 3
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Workflow runs in the analysis sample.",
      "targets": [
        {
          "expr": "gha_doctor_runs_sampled{repo=\"$repo\"}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "instant": true,
          "range": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "unit": "none",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "orientation": "auto",
        "textMode": "auto",
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "noValue": "no data"
      }
    },
    {
      "id": 5,
      "type": "stat",
      "title": "Sample window",
      "gridPos": {
        "x": 8,
        "y": 4,
        "w": 4,
        "h": 3
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Oldest sampled run to report time. Short windows make the per-month framings in the report unreliable; gha-doctor itself refuses to project from <3 days.",
      "targets": [
        {
          "expr": "gha_doctor_last_run_timestamp_seconds{repo=\"$repo\"} - gha_doctor_sample_since_timestamp_seconds{repo=\"$repo\"}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "instant": true,
          "range": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "unit": "s",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "orientation": "auto",
        "textMode": "auto",
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "noValue": "no data"
      }
    },
    {
      "id": 6,
      "type": "stat",
      "title": "Report age",
      "gridPos": {
        "x": 12,
        "y": 1,
        "w": 4,
        "h": 3
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Since the scrape file was generated. If this grows, the scheduled gha-doctor job feeding the textfile collector has stopped.",
      "targets": [
        {
          "expr": "time() - gha_doctor_last_run_timestamp_seconds{repo=\"$repo\"}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "instant": true,
          "range": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "unit": "s",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "yellow",
                "value": 172800
              },
              {
                "color": "red",
                "value": 604800
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "orientation": "auto",
        "textMode": "auto",
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "noValue": "no data"
      }
    },
    {
      "id": 7,
      "type": "stat",
      "title": "Runs missing job data",
      "gridPos": {
        "x": 12,
        "y": 4,
        "w": 4,
        "h": 3
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "When >0, job-derived gauges (queue, cost, waste, flakiness) understate. Usually rate limiting; give the job a token.",
      "targets": [
        {
          "expr": "gha_doctor_runs_missing_job_data{repo=\"$repo\"}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "instant": true,
          "range": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "unit": "none",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "orange",
                "value": 1
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "orientation": "auto",
        "textMode": "auto",
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "noValue": "no data"
      }
    },
    {
      "id": 8,
      "type": "stat",
      "title": "Estimated compute value (sample)",
      "gridPos": {
        "x": 16,
        "y": 1,
        "w": 4,
        "h": 3
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "At GitHub's hosted-runner rates; self-hosted jobs excluded. Public repos ride free runners \u2014 value, not an invoice.",
      "targets": [
        {
          "expr": "gha_doctor_estimated_cost_usd{repo=\"$repo\"}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "instant": true,
          "range": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "unit": "currencyUSD",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "orientation": "auto",
        "textMode": "auto",
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "noValue": "no data"
      }
    },
    {
      "id": 9,
      "type": "stat",
      "title": "Wasted share of compute",
      "gridPos": {
        "x": 16,
        "y": 4,
        "w": 4,
        "h": 3
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Failed runs + retried attempts as a share of the sample's compute.",
      "targets": [
        {
          "expr": "gha_doctor_wasted_cost_usd{repo=\"$repo\"} / gha_doctor_estimated_cost_usd{repo=\"$repo\"}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "instant": true,
          "range": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "unit": "percentunit",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "yellow",
                "value": 0.1
              },
              {
                "color": "red",
                "value": 0.25
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "orientation": "auto",
        "textMode": "auto",
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "noValue": "no data"
      }
    },
    {
      "id": 10,
      "type": "stat",
      "title": "Flaky jobs",
      "gridPos": {
        "x": 20,
        "y": 1,
        "w": 2,
        "h": 3
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Jobs that both failed and succeeded on the same commit within the sample. Run gha-doctor --flaky-logs to name the tests.",
      "targets": [
        {
          "expr": "gha_doctor_flaky_jobs{repo=\"$repo\"}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "instant": true,
          "range": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "unit": "none",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "orange",
                "value": 1
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "orientation": "auto",
        "textMode": "auto",
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "noValue": "no data"
      }
    },
    {
      "id": 11,
      "type": "stat",
      "title": "Zombie crons",
      "gridPos": {
        "x": 22,
        "y": 1,
        "w": 2,
        "h": 3
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Scheduled workflows whose newest sampled runs are an unbroken failure streak. Revive or retire.",
      "targets": [
        {
          "expr": "gha_doctor_zombie_crons{repo=\"$repo\"}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "instant": true,
          "range": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "unit": "none",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 1
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "orientation": "auto",
        "textMode": "auto",
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "noValue": "no data"
      }
    },
    {
      "id": 12,
      "type": "stat",
      "title": "Self-hosted jobs",
      "gridPos": {
        "x": 20,
        "y": 4,
        "w": 2,
        "h": 3
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Sampled jobs on self-hosted runners \u2014 excluded from every cost estimate.",
      "targets": [
        {
          "expr": "gha_doctor_self_hosted_jobs{repo=\"$repo\"}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "instant": true,
          "range": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "unit": "none",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "orientation": "auto",
        "textMode": "auto",
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "noValue": "no data"
      }
    },
    {
      "id": 13,
      "type": "stat",
      "title": "Superseded runs completed",
      "gridPos": {
        "x": 22,
        "y": 4,
        "w": 2,
        "h": 3
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "PR runs a newer push made obsolete that ran to completion anyway \u2014 what D001's cancel-in-progress prevents.",
      "targets": [
        {
          "expr": "gha_doctor_superseded_completed_runs{repo=\"$repo\"}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "instant": true,
          "range": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "unit": "none",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "yellow",
                "value": 1
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "orientation": "auto",
        "textMode": "auto",
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "noValue": "no data"
      }
    },
    {
      "id": 14,
      "type": "row",
      "title": "Workflows",
      "gridPos": {
        "x": 0,
        "y": 7,
        "w": 24,
        "h": 1
      },
      "collapsed": false,
      "panels": []
    },
    {
      "id": 15,
      "type": "bargauge",
      "title": "Success ratio (decisive runs)",
      "gridPos": {
        "x": 0,
        "y": 8,
        "w": 8,
        "h": 8
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Successful share of runs that reached a verdict. Workflows with no decisive run in the sample are absent, not zero.",
      "targets": [
        {
          "expr": "gha_doctor_workflow_success_ratio{repo=\"$repo\"}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "legendFormat": "{{workflow}}",
          "instant": true,
          "range": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "unit": "percentunit",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "red",
                "value": null
              },
              {
                "color": "yellow",
                "value": 0.8
              },
              {
                "color": "green",
                "value": 0.95
              }
            ]
          },
          "min": 0,
          "max": 1
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "orientation": "horizontal",
        "displayMode": "gradient",
        "showUnfilled": true
      }
    },
    {
      "id": 16,
      "type": "timeseries",
      "title": "Run duration p50 \u2192 p95",
      "gridPos": {
        "x": 8,
        "y": 8,
        "w": 8,
        "h": 8
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Per workflow, decisive runs only. Snapshots accumulate into a trend as your scheduled gha-doctor job keeps writing the file.",
      "targets": [
        {
          "expr": "gha_doctor_workflow_duration_p50_seconds{repo=\"$repo\"}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "legendFormat": "{{workflow}} p50"
        },
        {
          "expr": "gha_doctor_workflow_duration_p95_seconds{repo=\"$repo\"}",
          "refId": "B",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "legendFormat": "{{workflow}} p95"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "unit": "s",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 17,
      "type": "timeseries",
      "title": "Avg queue time per workflow",
      "gridPos": {
        "x": 16,
        "y": 8,
        "w": 4,
        "h": 8
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Mean time a job waited for a runner.",
      "targets": [
        {
          "expr": "gha_doctor_workflow_avg_queue_seconds{repo=\"$repo\"}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "legendFormat": "{{workflow}}"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "unit": "s",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 18,
      "type": "bargauge",
      "title": "Compute value per workflow",
      "gridPos": {
        "x": 20,
        "y": 8,
        "w": 4,
        "h": 8
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Sampled runs, hosted-runner rates; self-hosted excluded.",
      "targets": [
        {
          "expr": "gha_doctor_workflow_estimated_cost_usd{repo=\"$repo\"}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "legendFormat": "{{workflow}}",
          "instant": true,
          "range": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "unit": "currencyUSD",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "blue",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "orientation": "horizontal",
        "displayMode": "gradient",
        "showUnfilled": true
      }
    },
    {
      "id": 19,
      "type": "row",
      "title": "Waste",
      "gridPos": {
        "x": 0,
        "y": 16,
        "w": 24,
        "h": 1
      },
      "collapsed": false,
      "panels": []
    },
    {
      "id": 20,
      "type": "timeseries",
      "title": "Where compute goes to die",
      "gridPos": {
        "x": 0,
        "y": 17,
        "w": 12,
        "h": 8
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Billable-weighted seconds across the sample. Failed runs and retries are gha-doctor's waste bucket; the round-up tax is billed-but-unused ceil-to-the-minute time.",
      "targets": [
        {
          "expr": "gha_doctor_waste_failed_run_seconds{repo=\"$repo\"}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "legendFormat": "failed runs"
        },
        {
          "expr": "gha_doctor_waste_retry_seconds{repo=\"$repo\"}",
          "refId": "B",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "legendFormat": "retried attempts"
        },
        {
          "expr": "gha_doctor_rounding_seconds{repo=\"$repo\"}",
          "refId": "C",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "legendFormat": "round-up tax"
        },
        {
          "expr": "gha_doctor_superseded_wasted_seconds{repo=\"$repo\"}",
          "refId": "D",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "legendFormat": "superseded PR runs"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "unit": "s",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 21,
      "type": "timeseries",
      "title": "Waste in dollars",
      "gridPos": {
        "x": 12,
        "y": 17,
        "w": 12,
        "h": 8
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Value of the waste and round-up buckets at hosted-runner rates.",
      "targets": [
        {
          "expr": "gha_doctor_wasted_cost_usd{repo=\"$repo\"}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "legendFormat": "failed + retried"
        },
        {
          "expr": "gha_doctor_rounding_cost_usd{repo=\"$repo\"}",
          "refId": "B",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "legendFormat": "round-up tax"
        },
        {
          "expr": "gha_doctor_superseded_wasted_cost_usd{repo=\"$repo\"}",
          "refId": "C",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "legendFormat": "superseded PR runs"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "unit": "currencyUSD",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 22,
      "type": "row",
      "title": "Cache & artifacts",
      "gridPos": {
        "x": 0,
        "y": 25,
        "w": 24,
        "h": 1
      },
      "collapsed": false,
      "panels": []
    },
    {
      "id": 23,
      "type": "gauge",
      "title": "Cache vs 10 GB soft limit",
      "gridPos": {
        "x": 0,
        "y": 26,
        "w": 5,
        "h": 6
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Above 1.0 GitHub evicts by LRU \u2014 hit rates degrade. gha-doctor's report names the biggest offenders.",
      "targets": [
        {
          "expr": "gha_doctor_cache_limit_ratio{repo=\"$repo\"}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "instant": true,
          "range": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "unit": "percentunit",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "yellow",
                "value": 0.8
              },
              {
                "color": "red",
                "value": 1.0
              }
            ]
          },
          "min": 0,
          "max": 1.2
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      }
    },
    {
      "id": 24,
      "type": "stat",
      "title": "Cache size",
      "gridPos": {
        "x": 5,
        "y": 26,
        "w": 4,
        "h": 3
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Total Actions cache storage currently held.",
      "targets": [
        {
          "expr": "gha_doctor_cache_size_bytes{repo=\"$repo\"}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "instant": true,
          "range": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "unit": "bytes",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "orientation": "auto",
        "textMode": "auto",
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "noValue": "no data"
      }
    },
    {
      "id": 25,
      "type": "stat",
      "title": "Cache entries",
      "gridPos": {
        "x": 5,
        "y": 29,
        "w": 4,
        "h": 3
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "targets": [
        {
          "expr": "gha_doctor_cache_entries{repo=\"$repo\"}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "instant": true,
          "range": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "unit": "none",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "orientation": "auto",
        "textMode": "auto",
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "noValue": "no data"
      }
    },
    {
      "id": 26,
      "type": "stat",
      "title": "Stale cache (7d+ untouched)",
      "gridPos": {
        "x": 9,
        "y": 26,
        "w": 4,
        "h": 3
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Examined entries; see the report for sampling notes.",
      "targets": [
        {
          "expr": "gha_doctor_cache_stale_bytes{repo=\"$repo\"}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "instant": true,
          "range": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "unit": "bytes",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "yellow",
                "value": 1073741824
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "orientation": "auto",
        "textMode": "auto",
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "noValue": "no data"
      }
    },
    {
      "id": 27,
      "type": "stat",
      "title": "PR-ref cache (unreachable)",
      "gridPos": {
        "x": 9,
        "y": 29,
        "w": 4,
        "h": 3
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Held by refs/pull/* keys \u2014 unreachable from other branches.",
      "targets": [
        {
          "expr": "gha_doctor_cache_pr_ref_bytes{repo=\"$repo\"}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "instant": true,
          "range": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "unit": "bytes",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "yellow",
                "value": 1073741824
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "orientation": "auto",
        "textMode": "auto",
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "noValue": "no data"
      }
    },
    {
      "id": 28,
      "type": "stat",
      "title": "Artifact entries",
      "gridPos": {
        "x": 13,
        "y": 26,
        "w": 4,
        "h": 3
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Including expired artifacts still indexed.",
      "targets": [
        {
          "expr": "gha_doctor_artifact_entries{repo=\"$repo\"}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "instant": true,
          "range": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "unit": "none",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "orientation": "auto",
        "textMode": "auto",
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "noValue": "no data"
      }
    },
    {
      "id": 29,
      "type": "text",
      "title": "About this dashboard",
      "gridPos": {
        "x": 13,
        "y": 29,
        "w": 11,
        "h": 3
      },
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "options": {
        "mode": "markdown",
        "content": "Fed by [gha-doctor](https://github.com/linnea-bakshi/gha-doctor) `--prom` via node_exporter's textfile collector or a Pushgateway. **An absent series is not a zero** \u2014 unmeasured aggregates are simply missing, so \u201cNo data\u201d here means *not measured*, not *fine* ([honesty policy](https://linnea-bakshi.github.io/gha-doctor/honesty))."
      }
    }
  ]
}
