Re: [Puppet Users] Dynamic Nagios Hostgroup members via collected resources?

2014-01-15 Thread Nikola Petrov
On Tue, Jan 14, 2014 at 08:57:08AM -0800, smalderma wrote:
 Greetings All,
 
 I've referenced a few older discussions about nagios hostgroups and the 
 nagios_hostgroup resource.  I admit I'm somewhat new to this game, so 
 please excuse my ignorance on the complexities.  I'm looking for a way that 
 puppet can use collections / exported resources to create nagios host 
 groups.  For instance, I'd like a hostgroups for osfamilies, puppet 
 environments, domains, and perhaps virtual or hardware platform.
 
 It seems like using @@nagios_hostgroup on the nodes, and collecting the 
 resources on the Nagios server is not sufficient, when what I'm looking for 
 is one hostgroup named RedHat with members of this osfamily, and another 
 hostgroup named Solaris whose members are of the solaris osfamily.  I've 
 not had much success writing this into puppet, so is this just not 
 possible?  Would I be better served creating custom resource(s) that simply 
 collect lists of node names by the facts I'm interested and then the Nagios 
 server uses those collections as data to populate its set of 
 nagios_hostgroup resources?
 
 Thanks for your thoughts and wisdom.

I think that the only real way to do this properly is to not realize
nagios resources in the standard way. Check
https://github.com/dalen/puppet-puppetdbquery out and see if you can do
your nagios configuration with it. This is currently on my TODO list as
I am feeling the same pain(currently I am defining those in a big hiera
list...)

-- 
Nikola

 
 -- 
 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 view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/3bf39a40-53c1-4de7-8e22-22ab45121927%40googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/20140115100640.GF3682%40nikolavp-desktop.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Dynamic Nagios Hostgroup members via collected resources?

2014-01-14 Thread smalderma
Greetings All,

I've referenced a few older discussions about nagios hostgroups and the 
nagios_hostgroup resource.  I admit I'm somewhat new to this game, so 
please excuse my ignorance on the complexities.  I'm looking for a way that 
puppet can use collections / exported resources to create nagios host 
groups.  For instance, I'd like a hostgroups for osfamilies, puppet 
environments, domains, and perhaps virtual or hardware platform.

It seems like using @@nagios_hostgroup on the nodes, and collecting the 
resources on the Nagios server is not sufficient, when what I'm looking for 
is one hostgroup named RedHat with members of this osfamily, and another 
hostgroup named Solaris whose members are of the solaris osfamily.  I've 
not had much success writing this into puppet, so is this just not 
possible?  Would I be better served creating custom resource(s) that simply 
collect lists of node names by the facts I'm interested and then the Nagios 
server uses those collections as data to populate its set of 
nagios_hostgroup resources?

Thanks for your thoughts and wisdom.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/3bf39a40-53c1-4de7-8e22-22ab45121927%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.