Browse Source

Added `_excluding_lo` to name of network rules that exclude lo

Signed-off-by: beorn7 <beorn@grafana.com>
pull/1429/head
beorn7 5 years ago
parent
commit
79f0357e38
  1. 16
      docs/node-mixin/dashboards/use.libsonnet
  2. 10
      docs/node-mixin/rules/rules.libsonnet

16
docs/node-mixin/dashboards/use.libsonnet

@ -90,8 +90,8 @@ local g = import 'grafana-builder/grafana.libsonnet';
g.panel('Net Utilisation (Bytes Receive/Transmit)') +
g.queryPanel(
[
'instance:node_network_receive_bytes:rate1m{%(nodeExporterSelector)s}' % $._config,
'-instance:node_network_transmit_bytes:rate1m{%(nodeExporterSelector)s}' % $._config,
'instance:node_network_receive_bytes_excluding_lo:rate1m{%(nodeExporterSelector)s}' % $._config,
'-instance:node_network_transmit_bytes_excluding_lo:rate1m{%(nodeExporterSelector)s}' % $._config,
],
['{{instance}} Receive', '{{instance}} Transmit'],
legendLink,
@ -103,8 +103,8 @@ local g = import 'grafana-builder/grafana.libsonnet';
g.panel('Net Saturation (Drops Receive/Transmit)') +
g.queryPanel(
[
'instance:node_network_receive_drop:rate1m{%(nodeExporterSelector)s}' % $._config,
'-instance:node_network_transmit_drop:rate1m{%(nodeExporterSelector)s}' % $._config,
'instance:node_network_receive_drop_excluding_lo:rate1m{%(nodeExporterSelector)s}' % $._config,
'-instance:node_network_transmit_drop_excluding_lo:rate1m{%(nodeExporterSelector)s}' % $._config,
],
['{{instance}} Receive', '{{instance}} Transmit'],
legendLink,
@ -187,8 +187,8 @@ local g = import 'grafana-builder/grafana.libsonnet';
g.panel('Net Utilisation (Bytes Receive/Transmit)') +
g.queryPanel(
[
'instance:node_network_receive_bytes:rate1m{%(nodeExporterSelector)s, instance="$instance"}' % $._config,
'-instance:node_network_transmit_bytes:rate1m{%(nodeExporterSelector)s, instance="$instance"}' % $._config,
'instance:node_network_receive_bytes_excluding_lo:rate1m{%(nodeExporterSelector)s, instance="$instance"}' % $._config,
'-instance:node_network_transmit_bytes_excluding_lo:rate1m{%(nodeExporterSelector)s, instance="$instance"}' % $._config,
],
['Receive', 'Transmit'],
) +
@ -198,8 +198,8 @@ local g = import 'grafana-builder/grafana.libsonnet';
g.panel('Net Saturation (Drops Receive/Transmit)') +
g.queryPanel(
[
'instance:node_network_receive_drop:rate1m{%(nodeExporterSelector)s, instance="$instance"}' % $._config,
'-instance:node_network_transmit_drop:rate1m{%(nodeExporterSelector)s, instance="$instance"}' % $._config,
'instance:node_network_receive_drop_excluding_lo:rate1m{%(nodeExporterSelector)s, instance="$instance"}' % $._config,
'-instance:node_network_transmit_drop_excluding_lo:rate1m{%(nodeExporterSelector)s, instance="$instance"}' % $._config,
],
['Receive drops', 'Transmit drops'],
) +

10
docs/node-mixin/rules/rules.libsonnet

@ -73,10 +73,8 @@
rate(node_disk_io_time_weighted_seconds_total{%(nodeExporterSelector)s, %(diskDeviceSelector)s}[1m])
||| % $._config,
},
// TODO: For the following rules, consider configurable filtering to exclude more network
// device names than just "lo".
{
record: 'instance:node_network_receive_bytes:rate1m',
record: 'instance:node_network_receive_bytes_excluding_lo:rate1m',
expr: |||
sum without (device) (
rate(node_network_receive_bytes_total{%(nodeExporterSelector)s, device!="lo"}[1m])
@ -84,7 +82,7 @@
||| % $._config,
},
{
record: 'instance:node_network_transmit_bytes:rate1m',
record: 'instance:node_network_transmit_bytes_excluding_lo:rate1m',
expr: |||
sum without (device) (
rate(node_network_transmit_bytes_total{%(nodeExporterSelector)s, device!="lo"}[1m])
@ -93,7 +91,7 @@
},
// TODO: Find out if those drops ever happen on modern switched networks.
{
record: 'instance:node_network_receive_drop:rate1m',
record: 'instance:node_network_receive_drop_excluding_lo:rate1m',
expr: |||
sum without (device) (
rate(node_network_receive_drop_total{%(nodeExporterSelector)s, device!="lo"}[1m])
@ -101,7 +99,7 @@
||| % $._config,
},
{
record: 'instance:node_network_transmit_drop:rate1m',
record: 'instance:node_network_transmit_drop_excluding_lo:rate1m',
expr: |||
sum without (device) (
rate(node_network_transmit_drop_total{%(nodeExporterSelector)s, device!="lo"}[1m])

Loading…
Cancel
Save