How to enable disable event handlers



Event Handlers are optional system commands that run whenever a host or service state change occurs. An obvious use for event handlers is the ability for Nagios to proactively fix problems before anyone is notified. Some other uses for event handlers include restarting a failed service, entering a trouble ticket into a help desk system, and logging event information to a database. Event handlers are executed when a service or host is in a soft problem state, initially goes into a hard problem state, or initially recovers from a soft or hard problem state.

There are different types of optional event handlers that you can define to handle host and state changes including global host and service event handler, host-specific event handlers, and service-specific event handlers. Global host and service event handlers are run for every host or service state change that occurs, immediately prior to any host- or service-specific event handler that may be run. You can specify global event handler commands by using the Enable event handler directive in the Nagios Main Configuration page. Individual hosts and services have their own event handler command that should be run to handle state changes. You can specify an event handler that should be run by using the event_handler directive in your host and service definitions. These host- and service-specific event handlers are executed immediately after the (optional) global host or service event handler is executed.

  1. In Status, to enable or disable event handlers, first select the host or service from the Tree View navigation.
  2. Within the Actions portlet, click the Event Handlers drop-down and select Enable event handlers or Disable event handlers to temporarily prevent Nagios from running the host or service event handler for the host or service.
  3. Select Submit. The Nagios Monitoring Statistics table at the Entire Network, Host Group, and Service Group level views will be updated with the current event handler status.

    Figure: Disabling Service Event Handler for a Host


status status Delete
event event Delete
handlers handlers Delete
enable enable Delete
disable disable Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.