SlideShare une entreprise Scribd logo
1  sur  45
Automating Monitoring
                   with Puppet

Chris Mague
Moovweb
May 23, 2012                           1
Where I Want to be.....




         +

                          2
What I'll Settle For.....




                            3
Requirements
Rock solid stability
Automated node addition (discovery)
Scales horizontally
Service dependency models
Easy to write plugins
Promotes sane workflows
Unified front end view
Flexible configuration
                                        4
Tool Stack




             5
What????
but #monitoringsucks and #ihatenagios

          How could you?




                                        6
In defense of Nagios


          Been around since 1996
          Has Service dependencies
          Easy to write plugins
          Easy-ish to troubleshoot
          ROCK SOLID


                                     7
Valid attacks on Nagios


No automated discovery
It's complicated to setup
Text files – really?
Front end won't win any beauty contests
Development is slow
Stats collection is a PITA
                                            8
Solutions
Use Icinga!
Use Puppet to auto configure
Stats – leave it to graphite. It's really good at that
Big boys and girls learn their tools




                                                         9
Icinga
Fork of Nagios
Configurations are compatible
More solid architecture ( core, API, Web, IDODB )
Nice front end, nice mobile front end
Can use NRPE




                                                    10
High Level View




                  11
Configure Icinga Servers
using Puppet Standard Types




                              12
Things to configure with Standard Types
icinga.cfg (file)           => icinga main config file
Apache icinga.conf (file)    => http access to each server
cgiauth.cfg (file)          => cgi access
cgi.cfg (file)              => options, users
templates.cfg (file) got lazy => use for basic classes
idomod.cfg (template)       => template for hostname to DB



                                                             13
Configure Icinga using Nagios Types




                                      14
Puppet Nagios Types
nagios_command            nagios_hostgroup
nagios_contact            nagios_service
nagios_contactgroup       nagios_servicedependency
nagios_host               nagios_serviceescalation
nagios_hostdependency     nagios_serviceextinfo
nagios_hostescalation     nagios_servicegroup
nagios_hostextinfo        nagios_timeperiod

                                                     15
Configuring Hosts




                    16
Overview




           17
Detailed Overview




                    18
Store Configs
Store puppet info in a DB
Retrieve information from DB
Share info across nodes
Use thin_storeconfigs
Set up on puppet master




                                            19
Exporting Nagios_host Resources

Export = Save to DB
Use facter for dynamic data
PRO TIP: use ENC
PRO TIP: use targets
PRO TIP: hostgroups
PRO TIP: use tags


                                           20
PRO TIP: Use your ENC




                        21
PRO TIP: use targets
Use cfg_dir in icinga.cfg
Create a unique file per host or
 service
Addition and removal are now
 super easy
Also default dirs are in a
  horrible place /etc/nagios



                                         22
PRO TIP: hostgroups
Add machines to a hostgroup
Add services to a hostgroup
New machines inherit all of the
 services associated with a
 hostgroup




                                        23
PRO TIP: use tags
Tags allow you to filter
 resources so that you only
 realize those resources that
 you need




                                24
Configuring Services/Commands




                                25
Icinga Services
OR 'Stuff I want to monitor'
Associate with a hostgroup
Use a target




                                           26
Icinga Commands
OR 'What actually gets run'




Use Macros to set paths in resource.cfg




                                          27
Dependencies




               28
PRO TIP: Dependencies
Unreliable services
Cut down on the number of alerts
Tell me what's really wrong
Route alerts accordingly




                                       29
Nagios_servicedependencies




                             30
NRPE




       31
NRPE
Runs on client
Secured via SSL
Has ACLs
Runs as nobody
Can run commands
Useful for other things...



                             32
Configuring NRPE




                   33
NRPE Checks




              34
Plugins




          35
exchange.nagios.org




                      36
Writing Plugins
Write in any language
Output 1 line to stdout
NRPE/Icinga/Nagios all use exit
 codes to determine status
Run by hand to check




                                  37
Workflows




            38
Watching Monitoring




                      39
Scheduling Downtime




                      40
Filtering




            41
Alerting




           42
#monitoringisawesome
REMOVE unreliable checks
Just MONITOR – don't bolt on - especially stats
TIER your monitoring
Use timeperiods for sanity
Delegate responses
Use dependencies to pin down problems quickly
Work smart

                                                  43
