sensu-plugins / sensu-plugins-network-checks

This plugin provides native network instrumentation for monitoring and metrics collection, including: hardware, TCP response, RBLs, whois, port status, and more.

Home Page:http://sensu-plugins.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Metrics-net plugin reports -1, 65535 or 4294967295 when not connected.

Debilski opened this issue · comments

Not sure if it depends on the kernel version but when the interface is not connected to the network, cat /sys/class/net/$IF/speed may report either -1, 65535 (=2^16 - 1) or 4294967295 (=2^32 - 1).

Sounds like it should be pretty easy to check those conditions and use unknown to let the user know that the interface is disconnected. Could you put together a pr for this?

https://rubygems.org/gems/sensu-plugins-network-checks/versions/3.2.0 has been released which allows you to specify --only-up which would prevent "unexpected" results from being collected. If there is anything else you need please comment back.