|
24 | 24 | "editable": true,
|
25 | 25 | "fiscalYearStartMonth": 0,
|
26 | 26 | "graphTooltip": 0,
|
27 |
| - "id": 1085, |
| 27 | + "id": 51, |
28 | 28 | "links": [],
|
29 | 29 | "liveNow": false,
|
30 | 30 | "panels": [
|
|
46 | 46 | "type": "loki",
|
47 | 47 | "uid": "${lokids}"
|
48 | 48 | },
|
| 49 | + "description": "It counts the number of jobs that have been started per deployed GitHub Runner application and displays the percentage.", |
49 | 50 | "fieldConfig": {
|
50 | 51 | "defaults": {
|
51 | 52 | "color": {
|
52 | 53 | "mode": "palette-classic"
|
53 | 54 | },
|
54 | 55 | "custom": {
|
55 |
| - "axisCenteredZero": false, |
56 |
| - "axisColorMode": "text", |
57 |
| - "axisLabel": "", |
58 |
| - "axisPlacement": "auto", |
59 |
| - "barAlignment": 0, |
60 |
| - "drawStyle": "line", |
61 |
| - "fillOpacity": 0, |
62 |
| - "gradientMode": "none", |
63 | 56 | "hideFrom": {
|
64 | 57 | "legend": false,
|
65 | 58 | "tooltip": false,
|
66 | 59 | "viz": false
|
67 |
| - }, |
68 |
| - "lineInterpolation": "linear", |
69 |
| - "lineWidth": 1, |
70 |
| - "pointSize": 5, |
71 |
| - "scaleDistribution": { |
72 |
| - "type": "linear" |
73 |
| - }, |
74 |
| - "showPoints": "auto", |
75 |
| - "spanNulls": false, |
76 |
| - "stacking": { |
77 |
| - "group": "A", |
78 |
| - "mode": "none" |
79 |
| - }, |
80 |
| - "thresholdsStyle": { |
81 |
| - "mode": "off" |
82 | 60 | }
|
83 | 61 | },
|
84 |
| - "decimals": 0, |
85 | 62 | "mappings": [],
|
86 |
| - "thresholds": { |
87 |
| - "mode": "absolute", |
88 |
| - "steps": [ |
89 |
| - { |
90 |
| - "color": "green", |
91 |
| - "value": null |
92 |
| - }, |
93 |
| - { |
94 |
| - "color": "red", |
95 |
| - "value": 80 |
96 |
| - } |
97 |
| - ] |
98 |
| - }, |
99 |
| - "unit": "none" |
| 63 | + "unit": "short" |
100 | 64 | },
|
101 | 65 | "overrides": []
|
102 | 66 | },
|
|
106 | 70 | "x": 0,
|
107 | 71 | "y": 1
|
108 | 72 | },
|
109 |
| - "id": 3, |
| 73 | + "id": 25, |
110 | 74 | "options": {
|
| 75 | + "displayLabels": [ |
| 76 | + "percent" |
| 77 | + ], |
111 | 78 | "legend": {
|
112 |
| - "calcs": [], |
113 | 79 | "displayMode": "list",
|
114 |
| - "placement": "bottom", |
115 |
| - "showLegend": true |
| 80 | + "placement": "right", |
| 81 | + "showLegend": true, |
| 82 | + "values": [] |
| 83 | + }, |
| 84 | + "pieType": "pie", |
| 85 | + "reduceOptions": { |
| 86 | + "calcs": [ |
| 87 | + "lastNotNull" |
| 88 | + ], |
| 89 | + "fields": "", |
| 90 | + "values": true |
116 | 91 | },
|
117 | 92 | "tooltip": {
|
118 | 93 | "mode": "single",
|
119 | 94 | "sort": "none"
|
120 | 95 | }
|
121 | 96 | },
|
| 97 | + "pluginVersion": "9.5.3", |
122 | 98 | "targets": [
|
123 | 99 | {
|
124 | 100 | "datasource": {
|
125 | 101 | "type": "loki",
|
126 | 102 | "uid": "${lokids}"
|
127 | 103 | },
|
128 | 104 | "editorMode": "code",
|
129 |
| - "expr": "sum by(filename, event) (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\", timestamp=\"timestamp\", flavor=\"flavor\" | label_format timestamp=\"{{__timestamp__ | unixEpoch | mulf 1000}}\" | event =~ \"runner_start|runner_stop|runner_installed\" | flavor=~\"$flavor\" | timestamp >= ${__from} [$__range]))", |
| 105 | + "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\", timestamp=\"timestamp\", flavor=\"flavor\" | event =~ \"runner_start\" | flavor=~\"$flavor\" [$__range]))", |
130 | 106 | "key": "Q-f7c42eab-69be-43b5-a807-35c071f708a0-0",
|
131 | 107 | "legendFormat": "{{event}}",
|
132 |
| - "queryType": "range", |
| 108 | + "queryType": "instant", |
133 | 109 | "refId": "A"
|
134 |
| - }, |
135 |
| - { |
136 |
| - "datasource": { |
137 |
| - "type": "loki", |
138 |
| - "uid": "${lokids}" |
139 |
| - }, |
140 |
| - "editorMode": "builder", |
141 |
| - "expr": "sum by(filename) (sum_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\", crashed_runners=\"crashed_runners\", timestamp=\"timestamp\", flavor=\"flavor\" | label_format timestamp=\"{{__timestamp__ | unixEpoch | mulf 1000}}\" | event = `reconciliation` | flavor=~\"$flavor\" | timestamp >= ${__from} | unwrap crashed_runners [$__range]))", |
142 |
| - "hide": false, |
143 |
| - "legendFormat": "Crashed", |
144 |
| - "queryType": "range", |
145 |
| - "refId": "D" |
146 | 110 | }
|
147 | 111 | ],
|
148 |
| - "title": "Lifecycle Status", |
| 112 | + "title": "Share of jobs per application", |
149 | 113 | "transformations": [
|
150 | 114 | {
|
151 | 115 | "id": "renameByRegex",
|
|
169 | 133 | }
|
170 | 134 | }
|
171 | 135 | ],
|
172 |
| - "type": "timeseries" |
| 136 | + "type": "piechart" |
173 | 137 | },
|
174 | 138 | {
|
175 | 139 | "datasource": {
|
|
804 | 768 | "uid": "${lokids}"
|
805 | 769 | },
|
806 | 770 | "editorMode": "code",
|
807 |
| - "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\",expected_runners=\"expected_runners\",flavor=\"flavor\" | __error__=\"\" | event=\"reconciliation\" | flavor=~\"$flavor\" | unwrap expected_runners[60m])) - 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])) - 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\",active_runners=\"active_runners\",flavor=\"flavor\" | event=\"reconciliation\" | flavor=~\"$flavor\" | unwrap active_runners[60m]))", |
| 771 | + "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\",expected_runners=\"expected_runners\",flavor=\"flavor\" | __error__=\"\" | event=\"reconciliation\" | flavor=~\"$flavor\" | unwrap expected_runners[60m])) - 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]))) - 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\",active_runners=\"active_runners\",flavor=\"flavor\" | event=\"reconciliation\" | flavor=~\"$flavor\" | unwrap active_runners[60m])))", |
808 | 772 | "hide": false,
|
809 | 773 | "legendFormat": "Unknown",
|
810 | 774 | "queryType": "range",
|
|
1070 | 1034 | ],
|
1071 | 1035 | "type": "barchart"
|
1072 | 1036 | },
|
| 1037 | + { |
| 1038 | + "datasource": { |
| 1039 | + "type": "loki", |
| 1040 | + "uid": "${lokids}" |
| 1041 | + }, |
| 1042 | + "fieldConfig": { |
| 1043 | + "defaults": { |
| 1044 | + "color": { |
| 1045 | + "mode": "palette-classic" |
| 1046 | + }, |
| 1047 | + "custom": { |
| 1048 | + "axisCenteredZero": false, |
| 1049 | + "axisColorMode": "text", |
| 1050 | + "axisLabel": "", |
| 1051 | + "axisPlacement": "auto", |
| 1052 | + "barAlignment": 0, |
| 1053 | + "drawStyle": "line", |
| 1054 | + "fillOpacity": 0, |
| 1055 | + "gradientMode": "none", |
| 1056 | + "hideFrom": { |
| 1057 | + "legend": false, |
| 1058 | + "tooltip": false, |
| 1059 | + "viz": false |
| 1060 | + }, |
| 1061 | + "lineInterpolation": "linear", |
| 1062 | + "lineWidth": 1, |
| 1063 | + "pointSize": 5, |
| 1064 | + "scaleDistribution": { |
| 1065 | + "type": "linear" |
| 1066 | + }, |
| 1067 | + "showPoints": "auto", |
| 1068 | + "spanNulls": false, |
| 1069 | + "stacking": { |
| 1070 | + "group": "A", |
| 1071 | + "mode": "none" |
| 1072 | + }, |
| 1073 | + "thresholdsStyle": { |
| 1074 | + "mode": "off" |
| 1075 | + } |
| 1076 | + }, |
| 1077 | + "decimals": 0, |
| 1078 | + "mappings": [], |
| 1079 | + "thresholds": { |
| 1080 | + "mode": "absolute", |
| 1081 | + "steps": [ |
| 1082 | + { |
| 1083 | + "color": "green", |
| 1084 | + "value": null |
| 1085 | + }, |
| 1086 | + { |
| 1087 | + "color": "red", |
| 1088 | + "value": 80 |
| 1089 | + } |
| 1090 | + ] |
| 1091 | + }, |
| 1092 | + "unit": "none" |
| 1093 | + }, |
| 1094 | + "overrides": [] |
| 1095 | + }, |
| 1096 | + "gridPos": { |
| 1097 | + "h": 8, |
| 1098 | + "w": 12, |
| 1099 | + "x": 0, |
| 1100 | + "y": 33 |
| 1101 | + }, |
| 1102 | + "id": 3, |
| 1103 | + "options": { |
| 1104 | + "legend": { |
| 1105 | + "calcs": [], |
| 1106 | + "displayMode": "list", |
| 1107 | + "placement": "bottom", |
| 1108 | + "showLegend": true |
| 1109 | + }, |
| 1110 | + "tooltip": { |
| 1111 | + "mode": "single", |
| 1112 | + "sort": "none" |
| 1113 | + } |
| 1114 | + }, |
| 1115 | + "targets": [ |
| 1116 | + { |
| 1117 | + "datasource": { |
| 1118 | + "type": "loki", |
| 1119 | + "uid": "${lokids}" |
| 1120 | + }, |
| 1121 | + "editorMode": "code", |
| 1122 | + "expr": "sum by(filename, event) (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\", timestamp=\"timestamp\", flavor=\"flavor\" | label_format timestamp=\"{{__timestamp__ | unixEpoch | mulf 1000}}\" | event =~ \"runner_start|runner_stop|runner_installed\" | flavor=~\"$flavor\" | timestamp >= ${__from} [$__range]))", |
| 1123 | + "key": "Q-f7c42eab-69be-43b5-a807-35c071f708a0-0", |
| 1124 | + "legendFormat": "{{event}}", |
| 1125 | + "queryType": "range", |
| 1126 | + "refId": "A" |
| 1127 | + }, |
| 1128 | + { |
| 1129 | + "datasource": { |
| 1130 | + "type": "loki", |
| 1131 | + "uid": "${lokids}" |
| 1132 | + }, |
| 1133 | + "editorMode": "builder", |
| 1134 | + "expr": "sum by(filename) (sum_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\", crashed_runners=\"crashed_runners\", timestamp=\"timestamp\", flavor=\"flavor\" | label_format timestamp=\"{{__timestamp__ | unixEpoch | mulf 1000}}\" | event = `reconciliation` | flavor=~\"$flavor\" | timestamp >= ${__from} | unwrap crashed_runners [$__range]))", |
| 1135 | + "hide": false, |
| 1136 | + "legendFormat": "Crashed", |
| 1137 | + "queryType": "range", |
| 1138 | + "refId": "D" |
| 1139 | + } |
| 1140 | + ], |
| 1141 | + "title": "Lifecycle Status", |
| 1142 | + "transformations": [ |
| 1143 | + { |
| 1144 | + "id": "renameByRegex", |
| 1145 | + "options": { |
| 1146 | + "regex": "runner_installed", |
| 1147 | + "renamePattern": "Initialized" |
| 1148 | + } |
| 1149 | + }, |
| 1150 | + { |
| 1151 | + "id": "renameByRegex", |
| 1152 | + "options": { |
| 1153 | + "regex": "runner_start", |
| 1154 | + "renamePattern": "Started" |
| 1155 | + } |
| 1156 | + }, |
| 1157 | + { |
| 1158 | + "id": "renameByRegex", |
| 1159 | + "options": { |
| 1160 | + "regex": "runner_stop", |
| 1161 | + "renamePattern": "Stopped" |
| 1162 | + } |
| 1163 | + } |
| 1164 | + ], |
| 1165 | + "type": "timeseries" |
| 1166 | + }, |
1073 | 1167 | {
|
1074 | 1168 | "datasource": {
|
1075 | 1169 | "type": "loki",
|
|
1837 | 1931 | "mode": "absolute",
|
1838 | 1932 | "steps": [
|
1839 | 1933 | {
|
1840 |
| - "color": "green", |
1841 |
| - "value": null |
| 1934 | + "color": "green" |
1842 | 1935 | },
|
1843 | 1936 | {
|
1844 | 1937 | "color": "red",
|
|
2134 | 2227 | ]
|
2135 | 2228 | },
|
2136 | 2229 | "time": {
|
2137 |
| - "from": "now-24h", |
| 2230 | + "from": "now-6h", |
2138 | 2231 | "to": "now"
|
2139 | 2232 | },
|
2140 | 2233 | "timepicker": {},
|
2141 | 2234 | "timezone": "",
|
2142 | 2235 | "title": "GitHub Self-Hosted Runner Metrics",
|
2143 |
| - "version": 19, |
| 2236 | + "version": 20, |
2144 | 2237 | "weekStart": ""
|
2145 | 2238 | }
|
0 commit comments