Skip to content

Commit

Permalink
add max job queue duration panel (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbartz committed Aug 28, 2024
1 parent 789b3a1 commit 841f318
Showing 1 changed file with 112 additions and 16 deletions.
128 changes: 112 additions & 16 deletions src/grafana_dashboards/metrics.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 293,
"id": 537,
"links": [],
"liveNow": false,
"panels": [
Expand Down Expand Up @@ -405,7 +405,7 @@
"type": "loki",
"uid": "${lokids}"
},
"description": "This panel totals the number of idle runners reported by the charm units after a reconciliation event. Note that there may be active runners in the time between reconciliations which will not be shown in this panel.",
"description": "All aggregations are based on a 1-hour time period.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -441,7 +441,6 @@
"mode": "off"
}
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
Expand All @@ -456,7 +455,7 @@
}
]
},
"unit": "none"
"unit": "s"
},
"overrides": []
},
Expand All @@ -466,13 +465,13 @@
"x": 12,
"y": 9
},
"id": 7,
"id": 23,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": false
"showLegend": true
},
"tooltip": {
"mode": "single",
Expand All @@ -485,16 +484,16 @@
"type": "loki",
"uid": "${lokids}"
},
"editorMode": "code",
"expr": "sum by(filename)(last_over_time({filename=\"/var/log/github-runner-metrics.log\", juju_application=~\"$juju_application\", juju_model=~\"$juju_model\", juju_model_uuid=~\"$juju_model_uuid\", juju_unit=~\"$juju_unit\"} | json event=\"event\",idle_runners=\"idle_runners\",flavor=\"flavor\" | event=\"reconciliation\" | flavor=~\"$flavor\" | unwrap idle_runners[60m]))",
"editorMode": "builder",
"expr": "max_over_time({filename=\"/var/log/github-runner-metrics.log\", juju_application=~\"$juju_application\", juju_model=~\"$juju_model\", juju_model_uuid=~\"$juju_model_uuid\", juju_unit=~\"$juju_unit\"} | json event=\"event\", duration=\"queue_duration\", flavor=\"flavor\" | __error__=`` | event = `runner_start` | flavor =~ `$flavor` | unwrap duration [1h]) by (flavor)",
"hide": false,
"legendFormat": "Idle",
"key": "Q-9302bc4d-cce0-4674-bad5-353257fdd2f4-0",
"legendFormat": "{{flavor}}",
"queryType": "range",
"refId": "D"
"refId": "E"
}
],
"title": "Idle Runners after Reconciliation",
"transformations": [],
"title": "Max Job Queue Duration By Flavour",
"type": "timeseries"
},
{
Expand Down Expand Up @@ -631,6 +630,103 @@
"title": "Runner Installation Duration (Percentile)",
"type": "timeseries"
},
{
"datasource": {
"type": "loki",
"uid": "${lokids}"
},
"description": "This panel totals the number of idle runners reported by the charm units after a reconciliation event. Note that there may be active runners in the time between reconciliations which will not be shown in this panel.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 17
},
"id": 7,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": false
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${lokids}"
},
"editorMode": "code",
"expr": "sum by(filename)(last_over_time({filename=\"/var/log/github-runner-metrics.log\", juju_application=~\"$juju_application\", juju_model=~\"$juju_model\", juju_model_uuid=~\"$juju_model_uuid\", juju_unit=~\"$juju_unit\"} | json event=\"event\",idle_runners=\"idle_runners\",flavor=\"flavor\" | event=\"reconciliation\" | flavor=~\"$flavor\" | unwrap idle_runners[60m]))",
"hide": false,
"legendFormat": "Idle",
"queryType": "range",
"refId": "D"
}
],
"title": "Idle Runners after Reconciliation",
"transformations": [],
"type": "timeseries"
},
{
"datasource": {
"type": "loki",
Expand Down Expand Up @@ -694,7 +790,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 17
"y": 25
},
"id": 4,
"options": {
Expand Down Expand Up @@ -828,7 +924,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 25
"y": 33
},
"id": 6,
"options": {
Expand Down Expand Up @@ -905,7 +1001,7 @@
"h": 1,
"w": 24,
"x": 0,
"y": 33
"y": 41
},
"id": 12,
"panels": [
Expand Down Expand Up @@ -1828,6 +1924,6 @@
"timepicker": {},
"timezone": "",
"title": "GitHub Self-Hosted Runner Metrics",
"version": 13,
"version": 14,
"weekStart": ""
}

0 comments on commit 841f318

Please sign in to comment.