Best way to build this config?

Hicks, Matthew m.hicks at sap.com
Thu Oct 14 23:28:45 CEST 2004


I'm running Nagios 2.0a.

I have a service I want to add to/run on a hostgroup.  The command for the service includes one parameter, tcp port, that is variable across hosts.  

Is there some way to be smart and configure this check for all hosts in a hostgroup?  (That is, without having to create a separate service entry with the correct parameter for each host?)

For instance, I would like to be able to do something clever in the config... A kind of $USERn$ macro, but for hosts, like so:


define host {
	host_name	prodserv
	address	10.10.10.10
	HOST1		9999
      ^^^^^^^^^^^^^^^^
      ...
}

Define hostgroup { ... }

define service {
	check_command	tcp_port!$HOST1$
      hostgroup_name    many_servers
	...
}


TIA,
Matt


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
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