check_multi configuration help


#1

Hello all,

I am attempting to configure check_multi for smtp checks on my server cluster. Each server has anywhere from 3 - 6 IPs on it, each listening on port 25. I have the plugin working mostly, however, the problem is that since not every server has 6 IPs on it, the checks will spew unknown errors. Is there any way to get rid of that with an eval statement? If so, what would be a quick and dirty. Below are my configs with examples:

#My .cmd file

command pl1] = check_smtp -H $_HOSTADDRESS1$ -t 30
command pl2] = check_smtp -H $_HOSTADDRESS2$ -t 30
command pl3] = check_smtp -H $_HOSTADDRESS3$ -t 30
command pl4] = check_smtp -H $_HOSTADDRESS4$ -t 30
command pl5] = check_smtp -H $_HOSTADDRESS5$ -t 30
command pl6] = check_smtp -H $_HOSTADDRESS6$ -t 30

#commands.cfg

define command{
command_name check_pl
command_line $USER1$/check_multi -f $USER1$/pl.cmd -r31
}

host examples

define host{
host_name host_with_3_ips
address xxx.xxx.xxx.xxx
hostgroups pl1,pl2,pl3
_ADDRESS1 xxx.xxx.xxx.xxx
_ADDRESS2 xxx.xxx.xxx.xxx
_ADDRESS3 xxx.xxx.xxx.xxx
}

define host{
host_name host_with_6_IPs
address xxx.xxx.xxx.xxx
hostgroups pl1,pl2,pl3,pl4,pl5,pl6
_ADDRESS1 xxx.xxx.xxx.xxx
_ADDRESS2 xxx.xxx.xxx.xxx
_ADDRESS3 xxx.xxx.xxx.xxx
_ADDRESS4 xxx.xxx.xxx.xxx
_ADDRESS5 xxx.xxx.xxx.xxx
_ADDRESS6 xxx.xxx.xxx.xxx
}

#service

define service {

check_command check_pl


}