Open main menu

CDOT Wiki β

Changes

OPS635-lab-nagios

7 bytes removed, 20:20, 6 January 2021
m
OPS635 Lab 1: Nagios Installation and Configuration: - removing numbering from lab to facilitate re-ordering
[[Category:OPS635]][[Category:OPS635-Labs]][[Category:peter.callaghan]]
=OPS635 Lab 1: Nagios Installation and Configuration=
==Overview==
In an enterprise environment, a production server must be staged before deployment. Any upgrade to the production servers must be tested in a testing environment and signed off by the change manager(s) before deploying to the production environment. In this lab, you will install and configure the Nagios monitoring framework on a VM running on your testing environment before deploying it to the production environment. You will use many of the common definitions encountered in a typical nagios installation.
* Add the necessary records for this machine to your DNS server.
* [[OPS635_installation_nagios | Install and configure Nagios]] on this machine.
* Configure your Nagios to also use any definitions you include in a file called lab1lab.cfg.* Using the lab1lab.cfg file, create definitions to get your nagios installation to monitor the following hosts/services:
** Create a host definition to make the nagios machine monitor itself (using a non-loopback address). It should use the check_ping command every ten minutes to make sure it is active.
** Create a service definition to make the nagios machine monitor whether it can connect to it's own ssh service (using the non-loopback address). It should use the pre-written check_ssh command every 30 minutes, re-checking every 10 minutes if the initial check fails.
** Create a timeperiod definition, and set it to only include the days and times you are in OPS635. Modify the definitions in lab1lab.cfg to only run during this time.
* Make sure the webservice running on your nagios machine is accessible from your host machine.
* Access the nagios web console and confirm that these checks are working before continuing.
==Investigation 2: Nagios Notifications==
* Turn flap detection off for the checks you created in investigation 1.
* Modify the lab1lab.cfg file to include a contact named after yourself, using your email address in your domain. Set its notification periods to use the same timeperiod you created in investigation 1.
* 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.
==Submission==
Upload your lab1lab.cfg, the nagios configuration from nagiosnrpe, your check_sshd plugin, and your event handler to blackboard.
==Completing The Lab==
You have now gained experience using common elements of nagios to monitor machines in your network. You have configured hosts that should be monitored, identified services to monitor on them, created contacts and notifications so that administrators will be notified when things to wrong (and senior admins can be notified if they don't get fixed), and used nrpe to allow checks to be performed remotely. You have also written simple checks to customize what you want monitored, and event handlers so that nagios can try to repair simple issues for you. There is still more to learn (host and service groups and dependencies will make your configuration much more efficient), but there is only so much room in the course. With what we have covered you have the basic building blocks to monitor your network.
932
edits