SlideShare a Scribd company logo
The Art and Zen of Managing Nagios 
with Puppet 
Michael Merideth - VictorOps 
mike@victorops.com
Puppet and Nagios 
• Why use config management? 
• Using Puppet with Nagios: 
• Generating 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 
• Easy to rebuild, easy to back up 
• 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 usually means a 
Puppet Master 
• Saves having to use shared storage or insecure file 
transfers 
• Keeps the number of configuration files low
Exported Resources 
A resource gets defined on one host (web1.dev): 
@@nagios_service { "${::hostname}.${::vo_env}-http": 
check_command => 'check_http', 
use => "${::vo_env}-service", 
display_name => 'http port 80', 
host_name => "${::fqdn}", 
servicegroups => 'application-services', 
service_description => "${::hostname}.${::vo_env}-http", 
tag => "${::vo_env}-service", 
} 
And “collected” on another (nagios1.dev): 
Nagios_service <<| tag == “${::vo_env}-service” |>>
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: 
• Variables defined at run-time, 
on the client 
• Extensible with Ruby 
libraries
Key Puppet Features 
Nagios Resource Types: 
• Makes creating Nagios configs simple 
• Enforces correct syntax 
• Not suitable for every config in every file 
• Warning: This functionality is getting externalized
Key Puppet Features 
Puppet Forge: 
• A public repository of Puppet modules 
• Modules can be libraries, defined resource type 
collections, or classes 
• OMG WARNING: 3rd party submissions are not 
evaluated by Puppet Labs
Why Not Use an Existing Module? 
Functionality I’m looking for: 
• Automatically add new hosts 
• Provision service checks in other modules 
• Automatically remove deactivated hosts 
• Make use of host and service groups
This Approach Isn’t For Everybody 
This Will Work Great if… 
• Servers have 
functional names 
• Environment is 
moderately dynamic 
• Every host and service 
is managed by Puppet 
• 10s or 100s of nodes 
Keep Looking if… 
• Highly elastic 
environment 
• Thousands of nodes 
• Ad-hoc hosts and 
services 
• Need instant response 
to changes
Putting It All Together 
Facter and Puppet Policy Define Roles 
• Facter provides things like fqdn, IP, virtual vs. 
physical, etc. 
• Puppet policy assigns roles based on those 
facts 
• Profile classes are defined for each role
From Facts to Roles 
# vo_env( development or staging) 
case $::domain { 
/^.*dev..*.victorops.net$/: { $vo_env = 'dev' } 
/^.*stg..*.victorops.net$/: { $vo_env = 'stg' } 
default: { fail('VO Environment cannot be determined') } 
} 
# vo_location ( physical location, or 'vagrant' for vagrant environments ) 
case $::domain { 
/^.*vagrant.victorops.net$/: { $vo_location = 'vagrant' } 
default: { fail('VO Location cannot be determined') } 
} 
# Server-type classification by hostname 
$vo_st_nagios_server = $::hostname =~ /^nagios[0-9].*$/ 
$vo_st_puppet_server = $::hostname =~ /^puppet[0-9].*$/ 
$vo_st_web_server = $::hostname =~ /^web[0-9].*$/ 
$vo_st_haproxy_server = $::fqdn =~ /^haproxy.*/
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
hiera.yaml 
--- 
:backends: 
- yaml 
:yaml: 
:datadir: "/etc/puppet/environments/%{::environment}/hieradata" 
:hierarchy: 
- "%{::fqdn}” 
- "%{::vo_env}.%{::vo_location}" 
- "%{::vo_env}" 
- "%{::vo_location}" 
- defaults
Example Hiera Data 
nagios_serverip: '10.2.0.3' 
nagios_config_tmpdir: '/etc/nagios3/tmp/' 
nagios_config_rundir: '/etc/nagios3/objects/' 
nagiosadmin_password: '$apr1$K9h.rQtY$r182KTHAW0IOVSHMW3.DY1' 
nag_local_servicegroups: 
- 'database-services' 
- 'application-services' 
- 'system-services' 
nag_local_contactgroups: 
- 'sysops' 
- 'devops'
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 node’s profile 
• A change to a service config means a change to how 
you monitor it 
• Manage that all in one place 
• NRPE include_dir enables custom NRPE configs
Putting It All Together 
Common service definitions are templatized 
• Not everything needs to be built dynamically 
• Some services are monitored on all hosts 
• A single template means more configuration is in 
one place 
• Templates can be easier to debug
Ugly Hack Alert 
Dynamic files get built every 
run, installed if there’s a diff 
• 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 
• last_run_summary.yaml can also be parsed for failures
The Demo Environment 
Linux 
Ubuntu 14.04LTS “Trusty” 
Puppet 
Community Version 3.7.1 
Nagios 
Core Version 3.5.1 (stock for Ubuntu 14.04)
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 
https://github.com/victorops/puppet-nagios 
• Check it out 
• Contribute! 
• Or fork it! I don’t mind! 
• If you like, help work towards a Puppet Forge module: 
• Paramaterized vo_nagios module 
• Support more Nagios versions 
• Cross platform support 
• Unit tests 
• Documentation
Questions?
The End 
Michael Merideth 
mike@victorops.com 
@vo_mike

