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

Monitoring changes and alerting with Puppet


Our change alert report processor is pretty useful and will inform us when something we've managed has been changed. That's excellent, but there are times when we want to monitor resources that are not necessarily something we also want to manage. A good example is the passwd file in the /etc directory. We will never manage this file directly with Puppet; we have the user and group resource types to do that, but we may still want to know when something has changed it. Luckily, we can do this using the somewhat overlooked audit option within a resource.

Auditing was introduced in Puppet 2.6.0 and allows you to specify a nonmanaged resource within a Puppet manifest. The audit metaparameter tells Puppet that although you do not want to manage the resource, you'd still like it to make note of its values and log when it changes. Take a look at the following example Puppet code:

file { '/etc/passwd':
audit => [ owner, group, mode ],
}

From now on, whenever...

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