FAQ
Hi,

I'm moving our monitoring configuration from custom-script to puppet.
One of my main issue is that I have some nagios groups with many host on them.
For exemple, a group for all host which have a munin-node running, a group for
the others, etc ...
So, my goal is to be able to make a nagios_host belong to a list of group in a
non-static way (the list of groups is generated from the different puppet
classes run on each node).
The first thing I thought of was to use a list, for exemple :
@@nagios_host { "foo":
[...]
hostgroups => [ "group1", "group2" ]
}

So that I could easily extend it with something like :
Nagios_host["foo"] {
hostgroups +> ["group3"]
}

But, afaik, puppet does not yet support this (reported as bug #4020) (We use
puppet 2.6.9).

So, my second approach is to use tags and nagios_hostgroups, for exemple :
nagios_host { "foo":
[...]
tag => ["X","Y"]
}
nagios_host { "bar":
[...]
tag => ["Y", "Z"]
}

nagios_hostgroup { "Y":
[...]
members => somemagicfunction("Y")
}

Here, the "somemagicfunction" should be able to find all the list of Nagios_host
resources with the tag "Y", and return a list of their title, so something like
"foo,bar".

Any way to do this ? Or is their any better solution/workaround ?

Regards,

Maxence

--
Maxence Dunnewind

Search Discussions

  • Maxence Dunnewind at Sep 10, 2012 at 6:31 am
    Hi,
    So, my goal is to be able to make a nagios_host belong to a list of group in a
    non-static way (the list of groups is generated from the different puppet
    classes run on each node).
    nobody has an opinion on this, how do you manage your nagios hostgroups
    without setting them in a static/hardcoded way ?


    Maxence
    --
    Maxence Dunnewind
    System Engineer on Bonfire
    Research Center INRIA Rennes - Bretagne Atlantique, France
    Team Myriads, Office E219, tel +33 2 99 84 25 76

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedSep 4, '12 at 1:22p
activeSep 10, '12 at 6:31a
posts2
users1
websitepuppetlabs.com

1 user in discussion

Maxence Dunnewind: 2 posts

People

Translate

site design / logo © 2022 Grokbase