932
edits
Changes
m
→Investigation 2: Nagios Notifications
* Create a second contact called senioradmin, using the email account for root@<yourdomain>.ops.
* Set the notification interval for the host and service you created in investigation 1 to five minutes. This is unreasonably short for most installations, but in this lab we want to get multiple notifications in a very short time line so that we can be sure they are working.
* If either of these services go into a hard-fail state, nagios should now send you an email. Note that you will have to configure the email server on your host to accept email for your domain.
* Manipulate you machine to cause these checks to fail (e.g. set your firewall to block the ping traffic), and make sure you receive the email before continuing.
* Fix your machine so the checks are passing again.
* Add a hostescalation and a serviceescalation so that if you don't fix the issue before you are notified three times, the notification will instead be sent to the senior admin.
* Cause the checks to fail again, and wait for the notification to be sent to root.
==Investigation 3: Nagios Custom Commands==
* Create a script plugin called check_apache that will use systemctl to check the state of your httpd service. If the service is running, return 0. If it is inactive, return 1. If it is failed, return 2. For any other result return 3.