Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Puppet Reporting and Monitoring

You're reading from   Puppet Reporting and Monitoring Create insightful reports for your server infrastructure using Puppet

Arrow left icon
Product type Paperback
Published in Jun 2014
Publisher
ISBN-13 9781783981427
Length 186 pages
Edition Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Michael Duffy Michael Duffy
Author Profile Icon Michael Duffy
Michael Duffy
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Puppet Reporting and Monitoring
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Setting Up Puppet for Reporting FREE CHAPTER 2. Viewing Data in Dashboards 3. Introducing Report Processors 4. Creating Your Own Report Processor 5. Exploring PuppetDB 6. Retrieving Data with the PuppetDB API 7. Writing Custom Reports with PuppetDB 8. Creating Your Own Custom Dashboard 9. Looking Back and Looking Forward Index

Creating a basic query application


We're going to start with a simple application to explore the PuppetDB API. This will get us acquainted with the basic tools that we need to access the API and extract data from it. Open your favorite editor and create a new file called basic_report.rb.

The basic report application is going to be very straightforward and will simply pull back some basic details about a host using the facts endpoint. This will demonstrate the basic techniques we're going to use to write a more fully featured application later on in this chapter.

Note

The code in this chapter has been designed to run against Ruby v1.9 and above, and it will throw errors if it's run on earlier versions. If you're using a RedHat-based distribution prior to RedHat Enterprise Linux 7, then you will almost certainly be running a version of Ruby 1.8. If you are running one of these operating systems, then I recommend that you use Ruby Version Manager (https://rvm.io) to install a more recent version...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime