Skip to content

Commit

Permalink
Show only errors when they occur
Browse files Browse the repository at this point in the history
  • Loading branch information
v-zhuravlev committed Nov 24, 2023
1 parent a8c76f9 commit d89da50
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions docs/node-observ-lib/linux/panels.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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**:
Expand All @@ -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 }}'),
},
[
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit d89da50

Please sign in to comment.