SlideShare a Scribd company logo
1 of 18
Download to read offline
The	
  Art	
  and	
  Zen	
  of	
  Managing	
  Nagios	
  with	
  Puppet
Michael	
  Merideth	
  -­‐	
  VictorOps
Why	
  Manage	
  Nagios	
  with	
  Puppet?
• It	
  helps	
  avoid	
  monitoring	
  gaps	
  by	
  adding	
  new	
  hosts	
  as	
  
soon	
  as	
  they’re	
  provisioned	
  
• It	
  keeps	
  your	
  Nagios	
  config	
  stylistically	
  and	
  syntactically	
  
consistent	
  
• It’s	
  a	
  cool	
  way	
  to	
  learn	
  about	
  several	
  key	
  Puppet	
  features
Key	
  Puppet	
  Features
• Exported	
  Resources	
  
• Hiera	
  
• Inline	
  Templates	
  
• Facter	
  
• Nagios	
  Resource	
  Types	
  
• Puppet	
  Forge
Key	
  Puppet	
  Features
Exported	
  Resources:	
  
• Resources	
  get	
  defined	
  on	
  one	
  
host,	
  and	
  implemented	
  on	
  
another	
  
• Requires	
  the	
  use	
  of	
  PuppetDB	
  
• Saves	
  having	
  to	
  use	
  shared	
  
storage	
  or	
  insecure	
  file	
  transfers	
  
• Keeps	
  the	
  number	
  of	
  config	
  files	
  
low
	
  	
  @@nagios_host	
  {	
  $::fqdn:	
  
	
  	
  	
  	
  alias	
  	
  	
  	
  	
  	
  	
  =>	
  $nag_alias,	
  
	
  	
  	
  	
  address	
  	
  	
  	
  	
  =>	
  $::ipaddress_eth1	
  
	
  	
  	
  	
  use	
  	
  	
  	
  	
  	
  	
  	
  	
  =>	
  "${::vo_env}-­‐host",	
  
	
  	
  	
  	
  hostgroups	
  	
  =>	
  $::my_hostgroups,	
  
	
  	
  	
  	
  tag	
  	
  	
  	
  	
  	
  	
  	
  	
  =>	
  "${::vo_env}-­‐host",	
  
	
  	
  	
  	
  target	
  	
  	
  	
  	
  	
  =>	
  "${cfg_tmpdir}/hosts.cfg",	
  
	
  	
  	
  	
  owner	
  	
  	
  	
  	
  	
  	
  =>	
  'nagios',	
  
	
  	
  	
  	
  group	
  	
  	
  	
  	
  	
  	
  =>	
  'nagios',	
  
	
  	
  	
  	
  mode	
  	
  	
  	
  	
  	
  	
  	
  =>	
  '0644',	
  
	
  	
  }	
  
Key	
  Puppet	
  Features
Hiera:	
  
• Separate	
  code	
  from	
  data	
  
• Set	
  defaults	
  and	
  provide	
  
overrides	
  
• Encrypted	
  back-­‐ends	
  allow	
  for	
  
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	
  
simple	
  
• Enforces	
  correct	
  syntax	
  
• Not	
  suitable	
  for	
  every	
  config	
  in	
  
every	
  file	
  
• Seems	
  likely	
  to	
  get	
  externalized
Key	
  Puppet	
  Features
Puppet	
  Forge:	
  
• A	
  public	
  repository	
  of	
  Puppet	
  modules	
  
• Modules	
  can	
  be	
  libraries,	
  defined	
  resource	
  
types,	
  or	
  classes	
  
• Quality	
  Score	
  and	
  Community	
  Rating	
  help	
  
you	
  choose	
  safe,	
  well-­‐maintained	
  
modules	
  
• You	
  should	
  still	
  review	
  third-­‐party	
  
modules	
  carefully
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	
  and	
  Facter	
  define	
  the	
  variables	
  
• Sane	
  defaults	
  for	
  most	
  values	
  
• Environment-­‐specific	
  overrides	
  (dev,	
  stage,	
  prod)	
  
• Site-­‐specific	
  overrides	
  for	
  different	
  datacenters
Putting	
  It	
  All	
  Together
Clients	
  build	
  their	
  own	
  config	
  
• Hostgroup	
  membership	
  is	
  determined	
  in	
  the	
  client	
  context	
  
