node_exporter/collector/fixtures/ethtool/eth0/statistics
Guillaume E. 45eb59d29e
Fix ethtool returning 0 for sanitized metrics (#3335)
The ethtool_linux looks for ethtool stats with their sanitized name
which might be different from the name provisioned by ethtool.

This caused node-exporter to return a 0-value for sanitized metrics.

This patch works-around the missing key by copying ethtool stats
to another map under their sanitized name.

Signed-off-by: Guillaume Espanel <guillaume.espanel@ovhcloud.com>
Co-authored-by: Guillaume Espanel <guillaume.espanel@ovhcloud.com>
2025-05-19 11:41:17 +02:00

19 lines
408 B
Plaintext

# ethtool -S eth0
NIC statistics:
tx_packets: 961500
rx_packets: 1260062
tx_errors: 0
rx_errors: 0
port.rx_dropped: 12028
rx_missed: 401
align_errors: 0
tx_single_collisions: 0
tx_multi_collisions: 0
rx_unicast: 1230297
rx_broadcast: 5792
rx_multicast: 23973
tx_aborted: 0
tx_underrun: 0
duplicate metric: 1
duplicate_metric: 2