[Nagios-users] Unnecessary host_name and for type loops/multiple check_commands?

Dustin Berube dustin.berube at gmail.com
Mon Apr 2 01:02:22 UTC 2007

First off, let me say that I am in no way a Nagios expert and I'm in the 
process of setting up my monitoring environment as well. But I will do 
my best to help point you in the right direction.

Kelly Jones wrote:

> My questions:

> % Is "host_name localhost" really necessary here? There's no reference
> to $HOSTADDRESS$ anywhere in confirm_dns, but if I don't define
> "host_name", nagios complains.

To my knowledge you must specify the host_name directive.

> % I want to check about 20 hostnames.
>  % Any shortcut to writing 20 6-line "service" definitions?
>  % Can I use a for loop or something?
>  % Use multiple check_command's in a single service (doesn't seem to to work)?

You may want to look at the service templates, here's a few different 
URL's that point to the documenatation on this.

> Of course, I can write a Perl one-liner or something to populate the
> config file, but that seems kludgey. Having looping behavior in the
> config file directly would be really useful for other reasons too.

More information about the Nagios-users mailing list