O'Reilly logo

Nagios, 2nd Edition by Wolfgang Barth

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix C. Event Handlers

If the state of a host or service alternates between OK and error states, you can use an event handler to run any programs you want. You can make use of this if a service fails, for example, and you want Nagios to try and restart it. This provides an opportunity to solve minor problems without the administrator needing to intervene.

Use of the event handlers is not just restricted to self-healing, however: with an appropriate script you can just as easily log current values or the event itself in a database. But there are more suitable methods for doing this, described in 19.1 Processing Plugin Performance Data with Nagios, page 404. A failed printer service serves as an example here of using an event handler for self-healing. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required