Skip to content

Commit 8d9fb68

Browse files
fix: remove unneccessary disk panels for ssd read path (#13014)
Signed-off-by: QuentinBisson <[email protected]>
1 parent 1948899 commit 8d9fb68

File tree

2 files changed

+21
-146
lines changed

2 files changed

+21
-146
lines changed

production/loki-mixin-compiled-ssd/dashboards/loki-reads-resources.json

+3-144
Original file line numberDiff line numberDiff line change
@@ -277,147 +277,6 @@
277277
"sort": 2
278278
},
279279
"type": "timeseries"
280-
},
281-
{
282-
"datasource": "$datasource",
283-
"fieldConfig": {
284-
"defaults": {
285-
"custom": {
286-
"drawStyle": "line",
287-
"fillOpacity": 100,
288-
"lineWidth": 0,
289-
"pointSize": 5,
290-
"showPoints": "never",
291-
"spanNulls": false,
292-
"stacking": {
293-
"group": "A",
294-
"mode": "normal"
295-
}
296-
},
297-
"thresholds": {
298-
"mode": "absolute",
299-
"steps": [ ]
300-
},
301-
"unit": "Bps"
302-
},
303-
"overrides": [ ]
304-
},
305-
"gridPos": { },
306-
"id": 4,
307-
"links": [ ],
308-
"options": {
309-
"legend": {
310-
"showLegend": true
311-
},
312-
"tooltip": {
313-
"mode": "single",
314-
"sort": "none"
315-
}
316-
},
317-
"targets": [
318-
{
319-
"expr": "sum by(instance, pod, device) (rate(node_disk_written_bytes_total[$__rate_interval])) + ignoring(pod) group_right() (label_replace(count by(instance, pod, device) (container_fs_writes_bytes_total{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki.*|enterprise-logs)-read.*\", device!~\".*sda.*\"}), \"device\", \"$1\", \"device\", \"/dev/(.*)\") * 0)\n",
320-
"format": "time_series",
321-
"legendFormat": "{{pod}} - {{device}}",
322-
"legendLink": null
323-
}
324-
],
325-
"title": "Disk Writes",
326-
"type": "timeseries"
327-
},
328-
{
329-
"datasource": "$datasource",
330-
"fieldConfig": {
331-
"defaults": {
332-
"custom": {
333-
"drawStyle": "line",
334-
"fillOpacity": 100,
335-
"lineWidth": 0,
336-
"pointSize": 5,
337-
"showPoints": "never",
338-
"spanNulls": false,
339-
"stacking": {
340-
"group": "A",
341-
"mode": "normal"
342-
}
343-
},
344-
"thresholds": {
345-
"mode": "absolute",
346-
"steps": [ ]
347-
},
348-
"unit": "Bps"
349-
},
350-
"overrides": [ ]
351-
},
352-
"gridPos": { },
353-
"id": 5,
354-
"links": [ ],
355-
"options": {
356-
"legend": {
357-
"showLegend": true
358-
},
359-
"tooltip": {
360-
"mode": "single",
361-
"sort": "none"
362-
}
363-
},
364-
"targets": [
365-
{
366-
"expr": "sum by(instance, pod, device) (rate(node_disk_read_bytes_total[$__rate_interval])) + ignoring(pod) group_right() (label_replace(count by(instance, pod, device) (container_fs_writes_bytes_total{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki.*|enterprise-logs)-read.*\", device!~\".*sda.*\"}), \"device\", \"$1\", \"device\", \"/dev/(.*)\") * 0)\n",
367-
"format": "time_series",
368-
"legendFormat": "{{pod}} - {{device}}",
369-
"legendLink": null
370-
}
371-
],
372-
"title": "Disk Reads",
373-
"type": "timeseries"
374-
},
375-
{
376-
"datasource": "$datasource",
377-
"fieldConfig": {
378-
"defaults": {
379-
"custom": {
380-
"drawStyle": "line",
381-
"fillOpacity": 10,
382-
"lineWidth": 1,
383-
"pointSize": 5,
384-
"showPoints": "never",
385-
"spanNulls": false,
386-
"stacking": {
387-
"group": "A",
388-
"mode": "none"
389-
}
390-
},
391-
"thresholds": {
392-
"mode": "absolute",
393-
"steps": [ ]
394-
},
395-
"unit": "percentunit"
396-
},
397-
"overrides": [ ]
398-
},
399-
"gridPos": { },
400-
"id": 6,
401-
"links": [ ],
402-
"options": {
403-
"legend": {
404-
"showLegend": true
405-
},
406-
"tooltip": {
407-
"mode": "single",
408-
"sort": "none"
409-
}
410-
},
411-
"targets": [
412-
{
413-
"expr": "max by(persistentvolumeclaim) (kubelet_volume_stats_used_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\"} / kubelet_volume_stats_capacity_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\"}) and count by(persistentvolumeclaim) (kube_persistentvolumeclaim_labels{cluster=~\"$cluster\", namespace=~\"$namespace\",label_name=~\"(loki.*|enterprise-logs)-read.*\"})",
414-
"format": "time_series",
415-
"legendFormat": "{{persistentvolumeclaim}}",
416-
"legendLink": null
417-
}
418-
],
419-
"title": "Disk Space Utilization",
420-
"type": "timeseries"
421280
}
422281
],
423282
"repeat": null,
@@ -495,7 +354,7 @@
495354
}
496355
]
497356
},
498-
"id": 7,
357+
"id": 4,
499358
"links": [ ],
500359
"options": {
501360
"legend": {
@@ -596,7 +455,7 @@
596455
}
597456
]
598457
},
599-
"id": 8,
458+
"id": 5,
600459
"links": [ ],
601460
"options": {
602461
"legend": {
@@ -658,7 +517,7 @@
658517
},
659518
"overrides": [ ]
660519
},
661-
"id": 9,
520+
"id": 6,
662521
"links": [ ],
663522
"options": {
664523
"legend": {

production/loki-mixin/dashboards/loki-reads-resources.libsonnet

+18-2
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,24 @@ local utils = import 'mixin-utils/utils.libsonnet';
9494
$.containerDiskSpaceUtilizationPanel('Disk Space Utilization', 'querier'),
9595
)
9696
)
97-
.addRow(
98-
grafana.row.new(if $._config.ssd.enabled then 'Read path' else 'Index Gateway')
97+
// Add the read path for single scalable deployment only. The read path should not display disk utilization as the index gateway is present in the backend pods.
98+
.addRowIf(
99+
$._config.ssd.enabled,
100+
grafana.row.new('Read path')
101+
.addPanel(
102+
$.CPUUsagePanel('CPU', index_gateway_pod_matcher),
103+
)
104+
.addPanel(
105+
$.memoryWorkingSetPanel('Memory (workingset)', index_gateway_pod_matcher),
106+
)
107+
.addPanel(
108+
$.goHeapInUsePanel('Memory (go heap inuse)', index_gateway_job_matcher),
109+
)
110+
)
111+
// Otherwise we add the index gateway information
112+
.addRowIf(
113+
!$._config.ssd.enabled,
114+
grafana.row.new('Index Gateway')
99115
.addPanel(
100116
$.CPUUsagePanel('CPU', index_gateway_pod_matcher),
101117
)

0 commit comments

Comments
 (0)