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

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vestrainferno
Posts: 5
Joined: Mon Oct 05, 2015 9:59 am

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

Post 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
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

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

Post by hsmith »

Former Nagios Employee.
me.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

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

Post 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;
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
vestrainferno
Posts: 5
Joined: Mon Oct 05, 2015 9:59 am

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

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

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

Post by lmiltchev »

vestrainferno, I am glad your issue has been resolved! Is it all right if I lock this thread?
Be sure to check out our Knowledgebase for helpful articles and solutions!
vestrainferno
Posts: 5
Joined: Mon Oct 05, 2015 9:59 am

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

Post by vestrainferno »

Yes please go ahead.
Locked