More Related Content

What's hot

Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA SolutionsNagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios
 
Jesse Olson - Nagios Log Server Architecture Overview
Jesse Olson - Nagios Log Server Architecture OverviewJesse Olson - Nagios Log Server Architecture Overview
Jesse Olson - Nagios Log Server Architecture Overview
Nagios
 
Nagios Conference 2012 - Mike Weber - Failover
Nagios Conference 2012 - Mike Weber - FailoverNagios Conference 2012 - Mike Weber - Failover
Nagios Conference 2012 - Mike Weber - Failover
Nagios
 
Janice Singh - Writing Custom Nagios Plugins
Janice Singh - Writing Custom Nagios PluginsJanice Singh - Writing Custom Nagios Plugins
Janice Singh - Writing Custom Nagios Plugins
Nagios
 
Mike Guthrie - Revamping Your 10 Year Old Nagios Installation
Mike Guthrie - Revamping Your 10 Year Old Nagios InstallationMike Guthrie - Revamping Your 10 Year Old Nagios Installation
Mike Guthrie - Revamping Your 10 Year Old Nagios Installation
Nagios
 
Bryan Heden - Agile Networks - Using Nagios XI as the platform for Monitoring...
Bryan Heden - Agile Networks - Using Nagios XI as the platform for Monitoring...Bryan Heden - Agile Networks - Using Nagios XI as the platform for Monitoring...
Bryan Heden - Agile Networks - Using Nagios XI as the platform for Monitoring...
Nagios
 
Dave Williams - Nagios Log Server - Practical Experience
Dave Williams - Nagios Log Server - Practical ExperienceDave Williams - Nagios Log Server - Practical Experience
Dave Williams - Nagios Log Server - Practical Experience
Nagios
 
Nagios Conference 2014 - Janice Singh - Real World Uses for Nagios APIs
Nagios Conference 2014 - Janice Singh - Real World Uses for Nagios APIsNagios Conference 2014 - Janice Singh - Real World Uses for Nagios APIs
Nagios Conference 2014 - Janice Singh - Real World Uses for Nagios APIs
Nagios
 
Nagios Conference 2014 - Mike Weber - Nagios Rapid Deployment Options
Nagios Conference 2014 - Mike Weber - Nagios Rapid Deployment OptionsNagios Conference 2014 - Mike Weber - Nagios Rapid Deployment Options
Nagios Conference 2014 - Mike Weber - Nagios Rapid Deployment Options
Nagios
 
Nagios Conference 2013 - John Sellens - Monitoring Remote Locations with Nagios
Nagios Conference 2013 - John Sellens - Monitoring Remote Locations with NagiosNagios Conference 2013 - John Sellens - Monitoring Remote Locations with Nagios
Nagios Conference 2013 - John Sellens - Monitoring Remote Locations with Nagios
Nagios
 
Nrpe
NrpeNrpe
Nagios Conference 2014 - Jim Prins - Passive Monitoring with Nagios
Nagios Conference 2014 - Jim Prins - Passive Monitoring with NagiosNagios Conference 2014 - Jim Prins - Passive Monitoring with Nagios
Nagios Conference 2014 - Jim Prins - Passive Monitoring with Nagios
Nagios
 
Marcelo Perazolo, Lead Software Architect, IBM Corporation - Monitoring a Pow...
Marcelo Perazolo, Lead Software Architect, IBM Corporation - Monitoring a Pow...Marcelo Perazolo, Lead Software Architect, IBM Corporation - Monitoring a Pow...
Marcelo Perazolo, Lead Software Architect, IBM Corporation - Monitoring a Pow...
Nagios
 
Trevor McDonald - Nagios XI Under The Hood
Trevor McDonald  - Nagios XI Under The HoodTrevor McDonald  - Nagios XI Under The Hood
Trevor McDonald - Nagios XI Under The Hood
Nagios
 
Nagios Conference 2013 - Eric Stanley - Whats New Core 4
Nagios Conference 2013 - Eric Stanley - Whats New Core 4Nagios Conference 2013 - Eric Stanley - Whats New Core 4
Nagios Conference 2013 - Eric Stanley - Whats New Core 4
Nagios
 
