net

Reference for the `net` collector.

net · collector · run nanook doc net for the same content in your terminal.

Network interface counters per interface.

Metrics

MetricKindUnitDescription
net.rx_bytesnumericbytestotal received bytes. Labels: iface.
net.tx_bytesnumericbytestotal transmitted bytes. Labels: iface.
net.rx_packetsnumericcounttotal received packets. Labels: iface.
net.tx_packetsnumericcounttotal transmitted packets. Labels: iface.
net.rx_errorsnumericcountreceive errors. Labels: iface.
net.tx_errorsnumericcounttransmit errors. Labels: iface.

Examples

Collect every 10s

[[collectors]]
name = "net"
interval = 10
[[collectors]]
name = "net"
interval = 10
filter = 'iface is "eth0"'

Alert on receive errors

[[alerts]]
expr = 'net.rx_errors{iface="eth0"} > 0'
count = 3
channel = "ops"
body = "{{ labels.iface }} dropping packets: {{ value }} errors"

Strip noisy virtual interfaces

[[collectors]]
name = "net"
interval = 10
filter = '!(iface ~ "veth*" || iface ~ "docker*" || iface is "lo")'