define host{
use generic-switch ; Inherit default values from a template
host_name test-fw ; The name we’re giving to this switch
alias test-fw ; A longer name associated with the switch
address 10.10.10.10 ; IP address of the switch
hostgroups firewalls ; Host groups this switch is associated with
}
define service {
host_name test-fw
service_description Status check
check_command check_pix_failover
max_check_attempts 1
}
After restarting nagios it doesn’t seem to show whether the primary or secondary is active I get the following error
Status Information: (null)
Info
firewall pix 535
Nagios 3.03
Red Hat 5
Mysql 5
in your command definition, you have:
command_line $USER1$/check_pix_failover -H $HOSTADDRESS$ -C $USER3$ -o '$ARG1$ -R $ARG2$
meaning that this command is awaiting 2 arguments AND that it will pass the options -o and -R to the plugin
So, you have 2 solutions:
you want to pass the same command as:
./check_pix_failover -H 10.10.10.10 -C password
=> use this line for your command definition:
command_line $USER1$/check_pix_failover -H $HOSTADDRESS$ -C $USER3$
(assuming that your $USER3$ variable is set to “password”!)
use your command definition, because the -o and -R options are usefull, after all
=> check_command check_pix_failover!your_first_arg!your_2nd_arg