44
Resources
Icinga
http://icinga.org
Puppet
 http://docs.puppetlabs.com/references/latest/type.html#nagioscommand
NRPE
http://nagios.sourceforge.net/docs/3_0/addons.html
IRC
##infra-talk, #icinga, #puppet
Contact
christianmague@gmail.com, @maguec, #gaijin (freenode), http://blog.mague.com
Thanks
                                                                               45

Contenu connexe

Tendances

Icinga lsm 2015 copy
Icinga lsm 2015 copyIcinga lsm 2015 copy
Icinga lsm 2015 copy
NETWAYS
 

Tendances (20)

Monitoring Open Source Databases with Icinga
Monitoring Open Source Databases with IcingaMonitoring Open Source Databases with Icinga
Monitoring Open Source Databases with Icinga
 
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...
 
Why favour Icinga over Nagios @ FrOSCon 2015
Why favour Icinga over Nagios @ FrOSCon 2015Why favour Icinga over Nagios @ FrOSCon 2015
Why favour Icinga over Nagios @ FrOSCon 2015
 
Icinga 2 and Puppet - Automate Monitoring
Icinga 2 and Puppet - Automate MonitoringIcinga 2 and Puppet - Automate Monitoring
Icinga 2 and Puppet - Automate Monitoring
 
Masterless Puppet Using AWS S3 Buckets and IAM Roles
Masterless Puppet Using AWS S3 Buckets and IAM RolesMasterless Puppet Using AWS S3 Buckets and IAM Roles
Masterless Puppet Using AWS S3 Buckets and IAM Roles
 
Icinga Camp Amsterdam - Icinga Director
Icinga Camp Amsterdam - Icinga DirectorIcinga Camp Amsterdam - Icinga Director
Icinga Camp Amsterdam - Icinga Director
 
Icinga Web 2 is more
Icinga Web 2 is moreIcinga Web 2 is more
Icinga Web 2 is more
 
Why favour Icinga over Nagios @ OSDC 2015
Why favour Icinga over Nagios @ OSDC 2015Why favour Icinga over Nagios @ OSDC 2015
Why favour Icinga over Nagios @ OSDC 2015
 
Icinga Camp Bangalore - Icinga2 and Salt Stack at SnapDeal
Icinga Camp Bangalore - Icinga2 and Salt Stack at SnapDealIcinga Camp Bangalore - Icinga2 and Salt Stack at SnapDeal
Icinga Camp Bangalore - Icinga2 and Salt Stack at SnapDeal
 
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
 
Icinga Camp Antwerp - Icinga2 Configuration
Icinga Camp Antwerp - Icinga2 ConfigurationIcinga Camp Antwerp - Icinga2 Configuration
Icinga Camp Antwerp - Icinga2 Configuration
 
Icinga Camp San Diego: Apify them all
Icinga Camp San Diego: Apify them allIcinga Camp San Diego: Apify them all
Icinga Camp San Diego: Apify them all
 
Ansible Case Studies
Ansible Case StudiesAnsible Case Studies
Ansible Case Studies
 
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
 
Icinga lsm 2015 copy
Icinga lsm 2015 copyIcinga lsm 2015 copy
Icinga lsm 2015 copy
 
Toshaan Bharvani – Icinga2 and Ansible, how to manage and migrate
Toshaan Bharvani – Icinga2 and Ansible, how to manage and migrateToshaan Bharvani – Icinga2 and Ansible, how to manage and migrate
Toshaan Bharvani – Icinga2 and Ansible, how to manage and migrate
 
Icinga 2 API @ Icinga Camp Portland at Puppetlabs
Icinga 2 API @ Icinga Camp Portland at PuppetlabsIcinga 2 API @ Icinga Camp Portland at Puppetlabs
Icinga 2 API @ Icinga Camp Portland at Puppetlabs
 
Masterless puppet
Masterless puppetMasterless puppet
Masterless puppet
 
State of Development - Icinga Meetup Linz August 2019
State of Development - Icinga Meetup Linz August 2019State of Development - Icinga Meetup Linz August 2019
State of Development - Icinga Meetup Linz August 2019
 

En vedette

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
 