• Array	
  is	
  built	
  with	
  an	
  inline	
  template	
  
• Other	
  facts	
  integrate	
  into	
  the	
  host	
  definition	
  
• NRPE	
  config	
  built	
  from	
  a	
  common	
  template	
  
• Client	
  puppet	
  run	
  exports	
  resources
Putting	
  It	
  All	
  Together
Some	
  service	
  definitions	
  get	
  embedded	
  in	
  the	
  
manifest	
  for	
  that	
  service	
  
• A	
  change	
  to	
  a	
  service	
  may	
  mean	
  a	
  change	
  to	
  how	
  
you	
  monitor	
  it	
  
• Manage	
  that	
  all	
  in	
  one	
  place	
  
• profile::vo_webserver	
  provides	
  an	
  example
Putting	
  It	
  All	
  Together
Some	
  service	
  definitions	
  are	
  done	
  with	
  templates	
  
• 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	
  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
Vagrant	
  
• AWESOME	
  way	
  to	
  test	
  Puppet	
  code	
  as	
  
you	
  develop	
  
Github	
  repository	
  
• Contains	
  Vagrantfile	
  and	
  complete	
  
Puppet	
  policy	
  
• github.com/victorops/puppet-­‐nagios
The	
  Demo	
  Environment	
  
Demo	
  Time!
Running low on slides, so it must be…
The	
  Demo	
  Environment	
  
github.com/victorops/puppet-­‐nagios	
  
• Check	
  it	
  out!	
  
• Contribute!	
  
• Or	
  fork	
  it!	
  
• Help	
  work	
  towards	
  a	
  Puppet	
  Forge	
  module:	
  
• Parameterize	
  the	
  class	
  
• More	
  types	
  of	
  config	
  resources	
  
• Cross	
  platform	
  support	
  
• Documentation

More Related Content

What's hot

Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Software, Inc.
 

What's hot (20)

Network Infrastructure as Code with Chef and Cisco
Network Infrastructure as Code with Chef and CiscoNetwork Infrastructure as Code with Chef and Cisco
Network Infrastructure as Code with Chef and Cisco
 
PyCon India 2012: Celery Talk
PyCon India 2012: Celery TalkPyCon India 2012: Celery Talk
PyCon India 2012: Celery Talk
 
Nagios XI Best Practices
Nagios XI Best PracticesNagios XI Best Practices
Nagios XI Best Practices
 
Getting to push_button_deploys
Getting to push_button_deploysGetting to push_button_deploys
Getting to push_button_deploys
 
Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of Chef
 
What is NetDevOps? How? Leslie Carr PuppetConf 2015
What is NetDevOps? How? Leslie Carr PuppetConf 2015What is NetDevOps? How? Leslie Carr PuppetConf 2015
What is NetDevOps? How? Leslie Carr PuppetConf 2015
 
ServerTemplates - The Next Generation
ServerTemplates - The Next GenerationServerTemplates - The Next Generation
ServerTemplates - The Next Generation
 
Hashicorp Tooling: Value, efficiency & security
Hashicorp Tooling: Value, efficiency & securityHashicorp Tooling: Value, efficiency & security
Hashicorp Tooling: Value, efficiency & security
 
Hashicorp-Terraform_Packer_Vault-by Sushil
Hashicorp-Terraform_Packer_Vault-by SushilHashicorp-Terraform_Packer_Vault-by Sushil
Hashicorp-Terraform_Packer_Vault-by Sushil
 
Net Devops Overview
Net Devops OverviewNet Devops Overview
Net Devops Overview
 
NGINX Installation and Tuning
NGINX Installation and TuningNGINX Installation and Tuning
NGINX Installation and Tuning
 
DEVNET-1144 Deploying hybrid cloud applications with HashiCorp Atlas
DEVNET-1144	Deploying hybrid cloud applications with HashiCorp AtlasDEVNET-1144	Deploying hybrid cloud applications with HashiCorp Atlas
DEVNET-1144 Deploying hybrid cloud applications with HashiCorp Atlas
 
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...
 
Neil Peterson - Azure CLI Deep Dive
Neil Peterson - Azure CLI Deep DiveNeil Peterson - Azure CLI Deep Dive
Neil Peterson - Azure CLI Deep Dive
 
