Install NagioSQL On CentOS 7

We already install NConf application to configure Nagios hosts, but there is another application to configure hosts in Nagios called NagioSQL application. NagiosQL is a professional, web-based configuration tool for Nagios based monitoring tools and any Nagios functionalities are supported. It is designed for large enterprise requirements as well as small environments, support for every Nagios object definition option and for template definitions (host, services, contacts), and et cetera. As of the writing, the latest version of Nagios is 3.3.0 and we will install it on CentOS 7.

We must install some packets by following commands:

Add script below in /etc/php.ini file (please adjust date.timezone with your continent and city):

And then download nagiosql package and we configure it:

If you want to give the password for MariaDB, follow the command:

Open your browser and type:

You must type your username and password for Nagios application (usually username for Nagios is nagiosadmin) and after that, there will be the image:
install nagiosql
Click START INSTALLATION and there will be the image:

Make sure there is no error in NagioSQL installation: Checking Requirements page. If MySQL is NO-AVAILABLE status, please install php-mysql and after install it, restart the web server. Then refresh the web and make sure there is no error. Click Next and there will be the image:

Fill in the columns above by matching the previous data when we configure database. After that, click Next and there will be the image:

After that click Finish in the web, and there will be the image:

Fill in the columns with our username and password and click Login. If our username and password are true, there will be the image:

Now, we must configure NagioSQL. Go to console and type the following commands:

Then, go to browser and Click Administration – Config targets – Modify (click icon):

And there will be the image:

Fill in the columns like the picture above and then click Save. Go to Tools – Nagios config and uncomment all lines starting with cfg_file then add the following script cfg_dir=/etc/nagiosql in that column.

After that click Save. Go to Tools – Nagios control and then click Write monitoring data, Write additional data, Check configuration files, and Restart Nagios buttons and make sure there is no error when we push the buttons:

Open Nagios application and make sure there are 3 new devices on Nagios:

Like in NConf application, we cannot delete 3 new hosts but we just change the hosts. Now we try to add new host using NagioSQL. Go to Supervision – Host and click Add button:

There will be the image in Common settings section and I filled the columns like above picture:

and I fill in Service settings section like this:

And I fill in Service settings like this:

After that click Save and there will be the image:

There will word missed on the new host. Click icon in the red box and word missed will change to up-to-date. After that, go to Tools – Nagios control and click 4 buttons and make sure there are no errors in this section. Go to Nagios and if there is no error, the new device will appear in Nagios:

And in Services page, there are services in the new device will appear:

References:
exchange.nagios.org
h3x.no
nolabnoparty.com
adminlog.ru

Leave a Reply

Your email address will not be published. Required fields are marked *