net
Reference for the `net` collector.
net· collector · runnanook doc netfor the same content in your terminal.
Network interface counters per interface.
Metrics
| Metric | Kind | Unit | Description |
|---|---|---|---|
net.rx_bytes | numeric | bytes | total received bytes. Labels: iface. |
net.tx_bytes | numeric | bytes | total transmitted bytes. Labels: iface. |
net.rx_packets | numeric | count | total received packets. Labels: iface. |
net.tx_packets | numeric | count | total transmitted packets. Labels: iface. |
net.rx_errors | numeric | count | receive errors. Labels: iface. |
net.tx_errors | numeric | count | transmit errors. Labels: iface. |
Examples
Collect every 10s
[[]]
= "net"
= 10
Filter to a single uplink
[[]]
= "net"
= 10
= 'iface is "eth0"'
Alert on receive errors
[[]]
= 'net.rx_errors{iface="eth0"} > 0'
= 3
= "ops"
= "{{ labels.iface }} dropping packets: {{ value }} errors"
Strip noisy virtual interfaces
[[]]
= "net"
= 10
= '!(iface ~ "veth*" || iface ~ "docker*" || iface is "lo")'