Skip to content

Commit

Permalink
Merge branch 'main' into docs/ssh-debug-integration
Browse files Browse the repository at this point in the history
  • Loading branch information
yanksyoon authored Jan 22, 2024
2 parents 8044dc7 + 87f6248 commit 5c68588
Show file tree
Hide file tree
Showing 3 changed files with 200 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![CharmHub Badge](https://charmhub.io/github-runner-operator/badge.svg)](https://charmhub.io/github-runner-operator)
[![CharmHub Badge](https://charmhub.io/github-runner/badge.svg)](https://charmhub.io/github-runner)
[![Promote charm](https://github.com/canonical/github-runner-operator/actions/workflows/promote_charm.yaml/badge.svg)](https://github.com/canonical/github-runner-operator/actions/workflows/promote_charm.yaml)
[![Discourse Status](https://img.shields.io/discourse/status?server=https%3A%2F%2Fdiscourse.charmhub.io&style=flat&label=CharmHub%20Discourse)](https://discourse.charmhub.io)

Expand Down
6 changes: 5 additions & 1 deletion docs/reference/cos.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ The "GitHub Self-Hosted Runner Metrics" metrics dashboard presents the following

The "GitHub Self-Hosted Runner Metrics (Long-Term)" metrics dashboard displays the following rows:

- General: Displays a panel showing the number of jobs per day.
- General: Contains the following panels:
- Total Jobs
- Total unique repositories
- Timeseries chart displaying the number of jobs per day
- Percentage of jobs with low queue time (less than 60 seconds)



Expand Down
201 changes: 194 additions & 7 deletions src/grafana_dashboards/metrics_longterm.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 164,
"id": 168,
"links": [],
"liveNow": false,
"panels": [
Expand All @@ -42,6 +42,130 @@
"title": "General",
"type": "row"
},
{
"datasource": {
"type": "loki",
"uid": "${lokids}"
},
"fieldConfig": {
"defaults": {
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 1
},
"id": 16,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.2.1",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${lokids}"
},
"editorMode": "code",
"expr": "sum(count_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\" | event=\"runner_start\"[$__range]))",
"queryType": "instant",
"refId": "A"
}
],
"title": "Total Jobs",
"type": "stat"
},
{
"datasource": {
"type": "loki",
"uid": "${lokids}"
},
"fieldConfig": {
"defaults": {
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 1
},
"id": 14,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.2.1",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${lokids}"
},
"editorMode": "code",
"expr": "count(count by(repo)(count_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\" | event=\"runner_start\" | json repo=\"repo\"[$__range])))",
"queryType": "instant",
"refId": "A"
}
],
"title": "Total Repositories",
"type": "stat"
},
{
"datasource": {
"type": "loki",
Expand All @@ -58,9 +182,9 @@
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"barAlignment": -1,
"drawStyle": "bars",
"fillOpacity": 100,
"gradientMode": "none",
"hideFrom": {
"legend": false,
Expand Down Expand Up @@ -104,7 +228,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 1
"y": 9
},
"hideTimeOverride": false,
"id": 3,
Expand Down Expand Up @@ -137,9 +261,72 @@
"resolution": 1
}
],
"title": "Jobs per day",
"title": "Jobs per Day",
"transformations": [],
"type": "timeseries"
},
{
"datasource": {
"type": "loki",
"uid": "${lokids}"
},
"description": "Percentage of jobs queued for less than 60 seconds",
"fieldConfig": {
"defaults": {
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 9
},
"id": 18,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.2.1",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${lokids}"
},
"editorMode": "code",
"expr": "((sum(count_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\" | event=\"runner_start\" | duration<60 | __error__=\"\"[$__range])) / sum(count_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\" | event=\"runner_start\" | duration>=0 | __error__=\"\"[$__range]))) * 100)",
"queryType": "instant",
"refId": "A"
}
],
"title": "Jobs with Queue Time Less Than 60 Seconds (Percentage)",
"type": "stat"
}
],
"refresh": false,
Expand Down Expand Up @@ -352,6 +539,6 @@
"timezone": "",
"title": "GitHub Self-Hosted Runner Metrics (Long-Term)",
"uid": "5da1c1eea77432e7",
"version": 1,
"version": 2,
"weekStart": ""
}

0 comments on commit 5c68588

Please sign in to comment.