En vedette (8)

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 2 and Puppet automate monitoring
Icinga 2 and Puppet  automate monitoringIcinga 2 and Puppet  automate monitoring
Icinga 2 and Puppet automate monitoring
 
Icinga 2 @ SIG-NOC Meeting
Icinga 2 @ SIG-NOC MeetingIcinga 2 @ SIG-NOC Meeting
Icinga 2 @ SIG-NOC Meeting
 
Icinga Camp Bangalore - Icinga2 and Ansible
Icinga Camp Bangalore - Icinga2 and AnsibleIcinga Camp Bangalore - Icinga2 and Ansible
Icinga Camp Bangalore - Icinga2 and Ansible
 
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
 
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
 
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
 

Similaire à Automating Monitoring with Puppet

Django: Beyond Basics
Django: Beyond BasicsDjango: Beyond Basics
Django: Beyond Basics
arunvr
 
The Magic of Symbiotic Security
The Magic of Symbiotic SecurityThe Magic of Symbiotic Security
The Magic of Symbiotic Security
Denim Group
 
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Opersys inc.
 

Similaire à Automating Monitoring with Puppet (20)

Securing the Pipeline
Securing the PipelineSecuring the Pipeline
Securing the Pipeline
 
Django in the Real World
Django in the Real WorldDjango in the Real World
Django in the Real World
 
Leveraging docker for hadoop build automation and big data stack provisioning
Leveraging docker for hadoop build automation and big data stack provisioningLeveraging docker for hadoop build automation and big data stack provisioning
Leveraging docker for hadoop build automation and big data stack provisioning
 
Leveraging Docker for Hadoop build automation and Big Data stack provisioning
Leveraging Docker for Hadoop build automation and Big Data stack provisioningLeveraging Docker for Hadoop build automation and Big Data stack provisioning
Leveraging Docker for Hadoop build automation and Big Data stack provisioning
 
Nagios Conference 2012 - Ethan Galstad - Keynote
Nagios Conference 2012 - Ethan Galstad - KeynoteNagios Conference 2012 - Ethan Galstad - Keynote
Nagios Conference 2012 - Ethan Galstad - Keynote
 
Learning Nagios module 1
Learning Nagios module 1Learning Nagios module 1
Learning Nagios module 1
 
Nagios intro
Nagios intro Nagios intro
Nagios intro
 
Free GitOps Workshop
Free GitOps WorkshopFree GitOps Workshop
Free GitOps Workshop
 
OSMC 2012 | Shinken by Jean Gabès
OSMC 2012 | Shinken by Jean GabèsOSMC 2012 | Shinken by Jean Gabès
OSMC 2012 | Shinken by Jean Gabès
 
Puppet for Sys Admins
Puppet for Sys AdminsPuppet for Sys Admins
Puppet for Sys Admins
 
Pluggable Infrastructure with CI/CD and Docker
Pluggable Infrastructure with CI/CD and DockerPluggable Infrastructure with CI/CD and Docker
Pluggable Infrastructure with CI/CD and Docker
 
Tools For Software Engineering
Tools For Software EngineeringTools For Software Engineering
Tools For Software Engineering
 
Django: Beyond Basics
Django: Beyond BasicsDjango: Beyond Basics
Django: Beyond Basics
 
SlapOS Presentation at VW2011 Seoul
SlapOS Presentation at VW2011 SeoulSlapOS Presentation at VW2011 Seoul
SlapOS Presentation at VW2011 Seoul
 
Intro to Kubernetes & GitOps Workshop
Intro to Kubernetes & GitOps WorkshopIntro to Kubernetes & GitOps Workshop
Intro to Kubernetes & GitOps Workshop
 
The Magic of Symbiotic Security
The Magic of Symbiotic SecurityThe Magic of Symbiotic Security
The Magic of Symbiotic Security
 
DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
DevOpsDays Taipei 2019 - Mastering IaC the DevOps WayDevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Free GitOps Workshop (with Intro to Kubernetes & GitOps)
Free GitOps Workshop (with Intro to Kubernetes & GitOps)Free GitOps Workshop (with Intro to Kubernetes & GitOps)
Free GitOps Workshop (with Intro to Kubernetes & GitOps)
 
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 

Automating Monitoring with Puppet