[Nagiosplug-help] check_multi configuration help

Rich Kazala closedown at gmail.com
Wed Apr 14 20:09:46 CEST 2010


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? If the _ADDRESS* does not exist on my host
statements, i do not even want the .cmd to check for that one. 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
...
...
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20100414/25bdf187/attachment.html>


More information about the Help mailing list