SlideShare a Scribd company logo
The Art and Zen of Managing Nagios with Puppet 
Michael Merideth - VictorOps
Puppet and Nagios 
• Why use config management? 
• Using Puppet with Nagios: 
• Client-generated config 
• Server-generated config 
• Data separation 
• Provisioning and de-provisioning 
• Monitoring Puppet 
• Demo Time!
Why Config Management? 
The age of virtualization 
• IT pros, even at startups, are managing hundreds 
of nodes per person 
• There are simply too many running OSes for most 
shops to manage manually 
• Config management solves the problems of drift 
and inconsistency 
• Config management becomes living documentation
DevOps and Config Management 
DevOps from an IT 
perspective: 
• Infrastructure as code 
• SCM as an IT workflow tool 
• Continuous integration 
• Unit testing 
• Integration testing 
• Letting the developers into the 
sandbox
Key Puppet Features 
• Exported Resources 
• Hiera 
• Inline Templates 
• Facter 
• Nagios Resource Types 
• Puppet Forge
Key Puppet Features 
Exported Resources: 
• A resource gets defined on one host, and 
implemented on another 
• Requires the use of PuppetDB, which means a 
Puppet Master 
• Saves having to use shared storage or insecure file 
transfers 
• Keeps the number of config files low
Key Puppet Features 
Hiera: 
• Separate code from data 
• Set defaults and provide overrides 
• Encrypted back-ends mean security, even if 
your source code is stolen
Key Puppet Features 
Inline Templates: 
• Not just for file content 
• Allows the use of native Ruby code 
within Puppet policy
Key Puppet Features 
Facter: 
• Variable values defined at 
run-time, on the client 
• Easily extensible
Key Puppet Features 
Nagios Resource Types: 
• Makes creating Nagios configs dead simple 
• Enforces correct syntax 
• Not suitable for every config in every file 
• Warning: these will probably get deprecated and 
moved to a PuppetForge module
Key Puppet Features 
Puppet Forge: 
• A public repository of Puppet modules 
• Modules can be libraries, defined resource types, 
or classes 
• OMG CAUTION: 3rd party submissions are not 
guaranteed by Puppet Labs
Why Not Use an Existing Module? 
There are several user-submitted Nagios modules 
in the Forge, but I wanted one that would: 
• Automatically add new hosts 
• Provision some services within other modules 
• Automatically remove decommissioned hosts 
• Make use of host and service groups
Putting It All Together 
Hiera defines the variables 
• Sane defaults for most values 
• Environment-specific overrides (dev, staging, 
production) 
• Site-specific overrides for different datacenters
Putting It All Together 
Clients build their own config: 
• Each client figures out its own hostgroup 
memberships 
• Array is built with an inline template 
• Other facts integrate into the host definition 
• NRPE config built from a common template
Putting It All Together 
Special service definitions get embedded 
with the service module 
• A change to a service means a change to how 
you monitor it 
• Manage that all in one place
Putting It All Together 
Common service definitions are templatized 
• Not everything needs to get built dynamically 
• Some services are monitored on all hosts 
• Less dynamic config means shorter catalog 
compilation 
• Templates can be easier to debug
Ugly Hack Alert 
Dynamic files get built every 
run, installed if there’s a diff 
• Allows keeping backup directories 
with previous versions of the configs 
• Allows automatic removal of 
decommissioned hosts 
• Prevents excessive Nagios restarts
Sidebar: Monitoring Puppet 
On the Puppet master: 
• Apache and passenger processes 
• PuppetDB processes 
• Optionally puppet-dashboard or Foreman 
processes 
On the client: 
• Watch file age on last_run_summary.yaml
The Demo Environment 
Vagrant 
• AWESOME way to test 
Puppet code as you develop 
Github repository 
• Contains Vagrantfile and 
complete Puppet policy 
• github.com/victorops/puppet-nagios
• Running low on slides, so it must be… 
Demo Time!
The Demo Environment 
github.com/victorops/puppet-nagios 
• Check it out! 
• Contribute! 
• Or fork it! I don’t mind! 
• Help work towards a Puppet Forge module: 
• Cleaner Foreman provisioning 
• More types of config resources 
• Cross platform support 
• Documentation

