Dynamic Nagios Hostgroup members via collected resources?
238 views
Skip to first unread message
smalderma
unread,
Jan 14, 2014, 11:57:08 AM1/14/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to puppet...@googlegroups.com
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.
Nikola Petrov
unread,
Jan 15, 2014, 5:06:40 AM1/15/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to puppet...@googlegroups.com
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...)