Marcus Rochelle - Landis+Gyr - Monitoring with Nagios Enterprise Edition
Marcus Rochelle - Landis+Gyr - Monitoring with Nagios Enterprise EditionMarcus Rochelle - Landis+Gyr - Monitoring with Nagios Enterprise Edition
Marcus Rochelle - Landis+Gyr - Monitoring with Nagios Enterprise Edition
Nagios
 
Nagios Conference 2011 - Nate Broderick - Nagios XI Large Implementation Tips...
Nagios Conference 2011 - Nate Broderick - Nagios XI Large Implementation Tips...Nagios Conference 2011 - Nate Broderick - Nagios XI Large Implementation Tips...
Nagios Conference 2011 - Nate Broderick - Nagios XI Large Implementation Tips...
Nagios
 
Nagios XI Best Practices
Nagios XI Best PracticesNagios XI Best Practices
Nagios XI Best Practices
Nagios
 
NGINX Installation and Tuning
NGINX Installation and TuningNGINX Installation and Tuning
NGINX Installation and Tuning
NGINX, Inc.
 
Zabbix Monitoring Platform
Zabbix Monitoring Platform Zabbix Monitoring Platform
Zabbix Monitoring Platform
Seyedmajid Etehadi
 

What's hot (20)

Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA SolutionsNagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
 
Jesse Olson - Nagios Log Server Architecture Overview
Jesse Olson - Nagios Log Server Architecture OverviewJesse Olson - Nagios Log Server Architecture Overview
Jesse Olson - Nagios Log Server Architecture Overview
 
Nagios Conference 2012 - Mike Weber - Failover
Nagios Conference 2012 - Mike Weber - FailoverNagios Conference 2012 - Mike Weber - Failover
Nagios Conference 2012 - Mike Weber - Failover
 
Janice Singh - Writing Custom Nagios Plugins
Janice Singh - Writing Custom Nagios PluginsJanice Singh - Writing Custom Nagios Plugins
Janice Singh - Writing Custom Nagios Plugins
 
Mike Guthrie - Revamping Your 10 Year Old Nagios Installation
Mike Guthrie - Revamping Your 10 Year Old Nagios InstallationMike Guthrie - Revamping Your 10 Year Old Nagios Installation
Mike Guthrie - Revamping Your 10 Year Old Nagios Installation
 
Bryan Heden - Agile Networks - Using Nagios XI as the platform for Monitoring...
Bryan Heden - Agile Networks - Using Nagios XI as the platform for Monitoring...Bryan Heden - Agile Networks - Using Nagios XI as the platform for Monitoring...
Bryan Heden - Agile Networks - Using Nagios XI as the platform for Monitoring...
 
Dave Williams - Nagios Log Server - Practical Experience
Dave Williams - Nagios Log Server - Practical ExperienceDave Williams - Nagios Log Server - Practical Experience
Dave Williams - Nagios Log Server - Practical Experience
 
Nagios Conference 2014 - Janice Singh - Real World Uses for Nagios APIs
Nagios Conference 2014 - Janice Singh - Real World Uses for Nagios APIsNagios Conference 2014 - Janice Singh - Real World Uses for Nagios APIs
Nagios Conference 2014 - Janice Singh - Real World Uses for Nagios APIs
 
Nagios Conference 2014 - Mike Weber - Nagios Rapid Deployment Options
Nagios Conference 2014 - Mike Weber - Nagios Rapid Deployment OptionsNagios Conference 2014 - Mike Weber - Nagios Rapid Deployment Options
Nagios Conference 2014 - Mike Weber - Nagios Rapid Deployment Options
 
Nagios Conference 2013 - John Sellens - Monitoring Remote Locations with Nagios
Nagios Conference 2013 - John Sellens - Monitoring Remote Locations with NagiosNagios Conference 2013 - John Sellens - Monitoring Remote Locations with Nagios
Nagios Conference 2013 - John Sellens - Monitoring Remote Locations with Nagios
 
Nrpe
NrpeNrpe
Nrpe
 
Nagios Conference 2014 - Jim Prins - Passive Monitoring with Nagios
Nagios Conference 2014 - Jim Prins - Passive Monitoring with NagiosNagios Conference 2014 - Jim Prins - Passive Monitoring with Nagios
Nagios Conference 2014 - Jim Prins - Passive Monitoring with Nagios
 
Marcelo Perazolo, Lead Software Architect, IBM Corporation - Monitoring a Pow...
Marcelo Perazolo, Lead Software Architect, IBM Corporation - Monitoring a Pow...Marcelo Perazolo, Lead Software Architect, IBM Corporation - Monitoring a Pow...
Marcelo Perazolo, Lead Software Architect, IBM Corporation - Monitoring a Pow...
 
Trevor McDonald - Nagios XI Under The Hood
Trevor McDonald  - Nagios XI Under The HoodTrevor McDonald  - Nagios XI Under The Hood
Trevor McDonald - Nagios XI Under The Hood
 
