On 11-03-02 02:27 PM, Brian Gallew wrote:
> I've found that Puppet/Naginator has the bad habit of occasionally breaking 
> the Nagios config.  Here's how I worked around this:
> 1) When you collect your Nagios resource, store them all in a temporary 
> directory (in my case, ~nagios/var/tmp)
> 2) Purge that directory with a cron job every night (so deleted resources 
> disappear)
> 3) Create an exec that creates a ~nagios/etc/nagios-tmp.cfg by running sed on 
> ~nagios/etc/nagios.cfg and changing directories appropriately.
> 4) Create an exec that pre-flights Nagios using the nagios-tmp.cfg (which 
> checks the tmp dir) and, if successful, sync the files over into the real 
> Nagios config directory.
> 
> It's a little clunky, but Nagios doesn't ever break anymore.  Remember that 
> your pre-flight exec should require all the Nagios resources (so the files 
> get updated first), and should always run if the contents of the tmp dir vary 
> at all from the real target (diff is your friend here).  Otherwise, the 
> preflight may fail once and then never run again until the next time you make 
> a substantive server change.

hmm, that's an interesting approach. it sounds like it requires a lot of
exec magic but it does cover for the config breakages and also for
purging resources. When I finally get some free time, I'll look into
implementing that. Thanks for the hint.

-- 
Gabriel Filion

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to