Creating pools of Virtual Machines - ApacheCon NA 2013
Creating pools of Virtual Machines - ApacheCon NA 2013Creating pools of Virtual Machines - ApacheCon NA 2013
Creating pools of Virtual Machines - ApacheCon NA 2013
 
Automation intro
Automation introAutomation intro
Automation intro
 
Apache Curator: Past, Present and Future
Apache Curator: Past, Present and FutureApache Curator: Past, Present and Future
Apache Curator: Past, Present and Future
 
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
 
Continuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as CodeContinuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as Code
 
Provisioning your Environment with Vagrant and Ansible
Provisioning your Environment with Vagrant and AnsibleProvisioning your Environment with Vagrant and Ansible
Provisioning your Environment with Vagrant and Ansible
 

Viewers also liked

The Unrealized Role of Monitoring & Alerting w/ Jason Hand
The Unrealized Role of Monitoring & Alerting w/ Jason HandThe Unrealized Role of Monitoring & Alerting w/ Jason Hand
The Unrealized Role of Monitoring & Alerting w/ Jason Hand
Sonatype
 

Viewers also liked (10)

Monitoring as Code - Ignite
Monitoring as Code - IgniteMonitoring as Code - Ignite
Monitoring as Code - Ignite
 
Icinga Camp Barcelona - Icinga
Icinga Camp Barcelona - IcingaIcinga Camp Barcelona - Icinga
Icinga Camp Barcelona - Icinga
 
Icinga 2 @ SIG-NOC Meeting
Icinga 2 @ SIG-NOC MeetingIcinga 2 @ SIG-NOC Meeting
Icinga 2 @ SIG-NOC Meeting
 
The Unrealized Role of Monitoring & Alerting w/ Jason Hand
The Unrealized Role of Monitoring & Alerting w/ Jason HandThe Unrealized Role of Monitoring & Alerting w/ Jason Hand
The Unrealized Role of Monitoring & Alerting w/ Jason Hand
 
Log Monitoring Simplified - Get the best out of Graylog2 & Icinga 2
Log Monitoring Simplified - Get the best out of Graylog2 & Icinga 2Log Monitoring Simplified - Get the best out of Graylog2 & Icinga 2
Log Monitoring Simplified - Get the best out of Graylog2 & Icinga 2
 
Icinga Camp Bangalore - Icinga2 and Ansible
Icinga Camp Bangalore - Icinga2 and AnsibleIcinga Camp Bangalore - Icinga2 and Ansible
Icinga Camp Bangalore - Icinga2 and Ansible
 
Icinga 2 at Icinga Camp San Francisco
Icinga 2 at Icinga Camp San FranciscoIcinga 2 at Icinga Camp San Francisco
Icinga 2 at Icinga Camp San Francisco
 
Icinga 2 and Puppet automate monitoring
Icinga 2 and Puppet  automate monitoringIcinga 2 and Puppet  automate monitoring
Icinga 2 and Puppet automate monitoring
 
Icinga2 in the middle of your toolstack
Icinga2 in the middle of your toolstackIcinga2 in the middle of your toolstack
Icinga2 in the middle of your toolstack
 
Icinga Camp Bangalore - Icinga integrations
Icinga Camp Bangalore - Icinga integrationsIcinga Camp Bangalore - Icinga integrations
Icinga Camp Bangalore - Icinga integrations
 

Similar to Puppet Camp Portland: Nagios Management With Puppet (Beginner)

BYOP: Custom Processor Development with Apache NiFi
BYOP: Custom Processor Development with Apache NiFiBYOP: Custom Processor Development with Apache NiFi
BYOP: Custom Processor Development with Apache NiFi
DataWorks Summit
 
Netflix oss season 2 episode 1 - meetup Lightning talks
Netflix oss   season 2 episode 1 - meetup Lightning talksNetflix oss   season 2 episode 1 - meetup Lightning talks
Netflix oss season 2 episode 1 - meetup Lightning talks
Ruslan Meshenberg
 

Similar to Puppet Camp Portland: Nagios Management With Puppet (Beginner) (20)

Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
 
Using Grunt with Drupal
Using Grunt with DrupalUsing Grunt with Drupal
Using Grunt with Drupal
 
Automated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAutomated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. Ansible
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack Summit
 
BYOP: Custom Processor Development with Apache NiFi
BYOP: Custom Processor Development with Apache NiFiBYOP: Custom Processor Development with Apache NiFi
BYOP: Custom Processor Development with Apache NiFi
 
