Skip to content

How to Install NagiosQL to Manage Nagios?

install nagiosql

Besides using the NConf application that we explained in the previous article to manage Nagios, there is another alternative application that we can use to manage Nagios, namely using the NagiosQL application.

 

Problem

How to install NagiosQL application in CentOS, Ubuntu/Debian, and OpenSUSE?

 

Solution

NagiosQL is a professional, web-based configuration tool for Nagios 2.x/3.x and other Nagios-based monitoring tools. It is designed for large enterprise requirements as well as small environments and any Nagios functionalities are supported. In this article, we will try to install NagiosQL on CentOS, Ubuntu/Debian, and OpenSUSE.

 

Here are the steps to install NagiosQL application in CentOS, Ubuntu/Debian, and OpenSUSE:

 

 

7. Configure NagiosQL in the browser

Next, configure the application in the browser by typing the command in the browser:

http://your_ip_server/nagios/nagiosql

 

If the browser asks us to insert the password, insert your Nagios password. After you insert the password, then there will be a display like this:

NagiosQL installation wizard

 

Click the START INSTALLATION button, then there will be a display like below:

Check the requirements

 

If you have a result like an image above, click the Next button, but if you have a result like the below image where the error of date.timezone is NOT AVAILABLE (cannot be empty and needs to be set) and warning in FTP and/or SSH2 such as NOT AVAILABLE (Could be loaded. Please add in php.ini):

The errors after checking the requirements

 

I think you have to reboot the server and it should there is no more error in the date.timezone section. If there is a warning in the FTP and/or SSH2 sections, in my experience, you can ignore it and we can continue the process by pressing the Next button, then you must fill the configuration columns and I fill it like in this image below:

Setup NagiosQL

 

After you filled the columns, click the Next button, and there will be a display like the below image:

Finishing setup of NagiosQL installation

 

Make sure there is no error like the above image and if you get the error, you must check the data that you inserted before. Before you click the Finish button, delete the install directory by typing the command:

rm -rf /usr/local/nagios/share/nagiosql/install/

 

Click the Finish button, and there is a display like an image below:

NagiosQL application

 

We have successfully installed NagiosQL. Enter the username (admin) and password and if nothing is wrong, the NagiosQL application will appear like the below image:

GUI of NagiosQL application

 

Next, we want to configure the NagiosQL application to integrate it with Nagios. Click Administration > Config targets > Modify like in the image below:

Configure NagiosQL

 

You must fill the columns and I fill the columns like the below image:

My configuration domain administration of NagiosQL

 

After that, go to Tools > Nagios control and click all the buttons like the image below:

Check written configuration files

 

Make sure there is no error when you click the button like this below image:

Restart Nagios in NagiosQL application

 

If you get an error “Nagios daemon is not running, cannot send restart command!“, like the image below:

Error when clicking the last button

 

Type the command:

systemctl restart nagios

And then you click all four buttons and there should be no more errors. 

 

Next, we access the Nagios application and make sure in Nagios in the Hosts section there are 3 default hosts that appear in Nagios (hplj2605dn, linksys-srw224p, and winserver) like the below image:

The Hosts in Nagios

 

Then we go to the Services section and there should be services that appear on the 3 default hosts:

The Services in Nagios

 

If in the Hosts and Services section in Nagios there are 3 additional hosts, then we have integrated the Nagios application with the NagiosQL application.

 

Note

1. To install NagiosQL seems more complicated than when installing NConf because PHP 7.2 does not directly support the mcrypt and ssh2 modules needed by the NagiosQL application, so we have to install these modules manually.

2. If we look at the result from NagiosQL are the same as the result from NConf, which are both bringing up 3 new hosts in the Nagios application, namely host hplj2605dn, linksys-srw224p, and winserver.

 

References

 

 

Print Friendly, PDF & Email

8 thoughts on “How to Install NagiosQL to Manage Nagios?”

  1. Stefanita Vilcu

    NagiosQL comes with an Apache 2.2 config file. Since on CentOS7 we have Apache 2.4, it needs something like below /etc/httpd/conf.d/nagiosql.conf:
    Alias /nagiosql “/opt/nagiosql”

    Options ExecCGI
    AllowOverride None
    = 2.3>

    Require all granted

  2. Stefanita Vilcu

    Usually “Nagios daemon is not running, cannot send restart command!” is because “Nagios process file” is not configured correctly. On CentOS 7 it is: /run/nagios/nagios.pid

Leave a Reply

Your email address will not be published.