Nagios Conference 2013 - Eric Stanley - Whats New Core 4
Nagios Conference 2013 - Eric Stanley - Whats New Core 4Nagios Conference 2013 - Eric Stanley - Whats New Core 4
Nagios Conference 2013 - Eric Stanley - Whats New Core 4
 
Marcus Rochelle - Landis+Gyr - Monitoring with Nagios Enterprise Edition
Marcus Rochelle - Landis+Gyr - Monitoring with Nagios Enterprise EditionMarcus Rochelle - Landis+Gyr - Monitoring with Nagios Enterprise Edition
Marcus Rochelle - Landis+Gyr - Monitoring with Nagios Enterprise Edition
 
Nagios Conference 2011 - Nate Broderick - Nagios XI Large Implementation Tips...
Nagios Conference 2011 - Nate Broderick - Nagios XI Large Implementation Tips...Nagios Conference 2011 - Nate Broderick - Nagios XI Large Implementation Tips...
Nagios Conference 2011 - Nate Broderick - Nagios XI Large Implementation Tips...
 
Nagios XI Best Practices
Nagios XI Best PracticesNagios XI Best Practices
Nagios XI Best Practices
 
NGINX Installation and Tuning
NGINX Installation and TuningNGINX Installation and Tuning
NGINX Installation and Tuning
 
Zabbix Monitoring Platform
Zabbix Monitoring Platform Zabbix Monitoring Platform
Zabbix Monitoring Platform
 

Similar to Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios with Puppet

Puppet Camp Portland: Nagios Management With Puppet (Beginner)
Puppet Camp Portland: Nagios Management With Puppet (Beginner)Puppet Camp Portland: Nagios Management With Puppet (Beginner)
Puppet Camp Portland: Nagios Management With Puppet (Beginner)
Puppet
 
Puppet Camp Denver 2015: Nagios Management With Puppet
Puppet Camp Denver 2015: Nagios Management With PuppetPuppet Camp Denver 2015: Nagios Management With Puppet
Puppet Camp Denver 2015: Nagios Management With Puppet
Puppet
 
The Art and Zen of Managing Nagios With Puppet
The Art and Zen of Managing Nagios With PuppetThe Art and Zen of Managing Nagios With Puppet
The Art and Zen of Managing Nagios With Puppet
Mike Merideth
 
The Art & Zen of Managing Nagios with Puppet
The Art & Zen of Managing Nagios with PuppetThe Art & Zen of Managing Nagios with Puppet
The Art & Zen of Managing Nagios with Puppet
VictorOps
 
DCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production ParityDCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production Parity
Geoff Harcourt
 
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Nicolas Brousse
 
Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011
Bachkoutou Toutou
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
E. Camden Fisher
 
From SaltStack to Puppet and beyond...
From SaltStack to Puppet and beyond...From SaltStack to Puppet and beyond...
From SaltStack to Puppet and beyond...
Yury Bushmelev
 
What's new in Docker - InfraKit - Docker Meetup Berlin 2016
What's new in Docker - InfraKit - Docker Meetup Berlin 2016What's new in Docker - InfraKit - Docker Meetup Berlin 2016
What's new in Docker - InfraKit - Docker Meetup Berlin 2016
Patrick Chanezon
 
Steamlining your puppet development workflow
Steamlining your puppet development workflowSteamlining your puppet development workflow
Steamlining your puppet development workflow
Tomas Doran
 
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Michael Lihs
 
Monitoring your VM's at Scale
Monitoring your VM's at ScaleMonitoring your VM's at Scale
Monitoring your VM's at Scale
Kris Buytaert
 
Our Puppet Story (GUUG FFG 2015)
Our Puppet Story (GUUG FFG 2015)Our Puppet Story (GUUG FFG 2015)
Our Puppet Story (GUUG FFG 2015)
DECK36
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack Summit
Miguel Zuniga
 
How we realized SOA by Python at PyCon JP 2015
How we realized SOA by Python at PyCon JP 2015How we realized SOA by Python at PyCon JP 2015
How we realized SOA by Python at PyCon JP 2015
hirokiky
 
Improving Operations Efficiency with Puppet
Improving Operations Efficiency with PuppetImproving Operations Efficiency with Puppet
Improving Operations Efficiency with Puppet
Nicolas Brousse
 
Experiences from Running Masterless Puppet - PuppetConf 2014
Experiences from Running Masterless Puppet - PuppetConf 2014Experiences from Running Masterless Puppet - PuppetConf 2014
Experiences from Running Masterless Puppet - PuppetConf 2014
Puppet
 
Devops
DevopsDevops
Devops
JyothirmaiG4
 

