Chapter 7. Reporting and Orchestration

Reports return all the log messages from Puppet nodes to the master. In addition to log messages, reports send other useful metrics such as timing (time spent performing different operations) and statistical information (counts of resources and the number of failed resources). With reports, you can know when your Puppet runs fail and, most importantly, why. In this chapter, we will cover the following reporting mechanisms:

  • Syslog
  • Store (YAML)
  • IRC
  • Foreman
  • Puppet Dashboard

In addition to reporting, we will configure the marionette collective (mcollective) system to allow for orchestration tasks. In the course of configuring reporting, we will show different methods of signing and transferring SSL keys for systems that are subordinate to our master, puppet.example.com.

Turning on reporting

To turn on reporting, set report = true in the [agent] section of puppet.conf on all your nodes.

Once you have done that, you need to configure the master to deal with reports. There are several report types included with Puppet; they are listed at: http://docs.puppetlabs.com/references/latest/report.html. Puppet Labs documentation on reporting can be found at: http://docs.puppetlabs.com/guides/reporting.html.

There are three simple reporting options included with Puppet: http, log, and store. The http option will send the report as a YAML file via a POST operation to the HTTP or HTTPS URL pointed to by the reporturl setting in puppet.conf. The log option uses syslog to send reports from the nodes via syslog on the master; this method will only work with the WEBrick and Passenger implementations of Puppet. puppetserver sends syslog messages via the Logback mechanism, which is covered in a following section. The last option is store, which simply stores the report as a file in reportdir of the master.

To use a report, add it by name to the reports section on the master. This is a comma-separated list of reports. You can have many different report handlers. Report handlers are stored at site_ruby/[version]/puppet/reports/ and /var/lib/puppet/lib/puppet/reports. The latter directory is where modules can send report definitions to be installed on clients (using the pluginsync mechanism; remember that things get purged from the pluginsync directories so, unless you are placing files there with Puppet, they will be removed).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset