In the previous post we have already completed the first step to install Nagios core service, Now in this article we will learn about installation of Nagios web administration tool.
Step 1: Install Required Packages
First we need to install required packages, Use the following commands to install them.
# yum install libssh2 libssh2-devel mysql mysql-server php-mysql
Also install ssh2 pecl extension for php. You can use one of below commands to install it.
# pecl install ssh2
[if above command not worked use below else skip it]
# pecl install channel://pecl.php.net/ssh2-0.12
Step 2: Download NagiosQL3 and Extract
Download latest available nagiosql3 archive and extract in nagios document root using below commands.
# cd /usr/local/nagios/share
# wget http://sourceforge.net/projects/nagiosql/files/nagiosql/NagiosQL%203.2.0/nagiosql_320.tar.gz
# tar xzf nagiosql_320.tar.gz
# mv nagiosql32 webadmin
# chown -R apache:apache .
# chmod -R 775 .
Step 3: Set Up Timezone
date.timezone = ‘Asia/Kolkata’
We also need to restart Apache server after editing php configuration time.
# service httpd restart
Step 4: Start NagiosQL3 Web Installer
NagiosQL3 provides web installer to install package. Open below url to start web installer for nagiosql. follow steps as showing in url. Web installer will help you about for any changes required.
4.1: Start Installation Wizzard
Open the above url and click the button START INSTALLATION
4.2: Verify Requirements
At this screen, installer will check the required packages are installed or not. If you see any error on this screen, fix that manually and click Next
4.3: NagiosQL Setup
In this step installer will input the database details to be used for nagiosql. Also update the nagiosql path values as per given screenshots. Click Next
If you have installed nagios at some other place, only then change the values of path.
4.4: Finishing Setup
This screen showing that all the steps has successfully completed. You just need to click Next
4.5: NagiosQL Login
After completing installation, you will be redirected to NagiosQL login screen.
Step 5: Access NagiosQL3 Web Interface
After completing web installer, it will automatically redirect you to nagiosql3 admin panel. To open it later use below url.
Step 6: Configure NagiosQL3 with Nagios Core
This is the most important part of NagiosQL setup, It may be your setup is different that me, so be careful with below step. I am trying my best to write to complete integration.
6.1: Edit NagiosQL Configuration
Login to NagiosQL administrator section and navigate to Administration -> Administration -> Config targets and click on Modify button for Local installation.
At the below screen, you will find configuration file path, make sure all folder exists in first section and check the files path with Nagios core configuration file.
6.2: Edit Nagios Core Configuration File
Now edit nagios configuration file ( Eg: /usr/local/nagios/etc/nagios.cfg ) and commend all earlier cfg_file and cfg_dir configuration settings and add new cfg_dir with /usr/local/nagios/nagiosql only.
Step 7: Restart Nagios Core Service
Finally verify nagios core configuration file and restart service using below commands.
# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
If above command show no errors on screen, restart nagios core service
# service nagios restart
Congratulation’s You have successfully installed Nagios with NagiosQL3.
For any query or issue, feel free to discuss on http://discuss.eduguru.in