In this chapter, we will cover the following topics:
Notifications in Nagios Core refer to the events fired and the messages generated when hosts or services change state, for the purpose of informing appropriate people or systems.
For example, when connectivity to a host is lost, it leaves the UP
state and goes to DOWN
state on the next check. This eventually generates a notification event and, provided the appropriate flags are set and a contact is available, a message about the state change is generated and dealt with in some way defined in the configuration.
The default text for such notifications goes into some detail about the problem, including the output from the appropriate plugin command:
***** Nagios ***** Notification Type: PROBLEM Host: sparta.example.net State: DOWN Address: 192.0.2.21 Info: CRITICAL - Host Unreachable (192.0.2.21) Date/Time: Sat Jul 13 21:45:09 NZST 2015
So with this kind of text generated as a result of the event, the next question is what Nagios Core should do with it. A common method of notification that will be familiar to most Nagios Core administrators is sending this text as an e-mail message using the system mailer, but the same generated message can be used in a wide variety of ways. Just as commands can be flexibly defined in terms of the command lines they run, the action appropriate for a particular contact can be defined very flexibly to use the text of any notifications that the contact is configured to receive.
In this chapter, we'll learn how to refine notifications management in Nagios Core, to make sure that the appropriate people or systems are notified about appropriate network events and not nagged about others that may not matter. We'll also learn how to set up notification methods beyond the simple e-mail message and how to escalate notifications when problems remain unfixed after a certain period of time.
18.188.175.182