NAGIOS SNMP TRAP
Posted: Wed Apr 24, 2013 2:07 pm
The following Nagios SNMP trap works great on the command line:
[root@bo-bb objects]# /usr/local/nagios/libexec/check_snmp -H 10.167.148.113 -o .1.3.6.1.4.1.232.3.2.5.1.1.6 -P 1 -n SNMP OK - 2 | iso.3.6.1.4.1.232.3.2.5.1.1.6.0.0=2
I'm trying to incorporate that command into a Nagios check.
I have the following in the commands file:
define command{
command_name HP_PowerSupply_Degraded
command_line $USER1$/check_snmp -H $HOSTADDRESS$ -o $ARG1$ -P $ARG2$ -n
}
So ARG1 is the OID - .1.3.6.1.4.1.232.3.2.5.1.1.6
and ARG2 is the _p variable - 1
I have the following monitoredhost.cfg file:
define service{
use generic-service
host_name monitoredhost
service_description Power Supply Health
check_command check_snmp!.1.3.6.1.4.1.232.3.2.5.1.1.6!1
}
When the command runs I get
No OID specified
But I specify the OID in the check_command line above.
Any advice or help would be greatly appreciated.
[root@bo-bb objects]# /usr/local/nagios/libexec/check_snmp -H 10.167.148.113 -o .1.3.6.1.4.1.232.3.2.5.1.1.6 -P 1 -n SNMP OK - 2 | iso.3.6.1.4.1.232.3.2.5.1.1.6.0.0=2
I'm trying to incorporate that command into a Nagios check.
I have the following in the commands file:
define command{
command_name HP_PowerSupply_Degraded
command_line $USER1$/check_snmp -H $HOSTADDRESS$ -o $ARG1$ -P $ARG2$ -n
}
So ARG1 is the OID - .1.3.6.1.4.1.232.3.2.5.1.1.6
and ARG2 is the _p variable - 1
I have the following monitoredhost.cfg file:
define service{
use generic-service
host_name monitoredhost
service_description Power Supply Health
check_command check_snmp!.1.3.6.1.4.1.232.3.2.5.1.1.6!1
}
When the command runs I get
No OID specified
But I specify the OID in the check_command line above.
Any advice or help would be greatly appreciated.