Variable explainations in check_XX plugins
Posted: Thu Jan 06, 2011 2:07 am
Hi,
recently, I encountered a issue about nagios check plugins.
e.g. check_snmp_load
in command, when I run ./check_snmp_load.pl -H XXX.XXX.XXX.XXX -C public -T cisco -w 80,80,80 -c 90,95,100
it's ok and return the correct answer like: CPU: 3 3 3 : OK
but when I begin to use switch.cfg and snmp_load.cfg
here is the snmp_load.cfg content i define
define command {
command_name check_snmp_load
command_line $USER1$/check_snmp_load.pl -H $HOSTADDRESS -C $ARG1$ -T $ARG2$ -w $ARG3$ -c $ARG4$
}
I define one service like below:
define service{
use xxxx
host_name xxxx
service_description cpu monitor
check_command check_snmp_load!public!cisco!80,80,80!90,95,100
}
and in Nagios, it prompts me that "Invalid check type (-T)! "
Any one knows what's the problem? -T follow with cisco, in command it's OK, why in nagios it can't work??
any one can explain the variable and format in cfg file for the command? tks!!!
recently, I encountered a issue about nagios check plugins.
e.g. check_snmp_load
in command, when I run ./check_snmp_load.pl -H XXX.XXX.XXX.XXX -C public -T cisco -w 80,80,80 -c 90,95,100
it's ok and return the correct answer like: CPU: 3 3 3 : OK
but when I begin to use switch.cfg and snmp_load.cfg
here is the snmp_load.cfg content i define
define command {
command_name check_snmp_load
command_line $USER1$/check_snmp_load.pl -H $HOSTADDRESS -C $ARG1$ -T $ARG2$ -w $ARG3$ -c $ARG4$
}
I define one service like below:
define service{
use xxxx
host_name xxxx
service_description cpu monitor
check_command check_snmp_load!public!cisco!80,80,80!90,95,100
}
and in Nagios, it prompts me that "Invalid check type (-T)! "
Any one knows what's the problem? -T follow with cisco, in command it's OK, why in nagios it can't work??
any one can explain the variable and format in cfg file for the command? tks!!!