Welcome to Part 2 setup instructions. We assume you have completed Step 1 – Installing Nagios Core Service successfully. Read this article to install NagiosQL3 web interface for Administration of Nagios server using web interface. If you have installed nagios core service with some other type. Please be careful with directories and files path and configuration files.
We have successfully configured and integrated NagiosQL with Nagios using below steps. But we can not sure that it will 100% work for you. You may get few errors during setup. Feel free to ask related to any issues on comments for our question/answers section.
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
Edit php.ini file and update following variable with required timezone. Click here to get list of available timezone
date.timezone = '
We also need to restart Apache server after editing php configuration time.
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
4.2: Verify Requirements
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
If you have installed nagios at some other place, only then change the values of path.
4.4: Finishing Setup
4.5: NagiosQL Login
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.
#cfg_file=/usr/local/nagios/nagiosql/commands.cfg #cfg_file=/usr/local/nagios/nagiosql/contacts.cfg #cfg_file=/usr/local/nagios/nagiosql/timeperiods.cfg #cfg_file=/usr/local/nagios/nagiosql/templates.cfg #cfg_file=/usr/local/nagios/etc/objects/localhost.cfg #cfg_file=/usr/local/nagios/etc/objects/windows.cfg #cfg_file=/usr/local/nagios/etc/objects/switch.cfg #cfg_file=/usr/local/nagios/etc/objects/printer.cfg
cfg_dir=/usr/local/nagios/nagiosql#cfg_dir=/usr/local/nagios/etc/servers #cfg_dir=/usr/local/nagios/etc/printers #cfg_dir=/usr/local/nagios/etc/switches #cfg_dir=/usr/local/nagios/etc/routers
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