Page 1 of 1

NCPA and Metrics issue

Posted: Tue Apr 19, 2016 11:45 am
by tkaufman50
I am new to the forum but not new to Nagios XI. When I first set up our NAGIOS XI server from VM Appliance 64 bit. ( Details in profile.zip ) I used the NSClien++ exclusivley I started converting to the NCPA but have hit a strange snag.

[root@localhost libexec]# ./check_ncpa.py -H x.x.x.x -t 'token' -P 909 -M 'disk/logical/C:|/used_percent' -w 80 -c 92 <--- metrics show up but lose some of the adtional information
such as: Disk Usage on C: Drive 73.00% C:\ - total: 64Gb - used: 47Gb - free 16Gb
All I get now: Disk Usage on C: Drive 73.00% OK:

If I set up as below to get verbose info
[root@localhost libexec]# ./check_ncpa.py -H x.x.x.x -t 'token' -P 909 -M 'disk/logical/C:|/' -u G -w 80 -c 92 <-- metrics disappear

If I set up two configs in CCM it sort of gets me where I want to be. This happens with Disk, Memory, Swap

What am I doing wrong or am I expecting too much? :|

I hope I gave you all everything you need. I am the worst at getting my point across sometimes.

Thanks

Re: NCPA and Metrics issue

Posted: Tue Apr 19, 2016 1:02 pm
by tkaufman50
I removed my profiles.zip file I did not realize that information would be posted publicly.

Re: NCPA and Metrics issue

Posted: Tue Apr 19, 2016 5:13 pm
by lmiltchev
./check_ncpa.py -H x.x.x.x -t 'token' -P 909 -M 'disk/logical/C:|/used_percent' -w 80 -c 92
This check will give you the "used_percent" only, which is normal.

Example:

Code: Select all

[root@localhost nagiosxi]# /usr/local/nagios/libexec/check_ncpa.py -H x.x.x.x -t 'mytoken' -P 5693 -M 'disk/logical/C:|/used_percent' -w 70 -c 90
OK: used_percent was 43% | 'used_percent_0'=43%;70;90;
If you don't pass "used_percent", you will also see "total_size", "used", and "free"...

Example:

Code: Select all

[root@localhost nagiosxi]# /usr/local/nagios/libexec/check_ncpa.py -H x.x.x.x -t 'mytoken' -P 5693 -M 'disk/logical/C:|/' -w 70 -c 90
OK: used_percent was 43% -- total_size was 115394736128b -- used was 50294616064b -- free was 65100120064b | 'used_percent_0'=43%;70;90;
You can view the tree (available metrics) by going to:

Code: Select all

https://ipaddress:5693/api/disk/logical
For more info, see our documentation here:
https://assets.nagios.com/downloads/ncp ... t-the-tree