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!
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
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_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!
$ sudo gem install gmetric
Then install puppet-ganglia as a module in your Puppet master’s module path.
Next, update the
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
[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
Out of sync resources