Page 1 of 2

Outlandish Bandwidth Metric - New to NagiosXI

Posted: Fri Jun 12, 2015 2:04 pm
by angus
I have several hosts being monitored currently. Everything is working well with the exception of the Bandwidth in and out metrics with the NCPA agent. All of my ports are gig ports. This obviously means my speeds are maxed out at 1000mbps yet I have speeds reporting at 332454M/sec as shown in the attached image. These speeds happen with both inbound and outbound. Can some help me to understand the situation here?

Thanks,
Scott

Re: Outlandish Bandwidth Metric - New to NagiosXI

Posted: Mon Jun 15, 2015 10:11 am
by lmiltchev
What is the version of the NCPA agent that you are currently using? Can you show us the actual "inbound/outbound" commands, run from the command line along with the output of them? Hide sensitive info.

Also, run the following command and show us the output:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -V

Re: Outlandish Bandwidth Metric - New to NagiosXI

Posted: Tue Jun 16, 2015 8:45 am
by angus
Attached is the result of the command "/usr/local/nagios/libexec/check_ncpa.py -V". The client version of the NCPA agent is ncpa-1.8.1.

I am unsure on how to run the check command at the command line.
Check Command
Check_xi_ncpa_agent

Command view
$USER1$/check_ncpa.py -H $HOSTADDRESS$ $ARG1$

$ARG1$
-t 'N/A' -P 'X' -M 'interface/Local Area Connection/bytes_recv' -d -u M -w 10000 -c 15000

Thanks

Re: Outlandish Bandwidth Metric - New to NagiosXI

Posted: Tue Jun 16, 2015 9:19 am
by tmcdonald
Try this:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -V
/usr/local/nagios/libexec/check_ncpa.py -H $HOSTADDRESS$ -t 'N/A' -P 'X' -M 'interface/Local Area Connection/bytes_recv' -d -u M -w 10000 -c 15000
Making sure to replace "$HOSTADDRESS$" with the remote machine's address.

The reason it did not work in your screen is because, although you are in the right directory, you need a "./" before the name of what you want to run in the local directory. The "./" means "This directory" and allows you to run a command that might have the same name as a system command. However, you can also specify the full path to the program, which is what I did above.

Re: Outlandish Bandwidth Metric - New to NagiosXI

Posted: Tue Jun 16, 2015 10:39 am
by angus
Thanks for the CLI tip. I am new to Linux as well.

Attached are the results of those commands.

Thanks.

Re: Outlandish Bandwidth Metric - New to NagiosXI

Posted: Tue Jun 16, 2015 4:37 pm
by tmcdonald
For one of those misreporting services, can you go to the details and screenshot both the Overview and the Advanced tabs?

Re: Outlandish Bandwidth Metric - New to NagiosXI

Posted: Tue Jun 16, 2015 4:49 pm
by ssax
Looks like the results are returning in bytes, try changing the command to:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H HOSTADDRESS -t 'yourpassword' -P 5693 -M 'interface/Local Area Connection/bytes_recv' -d -w 10000 -c 15000
That will show it in bytes.

The real problem is there is a bug in the ncpa client.

You could edit the check_ncpa.py plugin and change (around line 68) from:

Code: Select all

'unit'      : options.unit,
To:

Code: Select all

'units'      : options.unit,
Now you can use the -u setting.

For Kilobytes:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H HOSTADDRESS -t 'yourpassword' -P 5693 -M 'interface/Local Area Connection/bytes_recv' -d -w 10000 -c 15000 -u K
For Megabytes (if you are under 1M you will show 0M):

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H HOSTADDRESS -t 'yourpassword' -P 5693 -M 'interface/Local Area Connection/bytes_recv' -d -w 10000 -c 15000 -u M

Re: Outlandish Bandwidth Metric - New to NagiosXI

Posted: Tue Jun 16, 2015 4:52 pm
by ssax
Or you can upgrade to NCPA 1.8.X, they fixed the bug in those versions.

Re: Outlandish Bandwidth Metric - New to NagiosXI

Posted: Wed Jun 17, 2015 8:16 am
by angus
I made the change from Unit to Units and was able to specify the M.

How will this help me? Is the bug causing a calculation error and by specifying the unit the calculation is corrected?

Re: Outlandish Bandwidth Metric - New to NagiosXI

Posted: Wed Jun 17, 2015 9:29 am
by ssax
Here is the way it's supposed to work according to the API.
- Pass in units and it will do the calculations and return the proper number with the B,M,K,etc appended.
- Pass in unit and it will just append that value on to the result, so you could pass in -u HELLOBYTES and it would return something like 21404HELLOBYTES.

https://assets.nagios.com/downloads/ncp ... l/api.html

Without fixing the plugin it was actually just appending M onto the delta of bytes_received in bytes, so the actual value returned was in bytes but it was appending an M on it.