NagiosEnterprises / ncpa

Nagios Cross-Platform Agent
Other
180 stars 94 forks source link

NCPA 2.1.9 Interface Check Inaccurate readout #586

Open Maverick87Shaka opened 5 years ago

Maverick87Shaka commented 5 years ago

Hi, Anyone is experiencing some trouble with NCPA Interface Monitoring? I Think the reading is wrong. First things, I've always a less count on the HOST machine rather than the windows VM, and I've also other 2 VM running on the same host, so, it's impossible.

Nagios_+nagios rampc it+-+Google+Chrome+2019-10-19+15 51 28

Other thing, watching the VM, the value should be around 500KB/sec of average, while the counter is showing only 118KB/sec

DCS_bandwidth

jomann09 commented 5 years ago

The discrepancy may be the time at which it checks for values. The way that we get per second values is we take the last time the check was ran and then take the current bytes_sent and we get the amount of data that was passed between the last check and now. Then we take the time_now - time_last_checked and get the time that passed in seconds. We then divide current_bytes_sent - last_check_bytes_sent / seconds_passed and that is what gives the B/s value.

The reason this can be significant is that if your checks are every 5 mins, it is possible to have a spike 5 mins ago that is recorded on one check, and then nothing showing on the other check because it was recorded the check before. Or will be recorded on the next check.