Ansible: What, Why & How
Ansible: What, Why & HowAnsible: What, Why & How
Ansible: What, Why & How
 
DCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production ParityDCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production Parity
 
Deployment Strategies: Managing Code, Content, and Configurations
Deployment Strategies: Managing Code, Content, and ConfigurationsDeployment Strategies: Managing Code, Content, and Configurations
Deployment Strategies: Managing Code, Content, and Configurations
 
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
 
OSDC 2013 | Introduction into Chef by Andy Hawkins
OSDC 2013 | Introduction into Chef by Andy HawkinsOSDC 2013 | Introduction into Chef by Andy Hawkins
OSDC 2013 | Introduction into Chef by Andy Hawkins
 
Monitoring your VM's at Scale
Monitoring your VM's at ScaleMonitoring your VM's at Scale
Monitoring your VM's at Scale
 
Netflix oss season 2 episode 1 - meetup Lightning talks
Netflix oss   season 2 episode 1 - meetup Lightning talksNetflix oss   season 2 episode 1 - meetup Lightning talks
Netflix oss season 2 episode 1 - meetup Lightning talks
 
PuppetConf 2017: Unlocking Azure with Puppet Enterprise- Keiran Sweet, Source...
PuppetConf 2017: Unlocking Azure with Puppet Enterprise- Keiran Sweet, Source...PuppetConf 2017: Unlocking Azure with Puppet Enterprise- Keiran Sweet, Source...
PuppetConf 2017: Unlocking Azure with Puppet Enterprise- Keiran Sweet, Source...
 
Ansible for large scale deployment
Ansible for large scale deploymentAnsible for large scale deployment
Ansible for large scale deployment
 
Ansible for large scale deployment
Ansible for large scale deploymentAnsible for large scale deployment
Ansible for large scale deployment
 
Using GitHub Actions to Deploy your Workloads to Azure
Using GitHub Actions to Deploy your Workloads to AzureUsing GitHub Actions to Deploy your Workloads to Azure
Using GitHub Actions to Deploy your Workloads to Azure
 
O365Con19 - Sharing Code Efficiently in your Organisation - Elio Struyf
O365Con19 - Sharing Code Efficiently in your Organisation - Elio StruyfO365Con19 - Sharing Code Efficiently in your Organisation - Elio Struyf
O365Con19 - Sharing Code Efficiently in your Organisation - Elio Struyf
 
Open Source License Compliance with AGL
Open Source License Compliance with AGLOpen Source License Compliance with AGL
Open Source License Compliance with AGL
 
Using nu get the way you should svcc
Using nu get the way you should   svccUsing nu get the way you should   svcc
Using nu get the way you should svcc
 
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 ...
 

More from Puppet

Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepo
Puppet
 
2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)
Puppet
 
Enforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationEnforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automation
Puppet
 

More from Puppet (20)

Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepo
 
Puppetcamp r10kyaml
Puppetcamp r10kyamlPuppetcamp r10kyaml
Puppetcamp r10kyaml
 
2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)
 
Puppet camp vscode
Puppet camp vscodePuppet camp vscode
Puppet camp vscode
 
Modules of the twenties
Modules of the twentiesModules of the twenties
Modules of the twenties
 
Applying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codeApplying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance code
 
KGI compliance as-code approach
KGI compliance as-code approachKGI compliance as-code approach
KGI compliance as-code approach
 
Enforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationEnforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automation
 
Keynote: Puppet camp compliance
Keynote: Puppet camp complianceKeynote: Puppet camp compliance
Keynote: Puppet camp compliance
 
Automating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowAutomating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNow
 
Puppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet: The best way to harden Windows
Puppet: The best way to harden Windows
 
Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020
 
Accelerating azure adoption with puppet
Accelerating azure adoption with puppetAccelerating azure adoption with puppet
Accelerating azure adoption with puppet
 
Puppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael Pinson
 
ServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin Reeuwijk
 
Take control of your dev ops dumping ground
Take control of your  dev ops dumping groundTake control of your  dev ops dumping ground
Take control of your dev ops dumping ground
 
100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software
 
Puppet User Group
Puppet User GroupPuppet User Group
Puppet User Group
 
Continuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsContinuous Compliance and DevSecOps
Continuous Compliance and DevSecOps
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyThe Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
 

Recently uploaded

%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 

Recently uploaded (20)

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 

Puppet Camp Portland: Nagios Management With Puppet (Beginner)

  • 1. The  Art  and  Zen  of  Managing  Nagios  with  Puppet Michael  Merideth  -­‐  VictorOps
  • 2. Why  Manage  Nagios  with  Puppet? • It  helps  avoid  monitoring  gaps  by  adding  new  hosts  as   soon  as  they’re  provisioned   • It  keeps  your  Nagios  config  stylistically  and  syntactically   consistent   • It’s  a  cool  way  to  learn  about  several  key  Puppet  features
  • 3. Key  Puppet  Features • Exported  Resources   • Hiera   • Inline  Templates   • Facter   • Nagios  Resource  Types   • Puppet  Forge
  • 4. Key  Puppet  Features Exported  Resources:   • Resources  get  defined  on  one   host,  and  implemented  on   another   • Requires  the  use  of  PuppetDB   • Saves  having  to  use  shared   storage  or  insecure  file  transfers   • Keeps  the  number  of  config  files   low    @@nagios_host  {  $::fqdn:          alias              =>  $nag_alias,          address          =>  $::ipaddress_eth1          use                  =>  "${::vo_env}-­‐host",          hostgroups    =>  $::my_hostgroups,          tag                  =>  "${::vo_env}-­‐host",          target            =>  "${cfg_tmpdir}/hosts.cfg",          owner              =>  'nagios',          group              =>  'nagios',          mode                =>  '0644',      }  
  • 5. Key  Puppet  Features Hiera:   • Separate  code  from  data   • Set  defaults  and  provide   overrides   • Encrypted  back-­‐ends  allow  for   security,  even  if  your  source   code  is  stolen
  • 6. Key  Puppet  Features Inline  Templates:   • Not  just  for  file  content   • Allows  the  use  of  native  Ruby  code  within   Puppet  policy
  • 7. Key  Puppet  Features Facter:   • Variable  values  defined  at  run-­‐time,  on  the  client   • Easily  extensible
  • 8. Key  Puppet  Features Nagios  Resource  Types:   • Makes  creating  Nagios  configs   simple   • Enforces  correct  syntax   • Not  suitable  for  every  config  in   every  file   • Seems  likely  to  get  externalized
  • 9. Key  Puppet  Features Puppet  Forge:   • A  public  repository  of  Puppet  modules   • Modules  can  be  libraries,  defined  resource   types,  or  classes   • Quality  Score  and  Community  Rating  help   you  choose  safe,  well-­‐maintained   modules   • You  should  still  review  third-­‐party   modules  carefully
  • 10. 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
  • 11. Putting  It  All  Together Hiera  and  Facter  define  the  variables   • Sane  defaults  for  most  values   • Environment-­‐specific  overrides  (dev,  stage,  prod)   • Site-­‐specific  overrides  for  different  datacenters
  • 12. Putting  It  All  Together Clients  build  their  own  config   • Hostgroup  membership  is  determined  in  the  client  context   • Array  is  built  with  an  inline  template   • Other  facts  integrate  into  the  host  definition   • NRPE  config  built  from  a  common  template   • Client  puppet  run  exports  resources
  • 13. Putting  It  All  Together Some  service  definitions  get  embedded  in  the   manifest  for  that  service   • A  change  to  a  service  may  mean  a  change  to  how   you  monitor  it   • Manage  that  all  in  one  place   • profile::vo_webserver  provides  an  example
  • 14. Putting  It  All  Together Some  service  definitions  are  done  with  templates   • 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
  • 15. Ugly  Hack  Alert Dynamic  files  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
  • 16. Vagrant   • AWESOME  way  to  test  Puppet  code  as   you  develop   Github  repository   • Contains  Vagrantfile  and  complete   Puppet  policy   • github.com/victorops/puppet-­‐nagios The  Demo  Environment  
  • 17. Demo  Time! Running low on slides, so it must be…
  • 18. The  Demo  Environment   github.com/victorops/puppet-­‐nagios   • Check  it  out!   • Contribute!   • Or  fork  it!   • Help  work  towards  a  Puppet  Forge  module:   • Parameterize  the  class   • More  types  of  config  resources   • Cross  platform  support   • Documentation