Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove unneccessary disk panels for ssd read path #13014

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -277,147 +277,6 @@
"sort": 2
},
"type": "timeseries"
},
{
"datasource": "$datasource",
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"fillOpacity": 100,
"lineWidth": 0,
"pointSize": 5,
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
}
},
"thresholds": {
"mode": "absolute",
"steps": [ ]
},
"unit": "Bps"
},
"overrides": [ ]
},
"gridPos": { },
"id": 4,
"links": [ ],
"options": {
"legend": {
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"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",
"format": "time_series",
"legendFormat": "{{pod}} - {{device}}",
"legendLink": null
}
],
"title": "Disk Writes",
"type": "timeseries"
},
{
"datasource": "$datasource",
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"fillOpacity": 100,
"lineWidth": 0,
"pointSize": 5,
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
}
},
"thresholds": {
"mode": "absolute",
"steps": [ ]
},
"unit": "Bps"
},
"overrides": [ ]
},
"gridPos": { },
"id": 5,
"links": [ ],
"options": {
"legend": {
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"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",
"format": "time_series",
"legendFormat": "{{pod}} - {{device}}",
"legendLink": null
}
],
"title": "Disk Reads",
"type": "timeseries"
},
{
"datasource": "$datasource",
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"fillOpacity": 10,
"lineWidth": 1,
"pointSize": 5,
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
}
},
"thresholds": {
"mode": "absolute",
"steps": [ ]
},
"unit": "percentunit"
},
"overrides": [ ]
},
"gridPos": { },
"id": 6,
"links": [ ],
"options": {
"legend": {
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"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.*\"})",
"format": "time_series",
"legendFormat": "{{persistentvolumeclaim}}",
"legendLink": null
}
],
"title": "Disk Space Utilization",
"type": "timeseries"
}
],
"repeat": null,
Expand Down Expand Up @@ -495,7 +354,7 @@
}
]
},
"id": 7,
"id": 4,
"links": [ ],
"options": {
"legend": {
Expand Down Expand Up @@ -596,7 +455,7 @@
}
]
},
"id": 8,
"id": 5,
"links": [ ],
"options": {
"legend": {
Expand Down Expand Up @@ -658,7 +517,7 @@
},
"overrides": [ ]
},
"id": 9,
"id": 6,
"links": [ ],
"options": {
"legend": {
Expand Down
20 changes: 18 additions & 2 deletions production/loki-mixin/dashboards/loki-reads-resources.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,24 @@ local utils = import 'mixin-utils/utils.libsonnet';
$.containerDiskSpaceUtilizationPanel('Disk Space Utilization', 'querier'),
)
)
.addRow(
grafana.row.new(if $._config.ssd.enabled then 'Read path' else 'Index Gateway')
// 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.
.addRowIf(
$._config.ssd.enabled,
grafana.row.new('Read path')
.addPanel(
$.CPUUsagePanel('CPU', index_gateway_pod_matcher),
)
.addPanel(
$.memoryWorkingSetPanel('Memory (workingset)', index_gateway_pod_matcher),
)
.addPanel(
$.goHeapInUsePanel('Memory (go heap inuse)', index_gateway_job_matcher),
)
)
// Otherwise we add the index gateway information
.addRowIf(
!$._config.ssd.enabled,
grafana.row.new('Index Gateway')
.addPanel(
$.CPUUsagePanel('CPU', index_gateway_pod_matcher),
)
Expand Down
Loading