Similar to Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios with Puppet (20)

Puppet Camp Portland: Nagios Management With Puppet (Beginner)
Puppet Camp Portland: Nagios Management With Puppet (Beginner)Puppet Camp Portland: Nagios Management With Puppet (Beginner)
Puppet Camp Portland: Nagios Management With Puppet (Beginner)
 
Puppet Camp Denver 2015: Nagios Management With Puppet
Puppet Camp Denver 2015: Nagios Management With PuppetPuppet Camp Denver 2015: Nagios Management With Puppet
Puppet Camp Denver 2015: Nagios Management With Puppet
 
The Art and Zen of Managing Nagios With Puppet
The Art and Zen of Managing Nagios With PuppetThe Art and Zen of Managing Nagios With Puppet
The Art and Zen of Managing Nagios With Puppet
 
The Art & Zen of Managing Nagios with Puppet
The Art & Zen of Managing Nagios with PuppetThe Art & Zen of Managing Nagios with Puppet
The Art & Zen of Managing Nagios with Puppet
 
DCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production ParityDCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production Parity
 
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
 
Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
 
From SaltStack to Puppet and beyond...
From SaltStack to Puppet and beyond...From SaltStack to Puppet and beyond...
From SaltStack to Puppet and beyond...
 
What's new in Docker - InfraKit - Docker Meetup Berlin 2016
What's new in Docker - InfraKit - Docker Meetup Berlin 2016What's new in Docker - InfraKit - Docker Meetup Berlin 2016
What's new in Docker - InfraKit - Docker Meetup Berlin 2016
 
Steamlining your puppet development workflow
Steamlining your puppet development workflowSteamlining your puppet development workflow
Steamlining your puppet development workflow
 
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
 
Monitoring your VM's at Scale
Monitoring your VM's at ScaleMonitoring your VM's at Scale
Monitoring your VM's at Scale
 
Our Puppet Story (GUUG FFG 2015)
Our Puppet Story (GUUG FFG 2015)Our Puppet Story (GUUG FFG 2015)
Our Puppet Story (GUUG FFG 2015)
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack Summit
 
How we realized SOA by Python at PyCon JP 2015
How we realized SOA by Python at PyCon JP 2015How we realized SOA by Python at PyCon JP 2015
How we realized SOA by Python at PyCon JP 2015
 
Improving Operations Efficiency with Puppet
Improving Operations Efficiency with PuppetImproving Operations Efficiency with Puppet
Improving Operations Efficiency with Puppet
 
Experiences from Running Masterless Puppet - PuppetConf 2014
Experiences from Running Masterless Puppet - PuppetConf 2014Experiences from Running Masterless Puppet - PuppetConf 2014
Experiences from Running Masterless Puppet - PuppetConf 2014
 
Devops
DevopsDevops
Devops
 

More from Nagios

Sean Falzon - Nagios - Resilient Notifications
Sean Falzon - Nagios - Resilient NotificationsSean Falzon - Nagios - Resilient Notifications
Sean Falzon - Nagios - Resilient Notifications
Nagios
 
Mike Weber - Nagios and Group Deployment of Service Checks
Mike Weber - Nagios and Group Deployment of Service ChecksMike Weber - Nagios and Group Deployment of Service Checks
Mike Weber - Nagios and Group Deployment of Service Checks
Nagios
 
Matt Bruzek - Monitoring Your Public Cloud With Nagios
Matt Bruzek - Monitoring Your Public Cloud With NagiosMatt Bruzek - Monitoring Your Public Cloud With Nagios
Matt Bruzek - Monitoring Your Public Cloud With Nagios
Nagios
 
Eric Loyd - Fractal Nagios
Eric Loyd - Fractal NagiosEric Loyd - Fractal Nagios
Eric Loyd - Fractal Nagios
Nagios
 
Thomas Schmainda - Tracking Boeing Satellites With Nagios - Nagios World Conf...
Thomas Schmainda - Tracking Boeing Satellites With Nagios - Nagios World Conf...Thomas Schmainda - Tracking Boeing Satellites With Nagios - Nagios World Conf...
Thomas Schmainda - Tracking Boeing Satellites With Nagios - Nagios World Conf...
Nagios
 
Nagios World Conference 2015 - Scott Wilkerson Opening
Nagios World Conference 2015 - Scott Wilkerson OpeningNagios World Conference 2015 - Scott Wilkerson Opening
Nagios World Conference 2015 - Scott Wilkerson Opening
Nagios
 
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios CoreNrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
Nagios
 
Nagios Log Server - Features
Nagios Log Server - FeaturesNagios Log Server - Features
Nagios Log Server - Features
Nagios
 
Nagios Network Analyzer - Features
Nagios Network Analyzer - FeaturesNagios Network Analyzer - Features
Nagios Network Analyzer - Features
Nagios
 