More Related Content

PPTX
The Art and Zen of Managing Nagios With Puppet
PDF
Puppet Camp Portland: Nagios Management With Puppet (Beginner)
PDF
Puppet Camp Denver 2015: Nagios Management With Puppet
ODP
Automating Monitoring with Puppet
PPTX
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
PDF
Using Grunt with Drupal
PDF
PuppetConf 2016: Why Network Automation Matters, and What You Can Do About It...
PDF
PyWPS-4.0.0
The Art and Zen of Managing Nagios With Puppet
Puppet Camp Portland: Nagios Management With Puppet (Beginner)
Puppet Camp Denver 2015: Nagios Management With Puppet
Automating Monitoring with Puppet
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
Using Grunt with Drupal
PuppetConf 2016: Why Network Automation Matters, and What You Can Do About It...
PyWPS-4.0.0

What's hot (20)

PPTX
JavaEdge 2008: Your next version control system
PPTX
Nagios XI Best Practices
PDF
Get There meetup March 2018 - Microservices in action at the Dutch National P...
PDF
Dublin JUG February 2018 - Microservices in action at the Dutch National Police
PDF
Devoxx PL 2018 - Microservices in action at the Dutch National Police
PPTX
Continuous Deployment with Containers
PDF
Version Controlling With Git
PDF
iSense Java Summit 2017 - Microservices in action at the Dutch National Police
PDF
Secure your environment by automation
PDF
JBCNConf 2017 - Building microservices with Vert.x
PDF
GeekOut 2017 - Microservices in action at the Dutch National Police
PPTX
Documentation Updates - Kilo Edition
PDF
Stackato v2
PPTX
What is Nagios XI and how is it different from Nagios Core
PDF
Introduction to Git
PDF
Network Infrastructure as Code with Chef and Cisco
PDF
Learning Git
PDF
Salt Air 19 - Intro to SaltStack RAET (reliable asyncronous event transport)
PDF
OSDC 2013 | The OpenNebula Cloud Platform for Datacenter Virtualization by Co...
PPTX
Nagios Conference 2014 - Sam Lansing - Advanced Features of Nagios XI
JavaEdge 2008: Your next version control system
Nagios XI Best Practices
Get There meetup March 2018 - Microservices in action at the Dutch National P...
Dublin JUG February 2018 - Microservices in action at the Dutch National Police
Devoxx PL 2018 - Microservices in action at the Dutch National Police
Continuous Deployment with Containers
Version Controlling With Git
iSense Java Summit 2017 - Microservices in action at the Dutch National Police
Secure your environment by automation
JBCNConf 2017 - Building microservices with Vert.x
GeekOut 2017 - Microservices in action at the Dutch National Police
Documentation Updates - Kilo Edition
Stackato v2
What is Nagios XI and how is it different from Nagios Core
Introduction to Git
Network Infrastructure as Code with Chef and Cisco
Learning Git
Salt Air 19 - Intro to SaltStack RAET (reliable asyncronous event transport)
OSDC 2013 | The OpenNebula Cloud Platform for Datacenter Virtualization by Co...
Nagios Conference 2014 - Sam Lansing - Advanced Features of Nagios XI
Ad

Similar to The Art & Zen of Managing Nagios with Puppet (20)

