How to monitor server with multiply addresses as one host?


#1

I have a lot of multihomed servers, I mean, servers with few NICs and few IP addresses (aliases).
Some of this servers have services, binding by ip. It can be HTTP server at only one ip, and monitoring at another one, and it’s all physically and logically at one server. If you describe this server as one host with one ip, you can’t monitor, for example, HTTP server, because it’s binded on another address of this server.
So, the question is - how can I monitor this server as ONE HOST, without neccesary to split this server to two and more host with unique addresses? Almost all check_* utilities have $HOSTADDRESS$ macro by default, so I can’t just to give another ip in arguments =((


#2

well; what about redefining the check_* so that you can put the IP address as an argument instead of HOSTADDRESS ? :slight_smile:

instead of
define command{
command_name check_http
command_line $USER1$/check_http -H $HOSTADDRESS$
}

do:
define command{
command_name my_check_http
command_line $USER1$/check_http -H $ARG1$
}

problem solved :slight_smile:


#3

It’s too silly method, I’m afraid, to rewrite all check_*…
I supposed, must be more right way, didn’t? I read something about “on-demand macros”, but didn’t understand how to use it.