Product Cover Image

Nagios: Building Enterprise-Grade Monitoring Infrastructures for Systems and Networks, 2nd Edition

By David Josephsen

Published by Prentice Hall

Published Date: Mar 29, 2013

Description

This is the definitive guide to building cost-effective, enterprise-strength monitoring infrastructures with the latest commercial and open source versions of Nagios, the world's leading monitoring toolset. World-renowned network monitoring expert David Josephsen covers the entire monitoring software stack, from SNMP to advanced visualization, treating Nagios as a specification language and foundation for building well-designed monitoring systems that can scale to serve the needs of any organization.

 

Drawing on his unsurpassed enterprise monitoring 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 implement and run Nagios successfully, including detailed coverage of creating agents programmatically in Windows and Unix, and an extensive discussion of using the C-based Nagios Event-Broker API: information available in no other book. Easy-to-adapt code listings accompany many topics. Coverage includes:

 

* Nagios setup and configuration, including important new configuration parameters

* New plug-ins, including check-MK, Op5 plug-ins for Windows and Unix, SFlow, and more

* Scaling and performance optimization in large enterprise installs

* Choosing the best new options for visualizing data (including Ganglia and Graphite)

* Reviewing use cases so you can identify the applications that offer you the most value

Table of Contents

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

 

Purchase Info

ISBN-10: 0-13-313571-3

ISBN-13: 978-0-13-313571-8

Format: eBook (Watermarked)?

This eBook includes the following formats, accessible from your Account page after purchase:

ePubEPUBThe open industry format known for its reflowable content and usability on supported mobile devices.

MOBIMOBIThe eBook format compatible with the Amazon Kindle and Amazon Kindle applications.

Adobe ReaderPDFThe popular standard, used most often with the free Adobe® Reader® software.

This eBook requires no passwords or activation to read. We customize your eBook by discretely watermarking it with your name, making it uniquely yours.

Includes EPUB, MOBI, and PDF

$35.99

Add to Cart