This support forum board is for support questions relating to
Nagios XI , our flagship commercial network monitoring solution.
OptimusB
Posts: 146 Joined: Mon Oct 27, 2014 10:08 pm
Location: Canada
Contact:
Post
by OptimusB » Mon Jan 05, 2015 6:51 pm
I am configuring SNMP service checks for NetApp aggregate status which returns either Online or Offline. How do I configure the service so that if it returns "Offline" it will set the state to critical?
Code: Select all
[root@ ~]# snmpwalk -v2c -c public <IP> 1.3.6.1.4.1.789.1.5.11.1.5
NETAPP-MIB::aggrState.1026 = STRING: online
Box293
Too Basu
Posts: 5126 Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:
Post
by Box293 » Mon Jan 05, 2015 7:23 pm
check_snmp allows you to perform regular expression matching which can trigger critical states if there is no match.
from check_snmp --help
-R, --eregi=REGEX
Return OK state (for that OID) if case-insensitive extended REGEX matches
This will need some testing, but I think you're after this:
Code: Select all
check_snmp -H <IP> -C public -P 2c -o 1.3.6.1.4.1.789.1.5.11.1.5 -R /online$/
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new
Privacy Policy .
OptimusB
Posts: 146 Joined: Mon Oct 27, 2014 10:08 pm
Location: Canada
Contact:
Post
by OptimusB » Tue Jan 06, 2015 12:31 pm
Thank you. I ended up with the follow argument which worked as instructed.
Code: Select all
check_snmp -H <IP> -P 2c -c public -t 30 -o 1.3.6.1.4.1.789.1.5.11.1.5.1026 -r \online
Tested this with different regex to ensure that status not matching "online" will trigger a critical state. Thanks!