Nagios Conference 2014 - Dorance Martinez Cortes - Customizing Nagios
Nagios Conference 2014 - Dorance Martinez Cortes - Customizing NagiosNagios Conference 2014 - Dorance Martinez Cortes - Customizing Nagios
Nagios Conference 2014 - Dorance Martinez Cortes - Customizing Nagios
Nagios
 
Nagios Conference 2014 - Trevor McDonald - Monitoring The Physical World With...
Nagios Conference 2014 - Trevor McDonald - Monitoring The Physical World With...Nagios Conference 2014 - Trevor McDonald - Monitoring The Physical World With...
Nagios Conference 2014 - Trevor McDonald - Monitoring The Physical World With...
Nagios
 
Nagios Conference 2014 - Shamas Demoret - Getting Started With Nagios XI
Nagios Conference 2014 - Shamas Demoret - Getting Started With Nagios XINagios Conference 2014 - Shamas Demoret - Getting Started With Nagios XI
Nagios Conference 2014 - Shamas Demoret - Getting Started With Nagios XI
Nagios
 
Nagios Conference 2014 - Abbas Haider Ali - Proactive Alerting and Intelligen...
Nagios Conference 2014 - Abbas Haider Ali - Proactive Alerting and Intelligen...Nagios Conference 2014 - Abbas Haider Ali - Proactive Alerting and Intelligen...
Nagios Conference 2014 - Abbas Haider Ali - Proactive Alerting and Intelligen...
Nagios
 
Nagios Conference 2014 - Sam Lansing - Utilizing Data Visualizations in Syste...
Nagios Conference 2014 - Sam Lansing - Utilizing Data Visualizations in Syste...Nagios Conference 2014 - Sam Lansing - Utilizing Data Visualizations in Syste...
Nagios Conference 2014 - Sam Lansing - Utilizing Data Visualizations in Syste...
Nagios
 
Nagios Conference 2014 - Paloma Galan - Monitoring Financial Protocols With N...
Nagios Conference 2014 - Paloma Galan - Monitoring Financial Protocols With N...Nagios Conference 2014 - Paloma Galan - Monitoring Financial Protocols With N...
Nagios Conference 2014 - Paloma Galan - Monitoring Financial Protocols With N...
Nagios
 

More from Nagios (15)

Sean Falzon - Nagios - Resilient Notifications
Sean Falzon - Nagios - Resilient NotificationsSean Falzon - Nagios - Resilient Notifications
Sean Falzon - Nagios - Resilient Notifications
 
Mike Weber - Nagios and Group Deployment of Service Checks
Mike Weber - Nagios and Group Deployment of Service ChecksMike Weber - Nagios and Group Deployment of Service Checks
Mike Weber - Nagios and Group Deployment of Service Checks
 
Matt Bruzek - Monitoring Your Public Cloud With Nagios
Matt Bruzek - Monitoring Your Public Cloud With NagiosMatt Bruzek - Monitoring Your Public Cloud With Nagios
Matt Bruzek - Monitoring Your Public Cloud With Nagios
 
Eric Loyd - Fractal Nagios
Eric Loyd - Fractal NagiosEric Loyd - Fractal Nagios
Eric Loyd - Fractal Nagios
 
Thomas Schmainda - Tracking Boeing Satellites With Nagios - Nagios World Conf...
Thomas Schmainda - Tracking Boeing Satellites With Nagios - Nagios World Conf...Thomas Schmainda - Tracking Boeing Satellites With Nagios - Nagios World Conf...
Thomas Schmainda - Tracking Boeing Satellites With Nagios - Nagios World Conf...
 
Nagios World Conference 2015 - Scott Wilkerson Opening
Nagios World Conference 2015 - Scott Wilkerson OpeningNagios World Conference 2015 - Scott Wilkerson Opening
Nagios World Conference 2015 - Scott Wilkerson Opening
 
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios CoreNrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
 
Nagios Log Server - Features
Nagios Log Server - FeaturesNagios Log Server - Features
Nagios Log Server - Features
 
Nagios Network Analyzer - Features
Nagios Network Analyzer - FeaturesNagios Network Analyzer - Features
Nagios Network Analyzer - Features
 
Nagios Conference 2014 - Dorance Martinez Cortes - Customizing Nagios
Nagios Conference 2014 - Dorance Martinez Cortes - Customizing NagiosNagios Conference 2014 - Dorance Martinez Cortes - Customizing Nagios
Nagios Conference 2014 - Dorance Martinez Cortes - Customizing Nagios
 
Nagios Conference 2014 - Trevor McDonald - Monitoring The Physical World With...
Nagios Conference 2014 - Trevor McDonald - Monitoring The Physical World With...Nagios Conference 2014 - Trevor McDonald - Monitoring The Physical World With...
Nagios Conference 2014 - Trevor McDonald - Monitoring The Physical World With...
 
