Skip to content

Commit

Permalink
use barchart
Browse files Browse the repository at this point in the history
  • Loading branch information
cbartz committed May 28, 2024
1 parent 89eef8a commit 0899ba0
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 43 deletions.
78 changes: 49 additions & 29 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": 227,
"id": 263,
"links": [],
"liveNow": false,
"panels": [
Expand Down Expand Up @@ -165,12 +165,30 @@
"type": "loki",
"uid": "${lokids}"
},
"description": "Visualises the number of jobs started per application.",
"description": "Visualises the number of runners created per application.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-GrYlRd"
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineWidth": 1,
"scaleDistribution": {
"type": "linear"
}
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
Expand All @@ -184,7 +202,8 @@
"value": 80
}
]
}
},
"unit": "short"
},
"overrides": []
},
Expand All @@ -196,16 +215,24 @@
},
"id": 22,
"options": {
"displayMode": "lcd",
"minVizHeight": 10,
"minVizWidth": 0,
"orientation": "horizontal",
"reduceOptions": {
"barRadius": 0,
"barWidth": 0.97,
"groupWidth": 0.7,
"legend": {
"calcs": [],
"fields": "",
"values": true
"displayMode": "list",
"placement": "right",
"showLegend": false
},
"orientation": "horizontal",
"showValue": "always",
"stacking": "none",
"tooltip": {
"mode": "single",
"sort": "none"
},
"showUnfilled": true
"xTickLabelRotation": 0,
"xTickLabelSpacing": 0
},
"pluginVersion": "9.2.1",
"targets": [
Expand All @@ -215,14 +242,14 @@
"uid": "${lokids}"
},
"editorMode": "code",
"expr": "sum by(flavor)(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\",flavor=\"flavor\" | event=\"runner_start\"[$__range]))",
"expr": "sum by(flavor)(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\",flavor=\"flavor\" | event=\"runner_installed\"[$__range]))",
"legendFormat": "",
"queryType": "instant",
"refId": "A"
}
],
"title": "Jobs per Application",
"type": "bargauge"
"title": "Runners created per Application",
"type": "barchart"
},
{
"collapsed": false,
Expand Down Expand Up @@ -926,8 +953,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
Expand Down Expand Up @@ -1020,8 +1046,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
Expand Down Expand Up @@ -1114,8 +1139,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
Expand Down Expand Up @@ -1208,8 +1232,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
Expand Down Expand Up @@ -1302,8 +1325,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
Expand Down Expand Up @@ -1396,8 +1418,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
Expand Down Expand Up @@ -1500,8 +1521,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
Expand Down
55 changes: 41 additions & 14 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": 228,
"id": 264,
"links": [],
"liveNow": false,
"panels": [
Expand Down Expand Up @@ -109,12 +109,30 @@
"type": "loki",
"uid": "${lokids}"
},
"description": "Visualises the number of jobs started per application.",
"description": "Visualises the number of runners created per application..",
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-GrYlRd"
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineWidth": 1,
"scaleDistribution": {
"type": "linear"
}
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
Expand All @@ -128,7 +146,8 @@
"value": 80
}
]
}
},
"unit": "short"
},
"overrides": []
},
Expand All @@ -140,16 +159,24 @@
},
"id": 19,
"options": {
"displayMode": "lcd",
"minVizHeight": 10,
"minVizWidth": 0,
"orientation": "horizontal",
"reduceOptions": {
"barRadius": 0,
"barWidth": 0.97,
"groupWidth": 0.7,
"legend": {
"calcs": [],
"fields": "",
"values": true
"displayMode": "list",
"placement": "right",
"showLegend": false
},
"orientation": "horizontal",
"showValue": "always",
"stacking": "none",
"tooltip": {
"mode": "single",
"sort": "none"
},
"showUnfilled": true
"xTickLabelRotation": 0,
"xTickLabelSpacing": 0
},
"pluginVersion": "9.2.1",
"targets": [
Expand All @@ -164,8 +191,8 @@
"refId": "A"
}
],
"title": "Jobs per Application",
"type": "bargauge"
"title": "Runners created per Application",
"type": "barchart"
},
{
"datasource": {
Expand Down

0 comments on commit 0899ba0

Please sign in to comment.