Nagios CentOS 4 – Checking And Starting Nagios

Nagios CentOS 4 – Checking And Starting Nagios

The final step in the installation is to verify the configuration of nagios and then configure the daemon start up on the server.  To verify the configuration of nagios and then configure the daemon start up on the server perform the following steps :-

Verifying The Nagios Configuration

Once the nagios configuration steps have been done in the previous article the next step is to verify it.  Nagios proivides the ability to verify the configuration prior to starting or restarting nagios and it is good practice to perform this.  To verify the configuration of nagios perform the following step :-

  • In the command line of the nagios server execute the command below :-

nagios -v /etc/nagios/nagios.cfg

  • The command should return the lines below if the files have been written correctly :-

Total Warnings: 0
Total Errors:   0
Things look okay – No serious problems were detected during the pre-flight check

Configuring The Nagios Daemon To Start Automatically

Once the configuration has been verified the next step is to configure the nagios daemon to start automatically on boot and to do this perform following step :-

  • In the command line execute the command below :-

chkconfig nagios on

Starting Nagios

The final step in the installation is to start nagios on the server and to do this perform following step :-

  • In the command line execute the command below :-

service nagios start

Checking Nagios Is Running

To check that nagios is now running on the server perform the following steps :-

  • Open a web browser on a client machine (Remember to use one in a subnet which you have granted access from if you locked down access in the previous article)
  • In the web browser go to http://{Nagios Server IP Address}/nagios/
  • When prompted enter in the username and password which you set up in the previous article
  • You should now be presented with the Nagios front page
  • Click on Hosts in the left hand pane and you should see localhost
  • Click on Services and you should be presented with the list of default services on the localhost which nagios is monitoring