Check_nwc_health issue and no idea how to solve

After a really long time hi again :green_heart:

I’d like to monitor the network interfaces on an Icinga Master, so I do this by using check_nwc_health and --servertype=linuxlocal. For its VPN interface, everyting is running fine:

'/usr/lib/nagios/plugins/check_nwc_health' '--hostname' 'localhost' '--mode' 'interface-health' '--name' 'tun0' '--servertype' 'linuxlocal'

Output is as follows (I wrapped it up a bit):

OK - tun0 is up/up,
interface tun0 usage is in:0.02% (2157.52bit/s) out:0.03% (3127.45bit/s),
interface tun0 errors in:0.00/s out:0.00/s ,
interface tun0 discards in:0.00/s out:0.00/s ,
interface tun0 broadcast in:0.00% out:0.00%

So I try to do exactly the same with eth0:

'/usr/lib/nagios/plugins/check_nwc_health' '--hostname' 'localhost' '--mode' 'interface-health' '--name' 'eth0' '--servertype' 'linuxlocal'

But the confusing output is as follows (wrapped up again):

CRITICAL - interface eth0 usage is in:-2.52% (26386.53bit/s) out:-20.98% (220031.87bit/s),
eth0 is up/up,
interface eth0 errors in:0.00/s out:0.00/s ,
interface eth0 discards in:0.00/s out:0.00/s ,
interface eth0 broadcast in:0.00% out:0.00%

When using it on console with -vvvvvv I get something like this:

info: checking interfaces
[INTERFACE]
broadcastInPercent: 0
broadcastOutPercent: 0
delta_ifInBits: 1195584
delta_ifInBroadcastPkts: 0
delta_ifInDiscards: 0
delta_ifInErrors: 0
delta_ifInMulticastPkts: 0
delta_ifInOctets: 149448
delta_ifInUcastPkts: 0
delta_ifOutBits: 12600248
delta_ifOutBroadcastPkts: 0
delta_ifOutDiscards: 0
delta_ifOutErrors: 0
delta_ifOutMulticastPkts: 0
delta_ifOutOctets: 1575031
delta_ifOutUcastPkts: 0
delta_timestamp: 27
ifAdminStatus: up
ifCarrier: 1
ifDescr: eth0
ifInBroadcastPkts: 0
ifInBroadcastPkts_per_sec: 0
ifInDiscards: 0
ifInDiscards_per_sec: 0
ifInErrors: 0
ifInErrors_per_sec: 0
ifInMulticastPkts: 0
ifInMulticastPkts_per_sec: 0
ifInOctets: 18715362381
ifInOctets_per_sec: 5535.11111111111
ifInUcastPkts: 0
ifInUcastPkts_per_sec: 0
ifIndex: eth0
ifOperStatus: up
ifOutBroadcastPkts: 0
ifOutBroadcastPkts_per_sec: 0
ifOutDiscards: 0
ifOutDiscards_per_sec: 0
ifOutErrors: 0
ifOutErrors_per_sec: 0
ifOutMulticastPkts: 0
ifOutMulticastPkts_per_sec: 0
ifOutOctets: 44538688103
ifOutOctets_per_sec: 58334.4814814815
ifOutUcastPkts: 0
ifOutUcastPkts_per_sec: 0
ifSpeed: -1048576
inputDiscardRate: 0
inputErrorRate: 0
inputRate: 44280.8888888889
inputUtilization: -4.22295464409722
maxInputRate: -1048576
maxOutputRate: -1048576
outputDiscardRate: 0
outputErrorRate: 0
outputRate: 466675.851851852
outputUtilization: -44.5056773998119
sysMaxSpeed: 10
info: interface eth0 broadcast in:0.00% out:0.00%

So for me it seems to be a miscalculation on plugin’s side? Anyone ever seen this behaviour?

Thank you for your ideas,
Marianne

Hi,

is this the first run of the plugin? It caches several data on disk, and takes a delta from it. Might be the case that this hits a negative rate, or an overflow of int32.

What kind of distribution and architecture is your Icinga master?

Cheers,
Michael

Thats your problem try to add --ifspeed to your command with the speed of the interface

1 Like