Exercise 2 - Nagios Configuration on FreeBSD-9.1 ===================================================== 1.1 Edit the /usr/local/etc/nagios/nagios.cfg and uncomment the line #cfg_dir=/usr/local/etc/nagios/servers Save the file 1.2 Create the servers directory # 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 # vi pcXX.cfg 1.4 Lets define two (2) services to be measured in addition to the availability of the machine. define host { use freebsd-server host_name pcXX alias pcXX.sse.ws.afnog.org - some virtual server 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 } Save the file. 1.5 Check if the new configuration changes you have made are ok. # nagios -v /usr/local/etc/nagios/nagios.cfg Correct any errors reported by the above command. 1.6 Now restart the nagios service. # /usr/local/etc/rc.d/nagios restart 1.6 Check from your nagios page if you can see the new services you just added.