Share on Social Media

Learn how to install Lilac Configurator for Nagios Core on CentOS 7 with our step-by-step guide. Simplify and enhance your Nagios monitoring setup with this user-friendly configuration tool. #centlinux #linux

What is Lilac Configurator?

Lilac Configurator is a tool used for configuring Lilac, which is a web-based configuration manager for Nagios. Nagios is an open-source monitoring system that enables organizations to monitor and manage their IT infrastructure, ensuring systems, applications, services, and business processes are functioning properly. Lilac Configurator simplifies the configuration and management of Nagios by providing a graphical user interface.

Key features of Lilac Configurator include:

  1. Graphical Interface: Provides a web-based GUI for managing Nagios configurations, making it easier for users who prefer not to work directly with configuration files.
  2. Centralized Management: Allows for centralized management of Nagios configurations, enabling administrators to handle multiple configurations from a single interface.
  3. Ease of Use: Simplifies the process of adding, removing, and modifying hosts, services, and other configuration elements in Nagios.
  4. Template-Based Configuration: Supports the use of templates, which can streamline the configuration process and ensure consistency across different elements.
  5. Real-Time Monitoring: Integrates with Nagios to provide real-time monitoring and management capabilities.
  6. Customization and Extensibility: Offers options for customization and can be extended to meet specific monitoring needs.

Overall, Lilac Configurator enhances the usability of Nagios by providing a more user-friendly approach to configuration and management, making it accessible to a broader range of users, including those who may not be as comfortable with manual configuration file edits.

Nagios is an Industry Standard Server Monitoring Solution. It is very simple, lightweight and easy to configure. Its configurations are defined in plain text files by an Administrator (according to his Infrastructure) for each Host, Service, Command, Contact, etc. These configurations are not a big deal unless we are monitoring a large Infrastructure, where we have to frequently update definitions of devices, add new hosts, replace a faulty switch, etc. The task of maintaining configurations can be a nightmare, if we are not properly planned to organize our Nagios configurations.

Fortunately, there are some web-based configurators such as Fruity, Lilac Reloaded, NConf, etc. are available, that can ease the task of Nagios configuration management.

Before moving forward, it is required to have basic concepts of Nagios Core 4. Therefore, it is highly recommended that you should have Learning Nagios – Third Edition (PAID LINK). It will be really helpful for you during your Nagios journey.

Nagios Server Specification

In this post, we will install Lilac Configurator on our Nagios Core Server over CentOS 7. Lilac Reloaded uses MySQL as its database backend, and it is written in PHP.

A working instance of Nagios monitoring Server on CentOS 7.

  • Hostname – nagios03.example.com
  • IP Address – 192.168.229.134/24
  • Nagios Version – Nagios Core 4.4

Read Also: How to install Nagios Core on CentOS 7

Install Lilac Configurator for Nagios Core

Login to Nagios Monitoring Server using Putty and install MySQL Database Server.

# yum install –y mariadb-server

Start and enable mariadb service.

# systemctl start mariadb.service
# systemctl enable mariadb.service

Configure MySQL Server.

# /usr/bin/mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!

By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] Y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] Y
 ... Success!

By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] Y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] Y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

Create database and user for Lilac Reloaded.

# mysql –u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 14
Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

mysql> create database lilac;
Query OK, 1 row affected (0.00 sec)

mysql> create user 'lilac'@'localhost' identified by 'lilac';
Query OK, 0 rows affected (0.00 sec)

mysql> grant all on lilac.* to 'lilac'@'localhost';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye

Verify PHP version.

# php -v
PHP 5.3.3 (cli) (built: Aug 11 2016 20:33:53)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

Lilac Reloaded required PHP 5.5, therefore, to update PHP, I add the Webtatic yum repository to acquire PHP 5.5 packages.

# rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
Retrieving https://mirror.webtatic.com/yum/el6/latest.rpm
warning: /var/tmp/rpm-tmp.NZFWFl: Header V4 DSA/SHA1 Signature, key ID cf4c4ff9: NOKEY
Preparing...                ########################################### [100%]
   1:webtatic-release       ########################################### [100%]

Upgrade to PHP 5.5.

# yum search php55
# yum remove php php-common
# yum install php55w php55w-pear php55w-pdo php55w-mysql
# service httpd restart

Check PHP version Again.

# php -v
PHP 5.5.38 (cli) (built: Jul 21 2016 12:51:12)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies

Lilac required nmap for auto discovery of Network devices, therefore install it.

# yum install nmap

Download Lilac Reloaded from https://sourceforge.net/projects/lilac–reloaded/

# cd /soft
# wget https://sourceforge.net/projects/lilac--reloaded/files/latest/download
# tar xvf download

Move the lilac-reloaded directory to /var/www/html and change ownership of directory.

# mv lilac-reloaded/ /var/www/html/
# chown -R apache.apache /var/www/html/lilac-reloaded/

Like Nagios, Lilac Reloaded also don’t have any User Authentication Method of its own, so enable Basic HTTP Authentication, and use the same htpassword file, that we used with our Nagios Server.

# cat  >> /etc/httpd/conf.d/lilac.conf << EOF
>  <directory "/var/www/html/lilac-reloaded">
>  AuthType Basic
>  AuthName "Restricted Content"
>  AuthUserFile /usr/local/nagios/etc/htpasswd.users
>  Require valid-user
>  </directory>
> EOF

# systemctl restart httpd.service

Browse to http://nagios03.example.com/lilac-reloaded/

Lilac Configurator Dependency Checks
Lilac Configurator Dependency Checks

If this page show any dependency error, pls resolve it and click on Continue to Configuration….

Lilac Configurator MySQL Database Setup
Lilac Configurator MySQL Database Setup

Define database and access credentials and click on Continue.

Lilac Configurator Installation Complete
Lilac Configurator Installation Complete

Click on Import Nagios Settings to import the configurations in lilac database.

Lilac Configurator Create New Import Job
Lilac Configurator Create New Import Job

Create an import job and click on Begin Import.

Lilac Configurator Job Details
Lilac Configurator Job Details

Nagios configurations have been imported.

Lilac Configurator for Nagios Core on CentOS 7 is installed and ready for use now.

Recommended Online Training: Learn Bash Shell in Linux for Beginners

745772 0021

Final Thoughts

Installing Lilac Configurator for Nagios Core on CentOS 7 can greatly simplify and enhance your Nagios monitoring setup, offering a user-friendly interface for managing configurations. This guide provides the steps you need to get started, making it easier to manage your IT infrastructure efficiently.

If you need further assistance or prefer professional help with your Lilac Configurator installation and configuration, feel free to check out my Fiverr gig. I offer comprehensive services to ensure your Nagios setup is optimized and secure. Let me help you streamline your monitoring processes with ease!

7 thoughts on “Install Lilac Configurator for Nagios Core on CentOS 7”
  1. Lilac Configuration has been done & able to import Nagios Configuration into Lilac. But, I want to import Lilac Discovered data into Nagios Configuration & subsequent web interface. It means, whatever I do in Lilac, it should automatically append in nagios config file.

    Is it possible?

  2. Hi, You can export the Nagios Configuration from Lilac reloaded, the same way you have imported. However, Lilac is a very old Nagios plugin with limited community support. In my opinion, you should try to use a newer alternative for longer future sustainability.

Leave a Reply