Unnecessary host_name and for type loops/multiple check_commands?

Dustin Berube dustin.berube at gmail.com
Mon Apr 2 03:02:22 CEST 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.
http://nagios.sourceforge.net/docs/2_0/xodtemplate.html
http://nagios.sourceforge.net/docs/2_0/templatetricks.html


> 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.
> 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list