Skip to content

Commit

Permalink
fix: mixins / loki-resources-overview panel layout (#14178)
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinBisson authored Sep 19, 2024
1 parent 547ca70 commit 8f54ec6
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@
"sort": "none"
}
},
"span": 1,
"span": 3,
"targets": [
{
"expr": "sum by(pod) (loki_write_memory_streams{cluster=~\"$cluster\", job=~\"($namespace)/(loki.*|enterprise-logs)-write\"})",
Expand Down Expand Up @@ -414,7 +414,7 @@
"sort": "none"
}
},
"span": 1,
"span": 3,
"targets": [
{
"expr": "sum by(pod) (rate(container_cpu_usage_seconds_total{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki.*|enterprise-logs)-write.*\"}[$__rate_interval]))",
Expand Down Expand Up @@ -515,7 +515,7 @@
"sort": "none"
}
},
"span": 1,
"span": 3,
"targets": [
{
"expr": "max by(pod) (container_memory_working_set_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki.*|enterprise-logs)-write.*\"})",
Expand Down Expand Up @@ -577,7 +577,7 @@
"sort": "none"
}
},
"span": 1,
"span": 3,
"targets": [
{
"expr": "sum by(pod) (go_memstats_heap_inuse_bytes{cluster=~\"$cluster\", job=~\"($namespace)/(loki.*|enterprise-logs)-write\"})",
Expand All @@ -591,7 +591,19 @@
"sort": 2
},
"type": "timeseries"
},
}
],
"repeat": null,
"repeatIteration": null,
"repeatRowId": null,
"showTitle": true,
"title": "Write path",
"titleSize": "h6"
},
{
"collapse": false,
"height": "250px",
"panels": [
{
"datasource": "$datasource",
"fieldConfig": {
Expand Down Expand Up @@ -627,7 +639,7 @@
"sort": "none"
}
},
"span": 1,
"span": 4,
"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)-write.*\", device!~\".*sda.*\"}), \"device\", \"$1\", \"device\", \"/dev/(.*)\") * 0)\n",
Expand Down Expand Up @@ -674,7 +686,7 @@
"sort": "none"
}
},
"span": 1,
"span": 4,
"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)-write.*\", device!~\".*sda.*\"}), \"device\", \"$1\", \"device\", \"/dev/(.*)\") * 0)\n",
Expand Down Expand Up @@ -721,7 +733,7 @@
"sort": "none"
}
},
"span": 1,
"span": 4,
"targets": [
{
"expr": "max by(persistentvolumeclaim) (kubelet_volume_stats_used_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\", persistentvolumeclaim=~\".*(loki.*|enterprise-logs)-write.*\"} / kubelet_volume_stats_capacity_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\", persistentvolumeclaim=~\".*(loki.*|enterprise-logs)-write.*\"})",
Expand All @@ -738,7 +750,7 @@
"repeatIteration": null,
"repeatRowId": null,
"showTitle": true,
"title": "Write path",
"title": "",
"titleSize": "h6"
},
{
Expand Down Expand Up @@ -819,7 +831,7 @@
"sort": "none"
}
},
"span": 2,
"span": 4,
"targets": [
{
"expr": "sum by(pod) (rate(container_cpu_usage_seconds_total{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki.*|enterprise-logs)-backend.*\"}[$__rate_interval]))",
Expand Down Expand Up @@ -920,7 +932,7 @@
"sort": "none"
}
},
"span": 2,
"span": 4,
"targets": [
{
"expr": "max by(pod) (container_memory_working_set_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki.*|enterprise-logs)-backend.*\"})",
Expand Down Expand Up @@ -982,7 +994,7 @@
"sort": "none"
}
},
"span": 2,
"span": 4,
"targets": [
{
"expr": "sum by(pod) (go_memstats_heap_inuse_bytes{cluster=~\"$cluster\", job=~\"($namespace)/(loki.*|enterprise-logs)-backend\"})",
Expand All @@ -996,7 +1008,19 @@
"sort": 2
},
"type": "timeseries"
},
}
],
"repeat": null,
"repeatIteration": null,
"repeatRowId": null,
"showTitle": true,
"title": "Backend path",
"titleSize": "h6"
},
{
"collapse": false,
"height": "250px",
"panels": [
{
"datasource": "$datasource",
"fieldConfig": {
Expand Down Expand Up @@ -1032,7 +1056,7 @@
"sort": "none"
}
},
"span": 2,
"span": 4,
"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)-backend.*\", device!~\".*sda.*\"}), \"device\", \"$1\", \"device\", \"/dev/(.*)\") * 0)\n",
Expand Down Expand Up @@ -1079,7 +1103,7 @@
"sort": "none"
}
},
"span": 2,
"span": 4,
"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)-backend.*\", device!~\".*sda.*\"}), \"device\", \"$1\", \"device\", \"/dev/(.*)\") * 0)\n",
Expand Down Expand Up @@ -1126,7 +1150,7 @@
"sort": "none"
}
},
"span": 2,
"span": 4,
"targets": [
{
"expr": "max by(persistentvolumeclaim) (kubelet_volume_stats_used_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\", persistentvolumeclaim=~\".*(loki.*|enterprise-logs)-backend.*\"} / kubelet_volume_stats_capacity_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\", persistentvolumeclaim=~\".*(loki.*|enterprise-logs)-backend.*\"})",
Expand All @@ -1143,7 +1167,7 @@
"repeatIteration": null,
"repeatRowId": null,
"showTitle": true,
"title": "Backend path",
"title": "",
"titleSize": "h6"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
) +
{
tooltip: { sort: 2 }, // Sort descending.
},
}
)
.addPanel(
$.CPUUsagePanel('CPU', write_pod_matcher),
Expand All @@ -52,6 +52,9 @@
.addPanel(
$.goHeapInUsePanel('Memory (go heap inuse)', write_job_matcher),
)
)
.addRow(
$.row('')
.addPanel(
$.newQueryPanel('Disk Writes', 'Bps') +
$.queryPanel(
Expand Down Expand Up @@ -83,6 +86,9 @@
.addPanel(
$.goHeapInUsePanel('Memory (go heap inuse)', backend_job_matcher),
)
)
.addRow(
$.row('')
.addPanel(
$.newQueryPanel('Disk Writes', 'Bps') +
$.queryPanel(
Expand Down

0 comments on commit 8f54ec6

Please sign in to comment.