In this recipe, we'll create a new contact with which hosts and services can interact with each other, chiefly to inform the contact when the state of hosts or services changes. We'll use the simplest example of setting up an e-mail contact and configuring an existing host so that this contact receives an e-mail message when Nagios Core's host checks fail and the host is apparently unreachable. In this instance, we'll arrange for
email@example.com to receive an e-mail message whenever the
sparta.example.net host goes from the
DOWN state to the
UP state, or vice-versa.
You should have a working Nagios Core 4.0 or better server running with a web interface and at least one host to check. If you need to ...