O'Reilly logo

Puppet Reporting and Monitoring by Michael Duffy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Writing Custom Reports with PuppetDB

In the previous chapter, we learned about the PuppetDB query API, what it can be used for, and how to leverage the power of its built-in query language. In this chapter, we're going to take that knowledge and use it to create a simple but effective reporting application written in Ruby. We're going to explore the following topics:

  • Creating a skeleton Ruby application
  • Connecting to PuppetDB using JSON
  • Retrieving facts
  • Retrieving events and reports using multiple endpoints

At the end of this chapter, you should be comfortable making use of the PuppetDB query API in your own applications and understand how to process the JSON output of the API.

Creating a basic query application

We're going to start with a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required