I'm trying to generate (and manage) nagios configuration based on what classes 
have been included by nodes. I've seen the example at 
http://docs.puppetlabs.com/guides/exported_resources.html, and I'm doing that 
now. However, it has some problems:

- puppet runs are very slow on the nagios node

- when I want to change the service configuration in nagios, I have to wait for 
all my puppet agents to check in so they can export a new nagios_service, then 
wait for the nagios node to check in to pick up the exported service

- the nagios configuration is hard to read with human eyes because the same 
service definition is repeated many times, once per node

I'd much rather configure nagios like most people would do it if they weren't 
generating their configs. Rather than having 100 service definitions for 100 
webservers, they have 1 service definition that applies to 100 hosts, or to 1 
hostgroup that has 100 nodes in it.

Here's the problem: I can't think of anything to put in the apache class that 
will result in a host being in the "apache" nagios hostgroup (which ultimately 
is set by a comma delimited string). That's because:

- an element in a comma delimited string is a fragment of a resource (a file), 
so I can't export it

or alternately:

- there's no way to introspect the classes that are included in a manifest and 
generate the corresponding comma delimited string, then export it

Essentially, I want this:

include apache
include exim

To result in this:

file { "/config_file":
 content => "apache,exim\n"
}

Any ideas on how I might accomplish that?

-- 
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