Nagios and Mod-GearmanIn a Large-ScaleEnvironment Jason Cook <jcook@verisign.com> 8/28/2012
A Brief History of Nagios at VerisignVerisign Public 2
Legacy Nagios Setup • Whitepaper NSCA configuration • Typical 3-Tier setup • Remote System ...
Simplified Passive Architecture DiagramVerisign Public 4
Challenges with our passive setup • Scaling the Nagios server layers • Requires changes to all NSCA instances ...
Challenges with our passive setup (continued) • Lack of centralized scheduling • Adjusting schedules can be di...
A Move to Active MonitoringVerisign Public 7
An alternative arises… • Gearman • Provides a generic application framework to farm out work to ot...
Simplified Active Architecture DiagramVerisign Public 9
Some details about the setup • All components run in VMs • Nagios 3.4.1 (with nanosleep) • Merlin (1.1.15) • Mod-G...
VM Configuration & Performance • VM Configuration: • 4 V-CPUs • 2GB RAM • Linux 2.6.32 •...
Application Configurations • Nagios • 100000 services @ 5 minute interval • sleep_time = 0...
Performance ResultsVerisign Public 13
Observations • These 6 VMs can easily handle 20000 active services per minute. • Additional capacity can b...
Benefits • Much less hardware • Centralized view and control over all monitoring • Opportunity to leverage the Gearm...
Final Thoughts • Tested several methodologies before arriving at the Nagios+Gearman conclusion. • Multisit...
Credits • Verisign System Administrators for helping me test • Gearman (http://www.gearman.org) • ConSol Labs (http:...
Thank You© 2012 VeriSign, Inc. All rights reserved. VERISIGN and other trademarks, service marks, anddesigns are registere...
of 18

Nagios Conference 2012 - Jason Cook - Nagios and Mod-Gearman

Jason Cook's presentation on using Nagios with Mod-Gearman. The presentation was given during the Nagios World Conference North America held Sept 25-28th, 2012 in Saint Paul, MN. For more information on the conference (including photos and videos), visit: http://go.nagios.com/nwcna
Published on: Mar 3, 2016
Published in: Technology      
Source: www.slideshare.net


Transcripts - Nagios Conference 2012 - Jason Cook - Nagios and Mod-Gearman

  • 1. Nagios and Mod-GearmanIn a Large-ScaleEnvironment Jason Cook <jcook@verisign.com> 8/28/2012
  • 2. A Brief History of Nagios at VerisignVerisign Public 2
  • 3. Legacy Nagios Setup • Whitepaper NSCA configuration • Typical 3-Tier setup • Remote System • Distributed Nagios Servers • Central Nagios Servers • Architecture in-place for several years • Reasonably stable, though high-maintenance • Very heterogeneous environment. • Many OS and Nagios versions • All notifications sent to an Event Management System • Offloaded graphing/trending to a custom solution.Verisign Public 3
  • 4. Simplified Passive Architecture DiagramVerisign Public 4
  • 5. Challenges with our passive setup • Scaling the Nagios server layers • Requires changes to all NSCA instances using the servers • Load-Balancing solutions mostly require removing freshness checks… • Freshness checking is a challenge • More freshness checking means more Nagios forking. • More Nagios forking is more operational sadness in a large environment. • With Freshness, you end up having an active environment, even if it wasn’t your intention. • Freshness errors do not tell the whole story • Where is the problem? • Even if you know where the problem is, it can be difficult to track down what’s causing it. Nagios? Plugin? System busy? NSCA? Network? Many questions, few obvious answers.Verisign Public 5
  • 6. Challenges with our passive setup (continued) • Lack of centralized scheduling • Adjusting schedules can be difficult for those without in-depth knowledge of Nagios and how it all works. • Inability to have a user run a check immediately without having even more in-depth knowledge about Nagios. • Lots of Nagios builds for various platforms. • Since we were using NSCA, we needed libmcrypt for encryption. • libmcrypt not a standard library for many systems, so yet another package to maintain. • All of this needed quite a bit of custom code for intelligent result queuing/sending so as to gracefully handle network outages and minimize send_nsca forking (especially on the distributed servers).Verisign Public 6
  • 7. A Move to Active MonitoringVerisign Public 7
  • 8. An alternative arises… • Gearman • Provides a generic application framework to farm out work to other machines or processes that are better suited to do the work. • Integrates with Nagios via the Mod-Gearman NEB module. • NRPE • Nagios Remote Plugin Executor • Merlin • Module for Effortless Redundancy and Loadbalancing In Nagios • Allows our Nagios instances to share scheduling (and therefore check results) between one another. • Great for load sharing and redundancyVerisign Public 8
  • 9. Simplified Active Architecture DiagramVerisign Public 9
  • 10. Some details about the setup • All components run in VMs • Nagios 3.4.1 (with nanosleep) • Merlin (1.1.15) • Mod-Gearman 1.2.6 • MK Livestatus (perhaps the greatest NEB module of all time) • Merlin setup is a simple peer<->peer configuration • Mod-Gearman NEB modules are configured to talk to multiple gearman servers (gearman server preference is alternated on each system, so that Gearman server failures are easily handled) • One Mod-Gearman worker process for each gearman server per worker.Verisign Public 10
  • 11. VM Configuration & Performance • VM Configuration: • 4 V-CPUs • 2GB RAM • Linux 2.6.32 • Performance Considerations • Very CPU Bound • RAM usage is very low • VM Usage • 2 Nagios server • 2 Gearman Server • 2 Mod-Gearman WorkersVerisign Public 11
  • 12. Application Configurations • Nagios • 100000 services @ 5 minute interval • sleep_time = 0.01 • host_inter_check_delay_method=n • service_inter_check_delay_method=0.01 • max_concurrent_checks=0 • 5 gearman collector threads • Gearman • 10 I/O Threads • Mod-Gearman Workers • 1000 worker processes per system • 50 per second max spawn rateVerisign Public 12
  • 13. Performance ResultsVerisign Public 13
  • 14. Observations • These 6 VMs can easily handle 20000 active services per minute. • Additional capacity can be had easily • Add Merlin peers • Add more workers • Scales up very well • renice of critical processes makes sure they’re getting the priority they need. • The environment can be a bit fragile. • Less fragile than before, but still has several components which all must be working correctly.Verisign Public 14
  • 15. Benefits • Much less hardware • Centralized view and control over all monitoring • Opportunity to leverage the Gearman architecture for other services • Higher confidence in monitoring accuracy • More flexibility in scheduling logic. • Event handlers become very useful, since there is a broader view of the infrastructure via MK Livestatus.Verisign Public 15
  • 16. Final Thoughts • Tested several methodologies before arriving at the Nagios+Gearman conclusion. • Multisite • DNX • NRDP • The current design is still a work in progress, but will be easier to change and grow (Nagios 4?). • Move anything possible off of Nagios and to external processes.Verisign Public 16
  • 17. Credits • Verisign System Administrators for helping me test • Gearman (http://www.gearman.org) • ConSol Labs (http://labs.consol.de) • Thruk • Mod-Gearman • Mathias Kettner (http://mathias-kettner.de) • MK Livestatus • op5 (http://www.op5.org) • Merlin • Nagios (http://nagios.org) • Nagios Core • NRPEVerisign Public 17
  • 18. Thank You© 2012 VeriSign, Inc. All rights reserved. VERISIGN and other trademarks, service marks, anddesigns are registered or unregistered trademarks of VeriSign, Inc. and its subsidiaries in the UnitedStates and in foreign countries. All other trademarks are property of their respective owners.

Related Documents