From 0034d0158469283f839f7a380071a37b7f664c86 Mon Sep 17 00:00:00 2001 From: Zirko <64951262+QuantumEnigmaa@users.noreply.github.com> Date: Tue, 16 Apr 2024 15:10:03 +0200 Subject: [PATCH] fix mimir writes resources disk usage dashboard's graphs (#502) * fix mimir writes resources disk usage dashboard's graphs * move dashboard to adequate directory * Reformat file * merge with main --------- Co-authored-by: QuentinBisson --- CHANGELOG.md | 4 ++++ .../dashboards/shared/private/mimir-writes-resources.json | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 257badcd..01498812 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Fix `Mimir / writes resources` disk usage related graphs. + ## [3.11.1] - 2024-04-16 ### Changed diff --git a/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/mimir-writes-resources.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/mimir-writes-resources.json index 27c772e6..e03da2c2 100644 --- a/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/mimir-writes-resources.json +++ b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/mimir-writes-resources.json @@ -964,7 +964,7 @@ "span": 4, "targets": [ { - "expr": "sum by(instance, pod, device) (\n rate(\n node_disk_written_bytes_total[$__rate_interval]\n )\n)\n+\nignoring(pod) group_right() (\n label_replace(\n count by(\n instance,\n pod,\n device\n )\n (\n container_fs_writes_bytes_total{\n cluster=~\"$cluster\", namespace=~\"$namespace\",\n container=~\"ingester\",\n device!~\".*sda.*\"\n }\n ),\n \"device\",\n \"$1\",\n \"device\",\n \"/dev/(.*)\"\n ) * 0\n)\n\n", + "expr": "sum by(node, device) (\n rate(\n node_disk_written_bytes_total[$__rate_interval]\n )\n)\n+\non(node, device) group_right() (\n label_replace(\n count by(\n node,\n device,\n pod,\n )\n (\n container_fs_writes_bytes_total{\n cluster_id=~\"$cluster\", namespace=~\"$namespace\",\n container=~\"ingester\",\n device!~\".*sda.*\"\n }\n ),\n \"device\",\n \"$1\",\n \"device\",\n \"/dev/(.*)\"\n ) * 0\n)\n\n", "format": "time_series", "legendFormat": "{{pod}} - {{device}}", "legendLink": null @@ -1012,7 +1012,7 @@ "span": 4, "targets": [ { - "expr": "sum by(instance, pod, device) (\n rate(\n node_disk_read_bytes_total[$__rate_interval]\n )\n) + ignoring(pod) group_right() (\n label_replace(\n count by(\n instance,\n pod,\n device\n )\n (\n container_fs_writes_bytes_total{\n cluster=~\"$cluster\", namespace=~\"$namespace\",\n container=~\"ingester\",\n device!~\".*sda.*\"\n }\n ),\n \"device\",\n \"$1\",\n \"device\",\n \"/dev/(.*)\"\n ) * 0\n)\n\n", + "expr": "sum by(node, device) (\n rate(\n node_disk_read_bytes_total[$__rate_interval]\n )\n) + on(node, device) group_right() (\n label_replace(\n count by(\n node,\n pod,\n device\n )\n (\n container_fs_writes_bytes_total{\n cluster_id=~\"$cluster\", namespace=~\"$namespace\",\n container=~\"ingester\",\n device!~\".*sda.*\"\n }\n ),\n \"device\",\n \"$1\",\n \"device\",\n \"/dev/(.*)\"\n ) * 0\n)\n\n", "format": "time_series", "legendFormat": "{{pod}} - {{device}}", "legendLink": null @@ -1063,7 +1063,7 @@ "span": 4, "targets": [ { - "expr": "max by(persistentvolumeclaim) (\n kubelet_volume_stats_used_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\"} /\n kubelet_volume_stats_capacity_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\"}\n)\nand\ncount by(persistentvolumeclaim) (\n kube_persistentvolumeclaim_labels{\n cluster=~\"$cluster\", namespace=~\"$namespace\",\n label_name=~\"(ingester).*\"\n }\n)\n", + "expr": "max by(persistentvolumeclaim) (\n kubelet_volume_stats_used_bytes{cluster_id=~\"$cluster\", namespace=~\"$namespace\", persistentvolumeclaim=~\"storage-mimir-ingester-.*\"} /\n kubelet_volume_stats_capacity_bytes{cluster_id=~\"$cluster\", namespace=~\"$namespace\", persistentvolumeclaim=~\"storage-mimir-ingester-.*\"}\n)\n", "format": "time_series", "legendFormat": "{{persistentvolumeclaim}}", "legendLink": null @@ -1115,7 +1115,7 @@ "multi": false, "name": "cluster", "options": [], - "query": "label_values(cortex_build_info, cluster)", + "query": "label_values(mimir_build_info, cluster_id)", "refresh": 1, "regex": "", "sort": 1,