From d89da501b21d81f1adc35b64c7eda0a7728a4245 Mon Sep 17 00:00:00 2001 From: Vitaly Zhuravlev Date: Fri, 24 Nov 2023 14:56:01 +0000 Subject: [PATCH] Show only errors when they occur --- docs/node-observ-lib/linux/panels.libsonnet | 22 +++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/docs/node-observ-lib/linux/panels.libsonnet b/docs/node-observ-lib/linux/panels.libsonnet index 281c942ea5..d924ac2eb9 100644 --- a/docs/node-observ-lib/linux/panels.libsonnet +++ b/docs/node-observ-lib/linux/panels.libsonnet @@ -680,12 +680,18 @@ local utils = commonlib.utils; networkErrorsAndDroppedPerSec: commonlib.panels.network.timeSeries.errors.new( 'Network errors and dropped packets', - targets=[ - t.networkOutErrorsPerSec, - t.networkInErrorsPerSec, - t.networkOutDroppedPerSec, - t.networkInDroppedPerSec, - ], + targets=std.map( + function(t) t + { + expr: t.expr + '>0', + }, + [ + t.networkOutErrorsPerSec, + t.networkInErrorsPerSec, + t.networkOutDroppedPerSec, + t.networkInDroppedPerSec, + ] + ), description=||| **Network errors**: @@ -711,7 +717,7 @@ local utils = commonlib.utils; targets=std.map( function(t) t { - expr: 'topk(25, ' + t.expr + ')>0.5', + expr: 'topk(25, ' + t.expr + ')>0', legendFormat: '{{' + this.config.instanceLabels[0] + '}}: ' + std.get(t, 'legendFormat', '{{ nic }}'), }, [ @@ -757,7 +763,7 @@ local utils = commonlib.utils; + commonlib.panels.network.timeSeries.errors.withNegateOutPackets(), networkUsagePerSec: commonlib.panels.network.timeSeries.traffic.new( - targets=[t.networkInBitPerSec, t.networkOutBitPerSec] + targets=[t.networkInBitPerSecFiltered, t.networkOutBitPerSecFiltered] ) + commonlib.panels.network.timeSeries.traffic.withNegateOutPackets(), networkPacketsPerSec: