Each Puppet run on a client generates a report that contains every action taken during the run, log output from the client and metrics showing the performance of the run. This is very useful data, and Puppet provides a number of ways you can process it by default—including saving it to disk, graphing it to RRD, printing it to syslog, or generating email for selected events.
There are also lots of other tools and services where you could send this data. To send the data to new and interesting places we need to provide a report processor. Report processors are plugins that are installed on the Puppet master and process the report output from a client run, and can do things like send metrics to a Graphite server or send an instant message when a Puppet run fails.
Thankfully, like much of the Puppet ecosystem, you don’t need to write your own report processors (although we’ll talk about developing your own report processors in Part II). A large number of processors already exist that you can download from the Puppet Forge, just like you would any Puppet module, and use in your own infrastructure:
# puppet module install puppetlabs-boundary
The first group of report processors we’re going to look at notify a wide variety of services, often when a Puppet run fails. They include alerting services like PagerDuty, instant messaging, IRC or Campfire.
- puppet-campfire: Notify Campfire about failed Puppet runs
- puppet-irc: Send an alert when a Puppet run fails to IRC
- puppet-pagerduty: Notify PagerDuty when a Puppet run fails
- puppet-flowdock: Notify Flowdock about failed Puppet runs
- puppet-growl: Notify Growl about failed Puppet runs
- puppet-hipchat: Notify HipChat about failed Puppet runs
- puppet-xmpp: Notify XMPP-based instant messaging services about failed Puppet runs
- puppet-snmp: Notify an SNMP-based receiver about failed Puppet runs
- puppet-twilio: Notify Twilio about failed Puppet runs
- puppet-twitter: Notify Twitter about failed Puppet runs
We haven’t forgotten about mobile services either. Here are two report processor that let you send alerts from Puppet to your Android or iOS phone so you can keep track of Puppet’s status on the move.
- puppet-pushover: Notify your Android or iOS phone about failed Puppet runs via Pushover
- puppet-boxcar: Notify your iPhone about failed Puppet runs via Boxcar
Additionally integration with Help Desk systems and automatically creating a ticket when a Puppet run fails is also easy, as you can see from the integration with Zendesk below.
Other report processors can be used to send the metric data that Puppet runs generate (how long the run took, the number of resources that changed and many others) to a variety of services including Ganglia, Amazon’s CloudWatch or the event aggregation tool like Riemann.
- puppet-ganglia: Send Puppet metrics to Ganglia
- puppet-riemann: Send Puppet metrics to Riemann
- puppet-cloudwatch: Send Puppet metrics to AWS CloudWatch
- puppetlabs-boundary: Notify Boundary about Puppet runs
- puppet-datadog: Send metrics and events to Datadog
You can see there’s a huge collection of existing report processor you can use out of the box without needing to develop anything. We’d love to see more report processors developed and we’ll talk about how to create your own report processors in Part II of this series.