conditional inclusion of cfg files
Jonathan Mills
jonmills at email.unc.edu
Tue Feb 19 03:07:40 CET 2008
So I think what I'm going to do is rsync the same files everywhere,
but use cfengine to manage the nagios.cfg file on each poller.
Actually, I'm looking at using Puppet instead of cfengine. I also
want to use this to control the nrpe.cfg on each server of course.
If you're going to do it from scratch, Puppet looks a lot cleaner and
more modern than cfengine.
Anyone with Puppet feedback?
On Feb 18, 2008, at 2:31 PM, "Justin Hitt" <hittjw at gmail.com> wrote:
> Jonathan,
>
> Jonathan Mills wrote:
>>> Okay, let's say you have lots of distributed pollers, which should
>>> only load cfg files for their particular environment (both hosts and
>>> services). However, you'd like to manage the same set of "global"
>>> cfg
>
> I setup configurations in subdirectories by datacenter (location of
> the distributed poller) then have a local 'sed' check change the
> location of the configuration relevant to that specific box.
>
> These directories are also broken out individually ...
>
> $NAGIOS_HOME/etc/corporate/$ASSET_GROUP/{hosts,groups,contact}.cfg
> $NAGIOS_HOME/etc/datacenter/$CITY_STATE/{hosts,groups,contact}.cfg
> $NAGIOS_HOME/etc/thirdparty/$VENDOR/{hosts,groups,contact}.cfg
>
> All my pollers check a common pool ("corporate", "thirdparty") and
> have local checks for their own site ("datacenter".) $CITY_STATE
> could also be the name of your host, that makes 'sed' a little easier.
>
> Use 'cfg_dir='
>
> You could use 'cfengine', I use 'sed', but just comment out all
> datacenters on your console and uncomment the one necessary for a
> particular datacenter. If you won't want to use 'sed' or 'cfengine'
> then just uncomment it by hand.
>
> Best,
>
> Justin
> --
> Attention Sales And Marketing Professionals Who Serve B2B Executives
> http://hittpublishingdirect.com/
-------------------------------------------------------------------------
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