Skip to content

Commit d2fe340

Browse files
committed
Update loki dashboard
Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
1 parent fc486ed commit d2fe340

File tree

3 files changed

+82
-43
lines changed

3 files changed

+82
-43
lines changed

monitoring/configs/dashboards/cluster.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,7 @@
13761376
]
13771377
},
13781378
"timezone": "",
1379-
"title": "Flux Cluster Stats",
1379+
"title": "Flux / Cluster Stats",
13801380
"uid": "flux-cluster",
13811381
"version": 4,
13821382
"weekStart": ""

monitoring/configs/dashboards/control-plane.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1723,7 +1723,7 @@
17231723
]
17241724
},
17251725
"timezone": "",
1726-
"title": "Flux Control Plane",
1726+
"title": "Flux / Control Plane",
17271727
"uid": "flux-control-plane",
17281728
"version": 2,
17291729
"weekStart": ""

monitoring/configs/dashboards/logs.json

Lines changed: 80 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,27 @@
4747
},
4848
"description": "Flux logs collected from Kubernetes, stored in Loki",
4949
"editable": true,
50-
"gnetId": null,
50+
"fiscalYearStartMonth": 0,
5151
"graphTooltip": 0,
52-
"id": 29,
53-
"iteration": 1653748775696,
52+
"id": null,
5453
"links": [],
5554
"liveNow": false,
5655
"panels": [
5756
{
58-
"datasource": "${DS_LOKI}",
57+
"datasource": {
58+
"type": "loki",
59+
"uid": "${DS_LOKI}"
60+
},
5961
"description": "",
6062
"fieldConfig": {
6163
"defaults": {
6264
"color": {
6365
"mode": "palette-classic"
6466
},
6567
"custom": {
68+
"axisBorderShow": false,
69+
"axisCenteredZero": false,
70+
"axisColorMode": "text",
6671
"axisLabel": "",
6772
"axisPlacement": "auto",
6873
"barAlignment": 0,
@@ -74,6 +79,7 @@
7479
"tooltip": false,
7580
"viz": false
7681
},
82+
"insertNulls": false,
7783
"lineInterpolation": "linear",
7884
"lineWidth": 1,
7985
"pointSize": 5,
@@ -117,8 +123,9 @@
117123
"options": {
118124
"legend": {
119125
"calcs": [],
120-
"displayMode": "hidden",
121-
"placement": "bottom"
126+
"displayMode": "list",
127+
"placement": "bottom",
128+
"showLegend": false
122129
},
123130
"tooltip": {
124131
"mode": "single",
@@ -127,18 +134,26 @@
127134
},
128135
"targets": [
129136
{
130-
"datasource": "${DS_LOKI}",
137+
"datasource": {
138+
"type": "loki",
139+
"uid": "${DS_LOKI}"
140+
},
141+
"editorMode": "code",
131142
"expr": "sum(count_over_time({namespace=~\"$namespace\", stream=~\"$stream\", app =~\"$controller\"} | json | __error__!=\"JSONParserErr\" | level=~\"$level\" |= \"$query\" [$__interval]))",
132143
"instant": false,
133144
"legendFormat": "Log count",
145+
"queryType": "range",
134146
"range": true,
135147
"refId": "A"
136148
}
137149
],
138150
"type": "timeseries"
139151
},
140152
{
141-
"datasource": "${DS_LOKI}",
153+
"datasource": {
154+
"type": "loki",
155+
"uid": "${DS_LOKI}"
156+
},
142157
"description": "Logs from services running in Kubernetes",
143158
"gridPos": {
144159
"h": 25,
@@ -159,17 +174,21 @@
159174
},
160175
"targets": [
161176
{
162-
"datasource": "${DS_LOKI}",
177+
"datasource": {
178+
"type": "loki",
179+
"uid": "${DS_LOKI}"
180+
},
181+
"editorMode": "code",
163182
"expr": "{namespace=~\"$namespace\", stream=~\"$stream\", app =~\"$controller\"} | json | __error__!=\"JSONParserErr\" | level=~\"$level\" |= \"$query\"",
183+
"queryType": "range",
164184
"refId": "A"
165185
}
166186
],
167187
"type": "logs"
168188
}
169189
],
170190
"refresh": "10s",
171-
"schemaVersion": 36,
172-
"style": "light",
191+
"schemaVersion": 38,
173192
"tags": [
174193
"flux"
175194
],
@@ -199,7 +218,7 @@
199218
{
200219
"allValue": "info|error",
201220
"current": {
202-
"selected": false,
221+
"selected": true,
203222
"text": "All",
204223
"value": "$__all"
205224
},
@@ -231,23 +250,18 @@
231250
},
232251
{
233252
"allValue": ".+",
234-
"current": {
235-
"selected": true,
236-
"text": [
237-
"All"
238-
],
239-
"value": [
240-
"$__all"
241-
]
253+
"current": {},
254+
"datasource": {
255+
"type": "loki",
256+
"uid": "${DS_LOKI}"
242257
},
243-
"datasource": "${DS_LOKI}",
244-
"definition": "label_values(app)",
258+
"definition": "label_values(namespace)",
245259
"hide": 0,
246260
"includeAll": true,
247261
"multi": true,
248-
"name": "controller",
262+
"name": "namespace",
249263
"options": [],
250-
"query": "label_values(app)",
264+
"query": "label_values(namespace)",
251265
"refresh": 1,
252266
"regex": "",
253267
"skipUrlSync": false,
@@ -265,14 +279,22 @@
265279
"flux-system"
266280
]
267281
},
268-
"datasource": "${DS_LOKI}",
269-
"definition": "label_values(namespace)",
282+
"datasource": {
283+
"type": "loki",
284+
"uid": "${DS_LOKI}"
285+
},
286+
"definition": "",
270287
"hide": 0,
271288
"includeAll": true,
272289
"multi": true,
273-
"name": "namespace",
290+
"name": "controller",
274291
"options": [],
275-
"query": "label_values(namespace)",
292+
"query": {
293+
"label": "app",
294+
"refId": "LokiVariableQueryEditor-VariableQuery",
295+
"stream": "{namespace=~\"$namespace\"}",
296+
"type": 1
297+
},
276298
"refresh": 1,
277299
"regex": "",
278300
"skipUrlSync": false,
@@ -282,23 +304,39 @@
282304
{
283305
"allValue": ".+",
284306
"current": {
285-
"selected": false,
286-
"text": "All",
287-
"value": "$__all"
307+
"selected": true,
308+
"text": [
309+
"All"
310+
],
311+
"value": [
312+
"$__all"
313+
]
288314
},
289-
"datasource": "${DS_LOKI}",
290-
"definition": "label_values(stream)",
291315
"hide": 0,
292316
"includeAll": true,
293317
"multi": true,
294318
"name": "stream",
295-
"options": [],
296-
"query": "label_values(stream)",
297-
"refresh": 1,
298-
"regex": "",
319+
"options": [
320+
{
321+
"selected": true,
322+
"text": "All",
323+
"value": "$__all"
324+
},
325+
{
326+
"selected": false,
327+
"text": "stdout",
328+
"value": "stdout"
329+
},
330+
{
331+
"selected": false,
332+
"text": "stderr",
333+
"value": "stderr"
334+
}
335+
],
336+
"query": "stdout,stderr",
337+
"queryValue": "",
299338
"skipUrlSync": false,
300-
"sort": 0,
301-
"type": "query"
339+
"type": "custom"
302340
},
303341
{
304342
"current": {
@@ -326,7 +364,8 @@
326364
},
327365
"timepicker": {},
328366
"timezone": "",
329-
"title": "Flux Logs",
367+
"title": "Flux / Logs",
330368
"uid": "flux-logs",
331-
"version": 2
369+
"version": 1,
370+
"weekStart": ""
332371
}

0 commit comments

Comments
 (0)