Bug #2302
Change the default target of the nagios_* native types to a separate file per resource
| Status: | Rejected | Start: | 05/26/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - | |||
| Affected version: | 0.24.8 | Branch: | ||
| Keywords: | ||||
| Votes: | 0 |
Description
Nagios native types accept a “target” parameter which defines the file the corresponding {check,host,command,*} definition ends up. By default this target is based on the type of nagios resource you’re creating, for instance /etc/nagios/nagios_service.cfg for all resources of type “nagios_service”
Puppet tends to slow down tremendously if you have lots of nagios_* resources. I blogged about this at http://pieter.barrezeele.be/2009/05/11/puppet-and-nagios/ and added a FAQ entry (http://reductivelabs.com/trac/puppet/wiki/FrequentlyAskedQuestions#i-m-using-the-nagios-types-but-the-puppetrun-on-the-server-running-nagios-is-starting-to-take-ages)
But I think it makes more sense to change the default target for the nagios types as nagios supports cfg_dir as well as cfg_file anyway.
I would patch puppet/util/nagios_maker.rb so that the line
target = "/etc/nagios/#{full_name.to_s}.cfg"
looks something like
target = "/etc/nagios/#{full_name.to_s}.d/#{_naginator_name}.cfg"
But unfortunately, the _naginator_name variable is not available at this level.
Any ideas?
Related issues
| related to Puppet - Feature #2304: Add nagios generation script to repository | Closed | 05/27/2009 |
History
Updated by Luke Kanies over 1 year ago
- Status changed from Unreviewed to Rejected
Nagios support has gotten much faster than it was (make sure you really are using 0.24.8 on your Nagios server), but the right approach is to make it faster yet, rather than having each resource in a separate file. And really, that’s not going to make it much faster – you still have quite a bit of overhead.
In the meantime, use naggen from #2304.