Querying PuppetDB for report information

Essentially, we're going to use the same techniques that we learned in the previous examples, but the way we process the data is going to change. One thing you'll almost immediately notice is that each endpoint has its own particular format; although they all return JSON output, sometimes, it's a JSON array, other times, a flat JSON document, and so on. When working with PuppetDB, it's worth reviewing the documentation for the endpoints, as it contains an excellent rundown of what to expect. Again, you can find the documentation at https://docs.puppetlabs.com/puppetdb/latest/.

Tip

One tool that can be enormously helpful when exploring data such as the PuppetDB API is the pp library that ships with Ruby. The ...

Get Puppet Reporting and Monitoring now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.