Nagios Conference 2014 - Shamas Demoret - Getting Started With Nagios XI
Nagios Conference 2014 - Shamas Demoret - Getting Started With Nagios XINagios Conference 2014 - Shamas Demoret - Getting Started With Nagios XI
Nagios Conference 2014 - Shamas Demoret - Getting Started With Nagios XI
 
Nagios Conference 2014 - Abbas Haider Ali - Proactive Alerting and Intelligen...
Nagios Conference 2014 - Abbas Haider Ali - Proactive Alerting and Intelligen...Nagios Conference 2014 - Abbas Haider Ali - Proactive Alerting and Intelligen...
Nagios Conference 2014 - Abbas Haider Ali - Proactive Alerting and Intelligen...
 
Nagios Conference 2014 - Sam Lansing - Utilizing Data Visualizations in Syste...
Nagios Conference 2014 - Sam Lansing - Utilizing Data Visualizations in Syste...Nagios Conference 2014 - Sam Lansing - Utilizing Data Visualizations in Syste...
Nagios Conference 2014 - Sam Lansing - Utilizing Data Visualizations in Syste...
 
Nagios Conference 2014 - Paloma Galan - Monitoring Financial Protocols With N...
Nagios Conference 2014 - Paloma Galan - Monitoring Financial Protocols With N...Nagios Conference 2014 - Paloma Galan - Monitoring Financial Protocols With N...
Nagios Conference 2014 - Paloma Galan - Monitoring Financial Protocols With N...
 

Recently uploaded

Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
flufftailshop
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 

Recently uploaded (20)

Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 

Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios with Puppet

  • 1. The Art and Zen of Managing Nagios with Puppet Michael Merideth - VictorOps mike@victorops.com
  • 2. Puppet and Nagios • Why use config management? • Using Puppet with Nagios: • Generating 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 • Easy to rebuild, easy to back up • 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 usually means a Puppet Master • Saves having to use shared storage or insecure file transfers • Keeps the number of configuration files low
  • 7. Exported Resources A resource gets defined on one host (web1.dev): @@nagios_service { "${::hostname}.${::vo_env}-http": check_command => 'check_http', use => "${::vo_env}-service", display_name => 'http port 80', host_name => "${::fqdn}", servicegroups => 'application-services', service_description => "${::hostname}.${::vo_env}-http", tag => "${::vo_env}-service", } And “collected” on another (nagios1.dev): Nagios_service <<| tag == “${::vo_env}-service” |>>
  • 8. 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
  • 9. Key Puppet Features Inline Templates: • Not just for file content • Allows the use of native Ruby code within Puppet policy
  • 10. Key Puppet Features Facter: • Variables defined at run-time, on the client • Extensible with Ruby libraries
  • 11. Key Puppet Features Nagios Resource Types: • Makes creating Nagios configs simple • Enforces correct syntax • Not suitable for every config in every file • Warning: This functionality is getting externalized
  • 12. Key Puppet Features Puppet Forge: • A public repository of Puppet modules • Modules can be libraries, defined resource type collections, or classes • OMG WARNING: 3rd party submissions are not evaluated by Puppet Labs
  • 13. Why Not Use an Existing Module? Functionality I’m looking for: • Automatically add new hosts • Provision service checks in other modules • Automatically remove deactivated hosts • Make use of host and service groups
  • 14. This Approach Isn’t For Everybody This Will Work Great if… • Servers have functional names • Environment is moderately dynamic • Every host and service is managed by Puppet • 10s or 100s of nodes Keep Looking if… • Highly elastic environment • Thousands of nodes • Ad-hoc hosts and services • Need instant response to changes
  • 15. Putting It All Together Facter and Puppet Policy Define Roles • Facter provides things like fqdn, IP, virtual vs. physical, etc. • Puppet policy assigns roles based on those facts • Profile classes are defined for each role
  • 16. From Facts to Roles # vo_env( development or staging) case $::domain { /^.*dev..*.victorops.net$/: { $vo_env = 'dev' } /^.*stg..*.victorops.net$/: { $vo_env = 'stg' } default: { fail('VO Environment cannot be determined') } } # vo_location ( physical location, or 'vagrant' for vagrant environments ) case $::domain { /^.*vagrant.victorops.net$/: { $vo_location = 'vagrant' } default: { fail('VO Location cannot be determined') } } # Server-type classification by hostname $vo_st_nagios_server = $::hostname =~ /^nagios[0-9].*$/ $vo_st_puppet_server = $::hostname =~ /^puppet[0-9].*$/ $vo_st_web_server = $::hostname =~ /^web[0-9].*$/ $vo_st_haproxy_server = $::fqdn =~ /^haproxy.*/
  • 17. 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
  • 18. hiera.yaml --- :backends: - yaml :yaml: :datadir: "/etc/puppet/environments/%{::environment}/hieradata" :hierarchy: - "%{::fqdn}” - "%{::vo_env}.%{::vo_location}" - "%{::vo_env}" - "%{::vo_location}" - defaults
  • 19. Example Hiera Data nagios_serverip: '10.2.0.3' nagios_config_tmpdir: '/etc/nagios3/tmp/' nagios_config_rundir: '/etc/nagios3/objects/' nagiosadmin_password: '$apr1$K9h.rQtY$r182KTHAW0IOVSHMW3.DY1' nag_local_servicegroups: - 'database-services' - 'application-services' - 'system-services' nag_local_contactgroups: - 'sysops' - 'devops'
  • 20. 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
  • 21. Putting It All Together Special service definitions get embedded with the node’s profile • A change to a service config means a change to how you monitor it • Manage that all in one place • NRPE include_dir enables custom NRPE configs
  • 22. Putting It All Together Common service definitions are templatized • Not everything needs to be built dynamically • Some services are monitored on all hosts • A single template means more configuration is in one place • Templates can be easier to debug
  • 23. Ugly Hack Alert Dynamic files get built every run, installed if there’s a diff • Allows automatic removal of decommissioned hosts • Prevents excessive Nagios restarts
  • 24. 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 • last_run_summary.yaml can also be parsed for failures
  • 25. The Demo Environment Linux Ubuntu 14.04LTS “Trusty” Puppet Community Version 3.7.1 Nagios Core Version 3.5.1 (stock for Ubuntu 14.04)
  • 26. 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
  • 27. Running low on slides, so it must be… DEMO TIME!
  • 28. The Demo Environment https://github.com/victorops/puppet-nagios • Check it out • Contribute! • Or fork it! I don’t mind! • If you like, help work towards a Puppet Forge module: • Paramaterized vo_nagios module • Support more Nagios versions • Cross platform support • Unit tests • Documentation
  • 30. The End Michael Merideth mike@victorops.com @vo_mike

