using monitoring & configuration management to restart services
DESCRIPTION
These are the slides from a talk I gave to the Large Scale Production Engineering group in November 2011. The talk is on how to tie Nagios and Puppet together so that puppet can rectify problems detected by Nagios.TRANSCRIPT
![Page 1: Using Monitoring & Configuration Management to restart services](https://reader033.vdocuments.mx/reader033/viewer/2022060109/5556b45ed8b42a9c798b5525/html5/thumbnails/1.jpg)
Greg RetkowskiOperations Engineer, OnLive
Combining Monitoring and CM to restart services.
![Page 2: Using Monitoring & Configuration Management to restart services](https://reader033.vdocuments.mx/reader033/viewer/2022060109/5556b45ed8b42a9c798b5525/html5/thumbnails/2.jpg)
What's in it for me?
● It'll free you up from firefighting
● It'll react faster than a human can
● It's a hedge against technical debt
![Page 3: Using Monitoring & Configuration Management to restart services](https://reader033.vdocuments.mx/reader033/viewer/2022060109/5556b45ed8b42a9c798b5525/html5/thumbnails/3.jpg)
Required Tools
● NAGIOS
● Puppet
![Page 4: Using Monitoring & Configuration Management to restart services](https://reader033.vdocuments.mx/reader033/viewer/2022060109/5556b45ed8b42a9c798b5525/html5/thumbnails/4.jpg)
High Level Diagram
![Page 5: Using Monitoring & Configuration Management to restart services](https://reader033.vdocuments.mx/reader033/viewer/2022060109/5556b45ed8b42a9c798b5525/html5/thumbnails/5.jpg)
Our Puppet Apache Class
![Page 6: Using Monitoring & Configuration Management to restart services](https://reader033.vdocuments.mx/reader033/viewer/2022060109/5556b45ed8b42a9c798b5525/html5/thumbnails/6.jpg)
Nagios service.cfg
![Page 7: Using Monitoring & Configuration Management to restart services](https://reader033.vdocuments.mx/reader033/viewer/2022060109/5556b45ed8b42a9c798b5525/html5/thumbnails/7.jpg)
Nagios commands.cfg
![Page 8: Using Monitoring & Configuration Management to restart services](https://reader033.vdocuments.mx/reader033/viewer/2022060109/5556b45ed8b42a9c798b5525/html5/thumbnails/8.jpg)
Puppet auth.conf● Create an empty namespaceauth.conf● Add this to your auth.conf:
![Page 9: Using Monitoring & Configuration Management to restart services](https://reader033.vdocuments.mx/reader033/viewer/2022060109/5556b45ed8b42a9c798b5525/html5/thumbnails/9.jpg)
Puppet puppet.conf
![Page 10: Using Monitoring & Configuration Management to restart services](https://reader033.vdocuments.mx/reader033/viewer/2022060109/5556b45ed8b42a9c798b5525/html5/thumbnails/10.jpg)
Testing the puppet agent● puppetd –listen –verbose –no-daemonize –no-
client –fqdn `hostname`
![Page 11: Using Monitoring & Configuration Management to restart services](https://reader033.vdocuments.mx/reader033/viewer/2022060109/5556b45ed8b42a9c798b5525/html5/thumbnails/11.jpg)
Invoking puppetrun● puppetrun -a –host FQDN
![Page 12: Using Monitoring & Configuration Management to restart services](https://reader033.vdocuments.mx/reader033/viewer/2022060109/5556b45ed8b42a9c798b5525/html5/thumbnails/12.jpg)
The handle_puppetrun.sh script
![Page 13: Using Monitoring & Configuration Management to restart services](https://reader033.vdocuments.mx/reader033/viewer/2022060109/5556b45ed8b42a9c798b5525/html5/thumbnails/13.jpg)
Bringing it all together
![Page 14: Using Monitoring & Configuration Management to restart services](https://reader033.vdocuments.mx/reader033/viewer/2022060109/5556b45ed8b42a9c798b5525/html5/thumbnails/14.jpg)
![Page 15: Using Monitoring & Configuration Management to restart services](https://reader033.vdocuments.mx/reader033/viewer/2022060109/5556b45ed8b42a9c798b5525/html5/thumbnails/15.jpg)
![Page 16: Using Monitoring & Configuration Management to restart services](https://reader033.vdocuments.mx/reader033/viewer/2022060109/5556b45ed8b42a9c798b5525/html5/thumbnails/16.jpg)
![Page 17: Using Monitoring & Configuration Management to restart services](https://reader033.vdocuments.mx/reader033/viewer/2022060109/5556b45ed8b42a9c798b5525/html5/thumbnails/17.jpg)
![Page 18: Using Monitoring & Configuration Management to restart services](https://reader033.vdocuments.mx/reader033/viewer/2022060109/5556b45ed8b42a9c798b5525/html5/thumbnails/18.jpg)
![Page 19: Using Monitoring & Configuration Management to restart services](https://reader033.vdocuments.mx/reader033/viewer/2022060109/5556b45ed8b42a9c798b5525/html5/thumbnails/19.jpg)
![Page 20: Using Monitoring & Configuration Management to restart services](https://reader033.vdocuments.mx/reader033/viewer/2022060109/5556b45ed8b42a9c798b5525/html5/thumbnails/20.jpg)
Resources
http://www.rage.net/lspe