SlideShare a Scribd company logo
Michael Merideth - VictorOps 
The Art and Zen of Managing Nagios with Puppet
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 used 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 
evaluated 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
Putting It All Together 
Config gets checked before it goes live 
• Build a complete config in a non-live directory 
• Run a check with nagios -v after the build 
• Only if that succeeds, do we move the config into 
the live directory
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 & Zen of Managing Nagios with Puppet
PDF
Puppet Camp Portland: Nagios Management With Puppet (Beginner)
PDF
Puppet Camp Denver 2015: Nagios Management With Puppet
PPTX
ASP.NET 5 - Microsoft's Web development platform reimagined
ODP
Automating Monitoring with Puppet
PPTX
Nagios XI Best Practices
PPTX
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
PDF
PuppetConf 2016: Why Network Automation Matters, and What You Can Do About It...
The Art & Zen of Managing Nagios with Puppet
Puppet Camp Portland: Nagios Management With Puppet (Beginner)
Puppet Camp Denver 2015: Nagios Management With Puppet
ASP.NET 5 - Microsoft's Web development platform reimagined
Automating Monitoring with Puppet
Nagios XI Best Practices
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
PuppetConf 2016: Why Network Automation Matters, and What You Can Do About It...

What's hot (20)

PDF
OSDC 2018 | Scaling & High Availability MySQL learnings from the past decade+...
PPTX
Top 10 dev ops tools (1)
PDF
OSDC 2018 | Self Hosted bare Metal Kubernetes for SMEs by Thomas Hoppe
PPTX
Nagios Conference 2014 - Sam Lansing - Advanced Features of Nagios XI
PPTX
Documentation Updates - Kilo Edition
PPTX
Continuous Deployment with Containers
PPTX
TechWiseTV Open NX-OS Workshop
PDF
Learning Git
PDF
Introduction to Git
ODP
On the Importance of Infrastructure as Code
PDF
OSDC 2018 | Monitoring Kubernetes at Scale by Monica Sarbu
PDF
JBCNConf 2017 - Building microservices with Vert.x
PDF
GeekOut 2017 - Microservices in action at the Dutch National Police
PPTX
Neutron Updates - Kilo Edition
PPTX
Warden @ Meet magento Romania 2021
PDF
Migrating NYSenate.gov
PDF
2011 Essex Summit: Openstack/Hyper-V clouds
PDF
Marcelo Perazolo, Lead Software Architect, IBM Corporation - Monitoring a Pow...
PPTX
Performance of Microservice frameworks on different JVMs
PPTX
Testing Without a GUI Using TestComplete
OSDC 2018 | Scaling & High Availability MySQL learnings from the past decade+...
Top 10 dev ops tools (1)
OSDC 2018 | Self Hosted bare Metal Kubernetes for SMEs by Thomas Hoppe
Nagios Conference 2014 - Sam Lansing - Advanced Features of Nagios XI
Documentation Updates - Kilo Edition
Continuous Deployment with Containers
TechWiseTV Open NX-OS Workshop
Learning Git
Introduction to Git
On the Importance of Infrastructure as Code
OSDC 2018 | Monitoring Kubernetes at Scale by Monica Sarbu
JBCNConf 2017 - Building microservices with Vert.x
GeekOut 2017 - Microservices in action at the Dutch National Police
Neutron Updates - Kilo Edition
Warden @ Meet magento Romania 2021
Migrating NYSenate.gov
2011 Essex Summit: Openstack/Hyper-V clouds
Marcelo Perazolo, Lead Software Architect, IBM Corporation - Monitoring a Pow...
Performance of Microservice frameworks on different JVMs
Testing Without a GUI Using TestComplete
Ad

Similar to The Art and Zen of Managing Nagios With Puppet (20)

PPTX
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
PPTX
Fluo CICD OpenStack Summit
PDF
Drupal 8 - Quick bites
PDF
How bigtop leveraged docker for build automation and one click hadoop provis...
PPTX
Ansible: What, Why & How
PDF
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
ODP
Monitoring your VM's at Scale
PPTX
Symfony Under Control by Maxim Romanovsky
PPTX
Symfony under control. Continuous Integration and Automated Deployments in Sy...
PDF
Building a server platform with os gi
PDF
Continuous delivery with open source tools
PPTX
Introduction to jenkins
PPTX
Git Going w/ Git
PPTX
Git version control and trunk based approach with VSTS
PPTX
DCRUG: Achieving Development-Production Parity
PDF
Using Grunt with Drupal
PPTX
Que nos espera a los ALM Dudes para el 2013?
KEY
Automating Web Application Deployment
PPTX
Magento 2 Workflows
PDF
Building a Modular Server Platform with OSGi
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
Fluo CICD OpenStack Summit
Drupal 8 - Quick bites
How bigtop leveraged docker for build automation and one click hadoop provis...
Ansible: What, Why & How
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
Monitoring your VM's at Scale
Symfony Under Control by Maxim Romanovsky
Symfony under control. Continuous Integration and Automated Deployments in Sy...
Building a server platform with os gi
Continuous delivery with open source tools
Introduction to jenkins
Git Going w/ Git
Git version control and trunk based approach with VSTS
DCRUG: Achieving Development-Production Parity
Using Grunt with Drupal
Que nos espera a los ALM Dudes para el 2013?
Automating Web Application Deployment
Magento 2 Workflows
Building a Modular Server Platform with OSGi
Ad

Recently uploaded (20)

PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
A Presentation on Artificial Intelligence
PDF
cuic standard and advanced reporting.pdf
PDF
Getting Started with Data Integration: FME Form 101
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Big Data Technologies - Introduction.pptx
PPTX
1. Introduction to Computer Programming.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
A comparative analysis of optical character recognition models for extracting...
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
A Presentation on Artificial Intelligence
cuic standard and advanced reporting.pdf
Getting Started with Data Integration: FME Form 101
Digital-Transformation-Roadmap-for-Companies.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
20250228 LYD VKU AI Blended-Learning.pptx
MYSQL Presentation for SQL database connectivity
Unlocking AI with Model Context Protocol (MCP)
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
MIND Revenue Release Quarter 2 2025 Press Release
Big Data Technologies - Introduction.pptx
1. Introduction to Computer Programming.pptx
Network Security Unit 5.pdf for BCA BBA.
Per capita expenditure prediction using model stacking based on satellite ima...
Reach Out and Touch Someone: Haptics and Empathic Computing
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
A comparative analysis of optical character recognition models for extracting...

The Art and Zen of Managing Nagios With Puppet

  • 1. Michael Merideth - VictorOps The Art and Zen of Managing Nagios with Puppet
  • 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 used 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 evaluated 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. Putting It All Together Config gets checked before it goes live • Build a complete config in a non-live directory • Run a check with nagios -v after the build • Only if that succeeds, do we move the config into the live directory
  • 18. 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
  • 19. 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
  • 20. 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
  • 21. • Running low on slides, so it must be… Demo Time!
  • 22. 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