Editor's Notes

  1. Here’s what I’m going to be talking about today
  2. And, of course, configuration management lends itself to the world of DevOps; you could almost say it’s a key enabler of DevOps culture. VictorOps is a DevOps shop, so this is important to us 5 years ago I did all of my work in a terminal window Now I do my work in a text editor on my desktop Adapting to DevOps means learning about unit testing and continuous integration pipelines It also means letting developers into the sandbox Okay, we’re all sold on devops, let’s talk about tools. At VictorOps, our configuration management tool of choice is Puppet
  3. Puppet is great, there are other great tools as well. If your thing is Chef, or CFEngine, or Ansible, wonderful. The important thing is that you’re using something and managing your infrastructure For my part, Puppet has some key features that make it a good fit for what I want to do:
  4. I make use of exported resources of a lot of my Nagios configuration
  5. Hiera is a hierarchical database abstraction layer. It allows you to separate code from data: this means… The Hierarchical nature means you can set enterprise-wide defaults and easily override for more specific cases or different locations Hiera supports a variety of back-ends, including an encrypted back-end. This reduces your exposure if the source code for your infrastructure gets stolen, and decreases your attack surface
  6. Inline templates are a great way to define little one-line files, you’ll see this during the demo But it also gives you a way to run native Ruby code within your puppet policy, and have access to more powerful array and string manipulation. You’ll see a bit of that too.
  7. Facter is a little program that comes along with puppet. You tell it how to derive the value of facts and it reports those values back to you Facts become global variables in Puppet policy
  8. Nagios actually has a rich set of nagios resource types built right in. Now, I should note that this functionality is going to be moved out of the core codebase sometime soon, But these features will still be available as a plug-in module. Each resource type represents a “unit” of nagios configuration, Like a host, or service, or command, and so on
  9. Puppet Forge is a public repository of reusable Puppet modules
  10. There are several user-submitted Nagios modules in the Forge, but I wanted one that would..
  11. So, my approach is works great for the sort of environment I’m personally supporting.
  12. Here’s how it works
  13. Here’s an excerpt of the main site manifest for the demo environment
  14. Here’s the hiera.yaml file. This file lives on the puppetmaster. It configures the backend, and defines the hierarchical relationship between the different data stores.
  15. Here’s an excerpt from the hiera database for the demo environment. You can see examples for variables and arrays here
  16. Flip to BBEDIT for this one
  17. Flip to BBEdit
  18. … if you really want to torture yourself you can parse the last_run_summary file and look for errors, but there are better ways of watching that state.
  19. A couple notes on the demo enviornment…