Skip to content

Commit

Permalink
update Available runners panel to include max expected
Browse files Browse the repository at this point in the history
  • Loading branch information
cbartz committed Oct 25, 2024
1 parent f438372 commit 7172308
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/reference/cos.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The "GitHub Self-Hosted Runner Metrics" metrics dashboard presents the following

- General: Displays general metrics about the charm and runners, such as:
- Lifecycle counters: Tracks the frequency of Runner initialisation, start, stop, and crash events.
- Available runners: A horizontal bar graph showing the number of runners available during the last reconciliation event. Note: This data is updated after each reconciliation event and is not real-time.
- Available runners: A horizontal bar graph showing the number of runners available (and max expected) during the last reconciliation event. Note: This data is updated after each reconciliation event and is not real-time.
- Runners after reconciliation: A time series graph showing the number of runners marked as active/idle and the number of expected runners during the last reconciliation event over time. Note: This data is updated after each reconciliation event and is not real-time.
- Duration observations: Each data point aggregates the last hour and shows the 50th, 90th, 95th percentile and maximum durations for:
- Runner installation
Expand Down
38 changes: 35 additions & 3 deletions src/grafana_dashboards/metrics.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
"type": "loki",
"uid": "${lokids}"
},
"description": "Shows the number of available runners per application. Note: Available equals idle after reconciliation and is not a real-time metric as it is only updated after each reconciliation interval for each unit.",
"description": "Shows the number of available (and max expected) runners per application. Note: Available equals idle after reconciliation and is not a real-time metric as it is only updated after each reconciliation interval for each unit.\n\nNote that there is no maximum expected number of reactive runners.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -229,6 +229,26 @@
"value": "Available"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Value #B"
},
"properties": [
{
"id": "displayName",
"value": "Max possible"
},
{
"id": "custom.axisPlacement",
"value": "left"
},
{
"id": "custom.fillOpacity",
"value": 0
}
]
}
]
},
Expand All @@ -248,11 +268,11 @@
"calcs": [],
"displayMode": "list",
"placement": "right",
"showLegend": false
"showLegend": true
},
"orientation": "horizontal",
"showValue": "always",
"stacking": "none",
"stacking": "normal",
"tooltip": {
"mode": "single",
"sort": "none"
Expand All @@ -272,6 +292,18 @@
"legendFormat": "",
"queryType": "instant",
"refId": "A"
},
{
"datasource": {
"type": "loki",
"uid": "${lokids}"
},
"editorMode": "code",
"expr": "sum by(flavor)(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\",expected_runners=\"expected_runners\",flavor=\"flavor\" | __error__=\"\" | event=\"reconciliation\" | unwrap expected_runners[$__range]))",
"hide": false,
"legendFormat": "",
"queryType": "instant",
"refId": "B"
}
],
"title": "Available Runners",
Expand Down

0 comments on commit 7172308

Please sign in to comment.