Skip to content

Commit

Permalink
Only show network interfaces that had traffic change at least once du…
Browse files Browse the repository at this point in the history
…ring selected dashboard interval
  • Loading branch information
v-zhuravlev committed Nov 24, 2023
1 parent d89da50 commit 55263fe
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docs/node-observ-lib/linux/targets.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,34 @@ local lokiQuery = g.query.loki;
'irate(node_network_receive_bytes_total{%(queriesSelector)s}[$__rate_interval])*8' % variables
)
+ prometheusQuery.withLegendFormat('{{ device }} received'),
networkOutBitPerSecFiltered:
prometheusQuery.new(
prometheusDatasource,
|||
irate(node_network_transmit_bytes_total{%(queriesSelector)s}[$__rate_interval])*8
# only show interfaces that had traffic change at least once during selected dashboard interval:
and
increase(
node_network_transmit_bytes_total{%(queriesSelector)s}[$__range]
) > 0
||| % variables
)
+ prometheusQuery.withLegendFormat('{{ device }} transmitted'),
networkInBitPerSecFiltered:
prometheusQuery.new(
prometheusDatasource,
|||
irate(node_network_receive_bytes_total{%(queriesSelector)s}[$__rate_interval])*8
# only show interfaces that had traffic change at least once during selected dashboard interval:
and
increase(
node_network_receive_bytes_total{%(queriesSelector)s}[$__range]
) > 0
||| % variables
)
+ prometheusQuery.withLegendFormat('{{ device }} received'),


networkOutErrorsPerSec:
prometheusQuery.new(
prometheusDatasource,
Expand Down

0 comments on commit 55263fe

Please sign in to comment.