PPTX
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
PDF
Drupal 8 - Quick bites
PPTX
Git Going w/ Git
PPTX
Git version control and trunk based approach with VSTS
PDF
Building a server platform with os gi
PPTX
Fluo CICD OpenStack Summit
PDF
PuppetConf 2017: Puppet Development Kit: A Seamless Workflow for Module Devel...
PPTX
Ansible: What, Why & How
PDF
Building a Modular Server Platform with OSGi
PDF
Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...
PPTX
Que nos espera a los ALM Dudes para el 2013?
PPT
Hacking the way you work
PPTX
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
PPTX
Symfony Under Control by Maxim Romanovsky
PPTX
Symfony under control. Continuous Integration and Automated Deployments in Sy...
PDF
Continuous Integration at Mollie
PDF
BYOP: Custom Processor Development with Apache NiFi
PPTX
Using nu get the way you should svcc
PDF
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
PPTX
Magento 2 Workflows
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
Drupal 8 - Quick bites
Git Going w/ Git
Git version control and trunk based approach with VSTS
Building a server platform with os gi
Fluo CICD OpenStack Summit
PuppetConf 2017: Puppet Development Kit: A Seamless Workflow for Module Devel...
Ansible: What, Why & How
Building a Modular Server Platform with OSGi
Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...
Que nos espera a los ALM Dudes para el 2013?
Hacking the way you work
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
Symfony Under Control by Maxim Romanovsky
Symfony under control. Continuous Integration and Automated Deployments in Sy...
Continuous Integration at Mollie
BYOP: Custom Processor Development with Apache NiFi
Using nu get the way you should svcc
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
Magento 2 Workflows
Ad

More from VictorOps (20)

PDF
Failure as Success Devops Roadtrip Seattle 2016
PPTX
DevOps Roadtrip Final Speaking Deck
PDF
DevOps: A Practical Guide
PPTX
Crisis Communication Webinar
PDF
The Importance of Minimum Viable Runbooks Webinar
PPTX
DevOps Roadtrip - Denver
PPTX
VictorOps & Raygun: A Stunning Integration
PPTX
ChatOps: The New Interface of DevOps
PDF
6 Steps to Creating a Minimum Viable Runbook Infographic
PDF
Incident Lifecycle Infographic
PDF
Crisis Management & Why It's Important Infographic
PPTX
Real World ChatOps
PPTX
DevOps Culture Shift: Expanding On-Call Responsibilties
PDF
Tips & Tricks To Reducing TTR
PDF
The Open-Source Monitoring Landscape
PDF
Actors: Not Just for Movies Anymore
PDF
An Introduction to Rearview - Time Series Based Monitoring
PDF
Putting Devs On-Call: How to Empower Your Team
PPTX
ChatOps Unplugged
PDF
Post-mortem Fail
Failure as Success Devops Roadtrip Seattle 2016
DevOps Roadtrip Final Speaking Deck
DevOps: A Practical Guide
Crisis Communication Webinar
The Importance of Minimum Viable Runbooks Webinar
DevOps Roadtrip - Denver
VictorOps & Raygun: A Stunning Integration
ChatOps: The New Interface of DevOps
6 Steps to Creating a Minimum Viable Runbook Infographic
Incident Lifecycle Infographic
Crisis Management & Why It's Important Infographic
Real World ChatOps
DevOps Culture Shift: Expanding On-Call Responsibilties
Tips & Tricks To Reducing TTR
The Open-Source Monitoring Landscape
Actors: Not Just for Movies Anymore
An Introduction to Rearview - Time Series Based Monitoring
Putting Devs On-Call: How to Empower Your Team
ChatOps Unplugged
Post-mortem Fail

Recently uploaded (20)

PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Cloud computing and distributed systems.
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Empathic Computing: Creating Shared Understanding
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Programs and apps: productivity, graphics, security and other tools
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Per capita expenditure prediction using model stacking based on satellite ima...
Digital-Transformation-Roadmap-for-Companies.pptx
Understanding_Digital_Forensics_Presentation.pptx
Electronic commerce courselecture one. Pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Advanced methodologies resolving dimensionality complications for autism neur...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Cloud computing and distributed systems.
The AUB Centre for AI in Media Proposal.docx
Review of recent advances in non-invasive hemoglobin estimation
The Rise and Fall of 3GPP – Time for a Sabbatical?
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Spectroscopy.pptx food analysis technology
Empathic Computing: Creating Shared Understanding
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf

The Art & Zen of Managing Nagios with Puppet

  • 1. The Art and Zen of Managing Nagios with Puppet Michael Merideth - VictorOps
  • 2. Puppet and Nagios • Why use config management? • Using Puppet with Nagios: • Client-generated config • Server-generated config • Data separation • Provisioning and de-provisioning • Monitoring Puppet • Demo Time!
  • 3. Why Config Management? The age of virtualization • IT pros, even at startups, are managing hundreds of nodes per person • There are simply too many running OSes for most shops to manage manually • Config management solves the problems of drift and inconsistency • Config management becomes living documentation
  • 4. DevOps and Config Management DevOps from an IT perspective: • Infrastructure as code • SCM as an IT workflow tool • Continuous integration • Unit testing • Integration testing • Letting the developers into the sandbox
  • 5. Key Puppet Features • Exported Resources • Hiera • Inline Templates • Facter • Nagios Resource Types • Puppet Forge
  • 6. Key Puppet Features Exported Resources: • A resource gets defined on one host, and implemented on another • Requires the use of PuppetDB, which means a Puppet Master • Saves having to use shared storage or insecure file transfers • Keeps the number of config files low
  • 7. Key Puppet Features Hiera: • Separate code from data • Set defaults and provide overrides • Encrypted back-ends mean security, even if your source code is stolen
  • 8. Key Puppet Features Inline Templates: • Not just for file content • Allows the use of native Ruby code within Puppet policy
  • 9. Key Puppet Features Facter: • Variable values defined at run-time, on the client • Easily extensible
  • 10. Key Puppet Features Nagios Resource Types: • Makes creating Nagios configs dead simple • Enforces correct syntax • Not suitable for every config in every file • Warning: these will probably get deprecated and moved to a PuppetForge module
  • 11. Key Puppet Features Puppet Forge: • A public repository of Puppet modules • Modules can be libraries, defined resource types, or classes • OMG CAUTION: 3rd party submissions are not guaranteed by Puppet Labs
  • 12. Why Not Use an Existing Module? There are several user-submitted Nagios modules in the Forge, but I wanted one that would: • Automatically add new hosts • Provision some services within other modules • Automatically remove decommissioned hosts • Make use of host and service groups
  • 13. Putting It All Together Hiera defines the variables • Sane defaults for most values • Environment-specific overrides (dev, staging, production) • Site-specific overrides for different datacenters
  • 14. Putting It All Together Clients build their own config: • Each client figures out its own hostgroup memberships • Array is built with an inline template • Other facts integrate into the host definition • NRPE config built from a common template
  • 15. Putting It All Together Special service definitions get embedded with the service module • A change to a service means a change to how you monitor it • Manage that all in one place
  • 16. Putting It All Together Common service definitions are templatized • Not everything needs to get built dynamically • Some services are monitored on all hosts • Less dynamic config means shorter catalog compilation • Templates can be easier to debug
  • 17. Ugly Hack Alert Dynamic files get built every run, installed if there’s a diff • Allows keeping backup directories with previous versions of the configs • Allows automatic removal of decommissioned hosts • Prevents excessive Nagios restarts
  • 18. Sidebar: Monitoring Puppet On the Puppet master: • Apache and passenger processes • PuppetDB processes • Optionally puppet-dashboard or Foreman processes On the client: • Watch file age on last_run_summary.yaml
  • 19. The Demo Environment Vagrant • AWESOME way to test Puppet code as you develop Github repository • Contains Vagrantfile and complete Puppet policy • github.com/victorops/puppet-nagios
  • 20. • Running low on slides, so it must be… Demo Time!
  • 21. The Demo Environment github.com/victorops/puppet-nagios • Check it out! • Contribute! • Or fork it! I don’t mind! • Help work towards a Puppet Forge module: • Cleaner Foreman provisioning • More types of config resources • Cross platform support • Documentation