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

Feeding data into Dashing


As we've already covered, Dashing uses a series of scheduled jobs written in Ruby that will collect any data that we are interested in. A library called rufus-scheduler controls the scheduling; the rufus-scheduler library allows for great flexibility as to when and how jobs are run, meaning that you could have a lightweight job that scrapes data from a public API and runs every five seconds, and another job that will run every 30 minutes and perform a heavy query on a database.

We're going to create a single job called puppet.rb, and this Ruby code is going to perform the following actions:

  • Gather metrics using PuppetDB's metrics endpoint

  • Gather a list of nodes using PuppetDB's nodes endpoint

  • Use the nodes gathered to gather counts for events that have occurred in the past 30 minutes using PuppetDB's event-counts endpoint

  • Parse the events data to display the state of our hosts

As you can see, we're taking the knowledge that we've gained with PuppetDB over the past two...

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