conditional variable usage (host specific settings)

Marc Powell marc at ena.com
Tue Feb 5 19:18:46 CET 2008



> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> bounces at lists.sourceforge.net] On Behalf Of Rejo Zenger
> Sent: Tuesday, February 05, 2008 11:38 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] conditional variable usage (host specific
> settings)
> 
> Hi there,
> 
> Can I add $ARGn$ like variables to service definitions that are
loading
> other templates? I have this:
> 


> I want to check ssh on $HOSTADDRESS$ for the majority of servers.
There
> are however a number of exeptions. These servers must be checked on
> their secondary IP address.
> 
> Now, can I add something to the first "service definition" so I can
> specify it *only* if the second IP address must be used? So, in the
> third definition, it should be something like "use specific value if
> specified, otherwise use $HOSTADDRESS$".

No, you cannot. I think the closest you can get would be to specify a
different check_command in your first definition that would override the
template check_command. This other check_command could take the argument
of the address you want to check.

--
Marc

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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