Page 1 of 1

Show 100% as ok and lower than 50% as warning

Posted: Fri Dec 11, 2015 3:59 am
by vestrainferno
Morning Guys,

We are trying to setup our UPS on the Nagios XI enviroment, It uses SNMP and I have been able to get it to return the values that we want but I am having issues with the alerts and warning side of Nagios, At the moment the UPS Estimated Charge Remaining is 100% and if I put a -w and -c in the command line and set them for 80 and 50 percent it shows the 100% as critical, I basically want to reverse the way around then alerts are set.

So far I have found no information on where to start or if there is a simple command string to do this, Any help would be much appreciated.

CentOS 7 1503-01
64bit
Manual Install of XI

Re: Show 100% as ok and lower than 50% as warning

Posted: Fri Dec 11, 2015 10:23 am
by hsmith

Re: Show 100% as ok and lower than 50% as warning

Posted: Mon Dec 14, 2015 2:02 am
by Box293
I can get confusing, but the thresholds can be more than just a number.
https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT

Here's an SNMP command using Uptime:
8600000 = 1 day in timeticks

Code: Select all

Command:
check_snmp -H 10.25.4.1 -o sysUpTime.0 -C public -P 2c -l Uptime -c 0:8600000

Output:
SNMP CRITICAL - Uptime *361925100* | Uptime=361925100;;8600000;

Re: Show 100% as ok and lower than 50% as warning

Posted: Mon Dec 14, 2015 5:24 am
by vestrainferno
Box293 you put me on the right path,

Now using

check_xi_service_snmp! -p 161 -o mib-2.33.1.2.4.0 -P 3 --seclevel=noAuthNoPriv --secname=Redacted --authproto=MD5 -x des -u "%" -m SNMPv2-SMI check_stuff -w@80:90 -c@0:80

Which means 100% is fine and I can create warnings for below that figure. Thanks for the help.

Re: Show 100% as ok and lower than 50% as warning

Posted: Mon Dec 14, 2015 1:59 pm
by lmiltchev
vestrainferno, I am glad your issue has been resolved! Is it all right if I lock this thread?

Re: Show 100% as ok and lower than 50% as warning

Posted: Tue Dec 15, 2015 5:16 am
by vestrainferno
Yes please go ahead.