SKIP THE SHIPPING
Use code NOSHIP during checkout to save 40% on eligible eBooks, now through January 5. Shop now.
Register your product to gain access to bonus material or receive a coupon.
The Fully Updated Guide to Enterprise Network Monitoring with Today’s Nagios Platform and Tools
This is the definitive guide to building cost-effective, enterprise-strength monitoring infrastructures with the latest commercial and open source versions of Nagios. World-renowned monitoring expert David Josephsen covers the entire monitoring software stack, treating Nagios as a specification language and foundation for building well designed monitoring systems that can scale to serve any organization.
Drawing on his unsurpassed experience, Josephsen demonstrates best practices throughout and also reveals common mistakes, their consequences, and how to avoid them. He provides all the technical depth you need to configure and run Nagios successfully, including a practical and thorough discussion of writing your own custom modules with the C-based Nagios Event-Broker API.
Extensively updated throughout, this edition adds an entirely new chapter on scaling Nagios for large, complex networks that rely heavily on virtualization and cloud services. Josephsen thoroughly introduces Nagios XI, the advanced new commercial version of Nagios and shows how to improve productivity with the latest third-party tools and plug-ins.
Coverage includes:
No matter how complex your systems monitoring challenges are, this book will help you achieve the results you want—right from the start.
BLTs and Monitoring Systems: Best When Homemade (or Why You Should Be Using Nagios)
Please visit the author's site: http://www.skeptech.org/nagiosbook
Nagios XI: Is It Right for You?
Download the sample pages (includes Chapter 9 and Index)
Foreword by the Nagios Creator, Ethan Galstad xiii
Introduction 1
Do It Right the First Time 1
Why Nagios? 2
What’s in This Book? 4
Who Should Read This Book? 7
End Notes 7
CHAPTER 1 Best Practices 9
A Procedural Approach to Systems Monitoring 9
Processing and Overhead 12
Remote Versus Local Processing 12
Bandwidth Considerations 13
Network Location and Dependencies 14
Security 16
Silence Is Golden 19
Watching Ports Versus Watching Applications 20
Who’s Watching the Watchers? 21
End Notes 22
CHAPTER 2 Theory of Operations 23
The Host and Service Paradigm 24
Starting from Scratch 24
Hosts and Services 26
Interdependence 26
The Downside of Hosts and Services 27
Plug-ins 28
Exit Codes 28
Remote Execution 31
Scheduling 34
Check Interval and States 34
Distributing the Load 36
Reapers and Parallel Execution 38
Notification 39
Global Gotchas 39
Notification Options 40
Templates 41
Time Periods 41
Scheduled Downtime, Acknowledgments, and Escalations 42
I/O Interfaces Summarized 43
The Web Interface 43
Monitoring 45
Reporting 46
The External Command File 48
Performance Data 48
The Event Broker 49
End Notes 50
CHAPTER 3 Installing Nagios 51
OS Support and the FHS 51
Installation Steps and Prerequisites 53
Installing Nagios 54
Confi gure 54
Make 55
Make Install 56
Installing the Plug-ins 57
Installing NRPE 59
End Notes 60
CHAPTER 4 Confi guring Nagios 61
Objects and Defi nitions 62
nagios.cfg 64
The CGI Confi g 67
Templates 68
Timeperiods 70
Commands 71
Contacts 73
Contactgroup 74
Hosts 75
Services 77
Hostgroups 79
Servicegroups 79
Escalations 80
Dependencies 81
Extended Information 83
Apache Confi guration 83
GO! 85
End Notes 85
CHAPTER 5 Bootstrapping the Nagios Confi g Files 87
Scripting Templates 87
Autodiscovery 91
Check_MK 91
Nagios XI 92
Autodiscovery Is Dead: Long Live Autodiscovery 92
NagiosQL 92
CHAPTER 6 Watching: Monitoring Through the Nagios Plug-ins 95
Local Queries 95
Pings 96
Port Queries 98
Querying Multiple Ports 100
(More) Complex Service Checks 102
E2E Monitoring with WebInject and Cucumber-Nagios 104
Watching Windows 111
The Windows Scripting Environment 111
COM and OLE 113
WMI 113
To WSH or Not to WSH 118
To VB or Not to VB 119
The Future of Windows Scripting 119
Getting Down to Business 121
NRPE 122
Check_NT 123
NSCP 124
Watching UNIX 125
NRPE 125
CPU 126
Memory 129
Disk 130
Check_MK 131
Watching “Other Stuff” 135
SNMP 135
Working with SNMP 137
Environmental Sensors 142
Standalone Sensors 143
LMSensors 144
IPMI 145
End Notes 146
CHAPTER 7 Scaling Nagios 149
Tuning, Optimization, and Some Building Blocks 149
NRDP/NSCA 150
NDOUtils 150
Distributed Passive Checks with Secondary
Nagios Daemons 150
Event Broker Modules: DNX, Merlin, and Mod Gearman 153
DNX 154
Mod Gearman 156
Op5 Merlin 157
Distributed Dashboards: Fusion, MNTOS, and MK-Multisite 159
CHAPTER 8 Visualization 167
Nagios Performance Data 168
RRDTool: The Foundation 168
Enter RRDTool 170
RRD Data Types 171
Heartbeat and Step 172
Min and Max 174
Round Robin Archives 174
RRDTool Create Syntax 175
RRDTool Graph Mode 180
RPN 182
Data Visualization Strategies: A Tale of Three Networks 185
Suitcorp: Nagios, NagiosGraph, and Drraw 185
singularity.gov: Nagios and Ganglia 192
Massive Ginormic: Nagios, Logsurfer, Graphite, and Life After RRDTool 200
DIY Dashboards 209
Know What You’re Doing 210
RRDTool Fetch Mode 212
The GD Graphics Library 214
NagVis 215
GraphViz 217
Sparklines 218
Force Directed Graphs with jsvis 220
End Notes 221
CHAPTER 9 Nagios XI 223
What Is It? 223
How Does It Work? 224
What’s in It for Me? 226
One Slick Interface 226
Integrated Time Series Data 227
Modularized Components 228
Enhanced Reporting and Advanced Visualization 228
Integrated Plug-ins and Confi guration Wizards 230
Operational Improvements 234
How Do I Get My Hands on It? 235
CHAPTER 10 The Nagios Event Broker Interface 237
Function References and Callbacks in C 237
The NEB Architecture 239
Implementing a Filesystem Interface Using NEB 242
DNX, a Real-World Example 255
Wrap Up 258
End Notes 259
Index 261