From ebfbe0f56e778465b9bdae005a04048258e52633 Mon Sep 17 00:00:00 2001 From: Johannes Ziemke Date: Tue, 3 Sep 2024 10:31:54 +0200 Subject: [PATCH] mixin: Fix cpu usage graph Signed-off-by: Johannes Ziemke --- docs/node-mixin/lib/prom-mixin.libsonnet | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/docs/node-mixin/lib/prom-mixin.libsonnet b/docs/node-mixin/lib/prom-mixin.libsonnet index 94f1b76a..a558f0a4 100644 --- a/docs/node-mixin/lib/prom-mixin.libsonnet +++ b/docs/node-mixin/lib/prom-mixin.libsonnet @@ -66,17 +66,12 @@ local table = grafana70.panel.table; datasource='$datasource', span=6, format='percentunit', - max=1, min=0, stack=true, ) .addTarget(prometheus.target( ||| - ( - (1 - sum without (mode) (rate(node_cpu_seconds_total{%(nodeExporterSelector)s, mode=~"idle|iowait|steal", instance="$instance", %(clusterLabel)s="$cluster"}[$__rate_interval]))) - / ignoring(cpu) group_left - count without (cpu, mode) (node_cpu_seconds_total{%(nodeExporterSelector)s, mode="idle", instance="$instance", %(clusterLabel)s="$cluster"}) - ) + (1 - sum without (mode) (rate(node_cpu_seconds_total{%(nodeExporterSelector)s, mode=~"idle|iowait|steal", instance="$instance", %(clusterLabel)s="$cluster"}[$__rate_interval]))) ||| % config, legendFormat='{{cpu}}', intervalFactor=5,