jhoblitt/puppet-ganglia — pull request #6 by kitchen (2013-11-20 05:10:45+00:00)
Title: some resourcification of gmond stanzas

This is totally untested and not really ready for merging, but it's kinda what I had in mind in #5

Also, the more I look at the config file, I really think it might be beneficial to create resources for every stanza type, and maybe even pull the default config apart to use those resources (so the main config ends up effectively being a globals/cluster/host section and an include)

Also, I would say with this you would want to have puppet managing the `/etc/ganglia/conf.d` directory fully, but that might break existing things people have, so maybe adding a second include for the puppet-managed one would be better? I'm not a huge fan of calling it conf.d anyways, since there's also gmetad's config in there, so maybe the puppet-managed dir would be `/etc/ganglia/gmond.conf.d/` or something ... shrug.

So, a quick example of why I want this:

```
class profile::ganglia::catcher {
include ganglia::gmond
ganglia::gmond::udp_recv_channel {
port => 8649,
}

@@ganglia::gmond::udp_send_channel {
port => 8649,
host => $::ipaddress,
tag => "clustername",
}
}

class profile::something::else {
include ganglia::gmond
Ganglia::Gmond::Udp_send_channel <<| tag == clustername |>>
}
```

And bam, instant clustering using exported resources as the configuration method. Use that with, say, hiera to set the cluster name and you get even more flexibility.

Also, setting up defines for metrics modules and collection groups it makes things even more flexible (think nagios_service, etc)

Again, this is just a demo and probably isn't ready for merging. If you want me to proceed, I will, though!