hostaddress variable use in services file?

Aaron Sonntag asonntag at motive.com
Fri Apr 25 23:16:43 CEST 2003


Well I seem to have answered my own question by trying it.  For each
host in my second example... it will pull that $HOSTADDRESS$ from the
respective host definition.  I may be back with more obvious whizbang
questions like this one when I start implementing custom check commands
and try to pass similar variables.
 
--aaron
 
-----Original Message-----
From: Aaron Sonntag 
Sent: Friday, April 25, 2003 3:24 PM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] hostaddress variable use in services file?
 
I have a group of hosts that are webservers.  I want to run the
check_http command against multiple hosts.
 
This is an example from the documentation of multiple hosts service
entry:
  define service{
         host_name              HOST1,HOST2,HOST3,...,HOSTN
         service_description    SOMESERVICE
         other service directives ....
         }
 
Many commands like check_http have a $HOSTADDRESS$ variable.  Is that
somehow pulled from the host definition entry?  If so then the example
below will work.  If not then I have to make a service entry for every
host because hostaddress is different for every host.
  define service{
         host_name              HOST1,HOST2,HOST3,...,HOSTN
         service_description    HTTP
         check_command          check_http
         other service directives ....
         }
 
Do I have to make a different service definition for each host because
the hostaddress is different?
Thanks
 
--aaron
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20030425/bc36d25c/attachment.html>


More information about the Users mailing list