lausser / check_nwc_health

nwc = network component. This plugin checks lots of aspects of routers, switches, wlan controllers, firewalls,.....
http://labs.consol.de/nagios/check_nwc_health
GNU General Public License v2.0
147 stars 87 forks source link

Ignore ifspeeds below 0 in LinuxLocal #258

Closed smirta closed 3 years ago

smirta commented 3 years ago

In certain configurations when running virtualized (kvm), some distributions (at least Debian 9 and 10) report -1 in /sys/class/net/*/speed if running virtualized (kvm). This leads to miscalculations e.g. ifSpeed: -1048576 # -1*1024*1024. This patch will ignore ifSpeeds less than 0. Percentages won't get calculated because there is no maximum bandwidth set (--ifspeed).