loading host specific variables?
ibloodyhatespam at gmail.com
ibloodyhatespam at gmail.com
Tue Jul 28 13:25:01 CEST 2009
Well, next to the regular servers.cfg, commands_check.cfg,
commands_definition.cfg etc etc etc there are a couple of things that are
different between hosts (notably event handlers), making one the master host
and one the slave host.
I've already created a hostname1.cfg and a hostname2.cfg containing the host
and service definitions that differ, but I'd like nagios to read either of
these based on the current machine hostname, instead of having to manually
edit nagios.cfg after copying cfgs over from the master host to the slave
host.
-----Original Message-----
From: Christian Schneemann [mailto:cschneemann at suse.de]
Sent: Tuesday 28 July 2009 12:59
To: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] loading host specific variables?
Hi,
On Tuesday July 28 2009 12:31:11 pm ibloodyhatespam at gmail.com wrote:
> Hi,
>
>
>
> I have two redundant nagios hosts, regularly sync their settings and
> it would ease that process quite a bit if nagios would pick the right
> cfg automatically, for example based on hostname (same way you would
> for example be able to let samba load specific smb.cfgs based on the
username).
> Was expecting $HOSTNAME$ to work in nagios.cfg for this purpose, but
> unfortunately it doesn't seem to.
could you explain this with an example? I can't understand what you mean.
Greetings,
Christian
>
>
>
> Would it perhaps be possible to have nagios read host specific cfgs
> based on a variable in a different way?
>
>
>
> -- Mike
--
Christian Schneemann
Operations & Services
-------------------------------------
SUSE LINUX Products GmbH,
Maxfeldstr. 5, D - 90409 Nürnberg
Phone: +49 (0)911 - 740 53 0
e-mail: cschneemann at suse.de
-------------------------------------
SUSE LINUX Products GmbH, GF: Markus Rex HRB 16746 (AG Nürnberg)
----------------------------------------------------------------------------
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus
on what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
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
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
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