Contents

Puppet Report Processors Made Easy

This week I wanted to show people how easy it is to write Puppet report processors that do more that just store reports or log output. With that in mind I have written nine new report processors that I’ll be showing over this next week. We’re going to start with two new report processors - Puppet IRC and Puppet Ganglia!

Puppet IRC

The first, the Puppet IRC report processor, notifies an IRC channel of failed Puppet runs with the name of the host that failed and the date. It requires the shout-bot gem to be installed on your Puppet master:

$ sudo gem install shout-bot

You can then install puppet-irc as a module in your Puppet master’s modulepath. Now update the irc_server and irc_channel variables in the /etc/puppet/irc.yaml file with your IRC connection details. An example file is included. Then enable pluginsync and reports on your master and clients in puppet.conf including specifying the irc report processor.

[master]
report = true
reports = irc
pluginsync = true
[agent]
report = true
pluginsync = true

Finally, run the Puppet client and sync the report as a plugin and hey presto you’re logging failures to the IRC channel of your choice!

Puppet Ganglia

Our second report processor is called Puppet Ganglia and sends metrics to a Ganglia server via gmetric (so you need a running Ganglia server!). Firstly, we install the gmetric gem:

$ sudo gem install gmetric

Then install puppet-ganglia as a module in your Puppet master’s module path. Next, update the ganglia_server and ganglia_port variables in the ganglia.yaml file with your Ganglia server IP and port and copy the file to /etc/puppet/. An example file is included in the repository. Lastly, enable pluginsync and reports on your master and clients in puppet.conf

        [master]
        report = true
        reports = ganglia
        pluginsync = true
        [agent]
        report = true
        pluginsync = true

Now when you run the Puppet client metrics will be sent from Puppet straight to Ganglia including metrics like:

  • Config retrieval time

  • File time

  • Filebucket time

  • Total time

  • Changed resources

  • Out of sync resources

  • Skipped resources

  • Total resources

  • Successful events

  • Total events

  • Total changes