Exercise 2 - Nagios Configuration on FreeBSD-10.0
=====================================================

1.1 Edit the /usr/local/etc/nagios/nagios.cfg

	$sudo ee /usr/local/etc/nagios/nagios.cfg

	Uncomment the line below

	#cfg_dir=/usr/local/etc/nagios/servers

	So that it looks like

	cfg_dir=/usr/local/etc/nagios/servers

    Save the file

1.2 Create the servers directory

	$sudo mkdir /usr/local/etc/nagios/servers

1.3 Create a configuration file "pcXX.cfg" for the measurement of your 
    server in the "/usr/local/etc/nagios/servers" directory

	$cd /usr/local/etc/nagios/servers
	$sudo ee pcXX.cfg

1.4 Lets define a 5 services to be measured in addition to the availability 
    of the machine.

##########NAGIOS CONFIG SAMPLE##################

define host {
	                   use freebsd-server
                        host_name pcXX
                        alias My Very Nice Shiny Server thats virtually somewhere  
                        address 196.200.219.XX
        }

        define service {
                        use generic-service
                        host_name pcXX
                        service_description PING
                        check_command check_ping!100.0,20%!500.0,60%
        }

        define service {
                        use generic-service
                        host_name pcXX
                        service_description SSH
                        check_command check_ssh
        }

        define service {
                        use generic-service
                        host_name pcXX 
                        service_description HTTP
                        check_command check_http
        }

        define service {
                        use generic-service
                        host_name pcXX
                        service_description SMTP
                        check_command check_smtp
        }

         define service {
                        use generic-service
                        host_name pcXX
                        service_description POP
                        check_command check_pop
        }

         define service {
                        use generic-service
                        host_name pcXX
                        service_description IMAP
                        check_command check_imap
        }
############END###########

    Save the file.

1.5 Check if the new configuration changes you have made are ok.

	$sudo nagios -v /usr/local/etc/nagios/nagios.cfg

    Correct any errors reported by the above command.

1.6 Now restart the nagios service.

	$sudo service nagios restart

1.6 Check your nagios web page to see if you can find the new services you just added.