Page 1 of 1

SNMP Monitoring - Status Change Configuration

Posted: Fri Jul 12, 2019 4:54 pm
by treesquid
Nagios XI Version: 5.5.7

I'm attempting to create some SNMP alerts for HP hardware that we have (DL360p G8 servers) utilizing the SNMP Walk wizard. I can get the service check created (as in successful recognition of the OID and supplying of a value from the OID), but i can't get the status (Ok/Warning/Critical) to change when the value changes.

Here's a screenshot of the how i configured it currently. To note there are actually more values i'd want to add to Warning and Critical, but just for now i want to just get it to successfully change state for at least one value.
SNMPWizardConfiguration.PNG
Bay 1 has a status of 4 because i have the power cable unplugged for testing purposes. Even though i stated the 4 value in the Critical Field it's showing as Warning
statuschecks.PNG
Here's the command used by the service check. To note i've attempted to put ** , '' , and "" around each of the numbers to see if that'd change anything and that was not successful.
check_xi_service_snmp! -p 161 -o enterprises.232.6.2.9.3.1.4.1.1 -C dcopublic -P 2c -m CPQHLTH-MIB -w 3 -c 4

Here's info on the OID i'm attempting to utilize
OIDinfo.PNG

Re: SNMP Monitoring - Status Change Configuration

Posted: Mon Jul 15, 2019 12:26 pm
by tgriep
The critical threshold setting it set to create a critical alert is the returned value is over 4 so if you want a critical at exactly 4, you would use this example.

Code: Select all

@4:4
And for the Warning threshold, use this

Code: Select all

@3:3
All other values will generate an OK alert.

Re: SNMP Monitoring - Status Change Configuration

Posted: Tue Jul 16, 2019 9:18 am
by treesquid
Thank you for your response tgriep! i just tested this and it worked. Out of interest, was there any documentation i missed that had this answer in it?

Until i read your post a co-worker found the solution of putting -r 2 at the end of the command, which would make anything critical that wasn't a 2, (as far as we observed).

Re: SNMP Monitoring - Status Change Configuration

Posted: Tue Jul 16, 2019 4:12 pm
by tgriep
My example came from of the Thresholds example on this site.
https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT

The @ means that the data falls between the values separated by the : but when you set the value to the same number, it pretty much changes it to exactly equal that number.