On 2/20/2013 5:09 PM, Sans wrote:
[snip]
Yes you can (overlooked that point, really) until a service
(nagios_service type) is defined. I think, my actual question would be,
how can I query if a host with certain name (property) is up and only
include that service if the node count is at least one or more.

I use a very bad hack to do this. I have a define that looks like this (simplified):

define nagios::server::plugin ($inject_class) {
    include $inject_class
}


The nagios server listens for exported resources of this type:

Nagios::Server::Plugin<<| |>>


If a class needs to be defined on the nagios server by a node, it simply
calls

        @@nagios::server::plugin { ...:
                inject_class => "<some plugin class>"
        }

and the server will pick it up and realize it. As long as the plugin is a class and not a define (and requires no params), there will be no harm with multiple nodes broadcasting the same plugin; it will still be realized only once.

-Taj.

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


Reply via email to