From 7519830a8a9fb7e2321655031692526498f7cb9a Mon Sep 17 00:00:00 2001 From: Vitaly Zhuravlev Date: Thu, 12 May 2022 23:23:31 +0400 Subject: [PATCH] Change io time units to %util When appying rate() to seconds we have 'seconds per second' or fractions of the second, so actually it actually can be from 0 to 1. Also update intervalFactor to 1 for better rates. Signed-off-by: Vitaly Zhuravlev --- docs/node-mixin/lib/prom-mixin.libsonnet | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/node-mixin/lib/prom-mixin.libsonnet b/docs/node-mixin/lib/prom-mixin.libsonnet index 2aab694c..6b541ac3 100644 --- a/docs/node-mixin/lib/prom-mixin.libsonnet +++ b/docs/node-mixin/lib/prom-mixin.libsonnet @@ -192,14 +192,17 @@ local table = grafana70.panel.table; .addTarget(prometheus.target( 'rate(node_disk_read_bytes_total{%(nodeExporterSelector)s, instance="$instance", %(diskDeviceSelector)s}[$__rate_interval])' % config, legendFormat='{{device}} read', + intervalFactor=1, )) .addTarget(prometheus.target( 'rate(node_disk_written_bytes_total{%(nodeExporterSelector)s, instance="$instance", %(diskDeviceSelector)s}[$__rate_interval])' % config, legendFormat='{{device}} written', + intervalFactor=1, )) .addTarget(prometheus.target( 'rate(node_disk_io_time_seconds_total{%(nodeExporterSelector)s, instance="$instance", %(diskDeviceSelector)s}[$__rate_interval])' % config, legendFormat='{{device}} io time', + intervalFactor=1, )) + { seriesOverrides: [ @@ -214,7 +217,7 @@ local table = grafana70.panel.table; ], yaxes: [ self.yaxe(format='Bps'), - self.yaxe(format='s'), + self.yaxe(format='percentunit'), ], }, @@ -410,7 +413,7 @@ local table = grafana70.panel.table; local networkReceived = graphPanel.new( 'Network Received', - description="Network received (bits/s)", + description='Network received (bits/s)', datasource='$datasource', span=6, format='bps', @@ -420,12 +423,13 @@ local table = grafana70.panel.table; .addTarget(prometheus.target( 'rate(node_network_receive_bytes_total{%(nodeExporterSelector)s, instance="$instance", device!="lo"}[$__rate_interval]) * 8' % config, legendFormat='{{device}}', + intervalFactor=1, )), local networkTransmitted = graphPanel.new( 'Network Transmitted', - description="Network transmitted (bits/s)", + description='Network transmitted (bits/s)', datasource='$datasource', span=6, format='bps', @@ -435,6 +439,7 @@ local table = grafana70.panel.table; .addTarget(prometheus.target( 'rate(node_network_transmit_bytes_total{%(nodeExporterSelector)s, instance="$instance", device!="lo"}[$__rate_interval]) * 8' % config, legendFormat='{{device}}', + intervalFactor=1, )), local cpuRow =