Nagios

Install Lilac Configurator for Nagios Core on CentOS 7

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

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

Lilac Configurator MySQL Database Setup

Define database and access credentials and click on Continue.

Lilac Configurator Installation Complete

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

Lilac Configurator Create New Import Job

Create an import job and click on Begin Import.

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

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!

Alaric Bird

Alaric Bird is a seasoned Linux System Administrator with over a decade of experience in managing and optimizing Linux-based servers and infrastructure. Known for his expertise in server deployment, security hardening, and performance tuning, Alaric has a deep understanding of various Linux distributions, including Ubuntu, CentOS, and Red Hat Enterprise Linux. His skills extend to cloud platforms like AWS, where he effectively manages virtual private servers and services. Alaric is also proficient in scripting languages such as Bash and Python, which he uses to automate routine tasks, enhancing efficiency and reliability. With a strong commitment to continuous learning, he stays updated with the latest developments in open-source technologies and best practices. His problem-solving abilities, combined with excellent communication skills, make him a valuable asset to any IT team. In addition to his technical expertise, Alaric is passionate about mentoring junior administrators and fostering a collaborative environment.

View Comments

  • hi Sir after adding host by lilac-reloaded but it is not reflect in nagios. please help & suggest

  • 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?

  • 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.

Share
Published by
Alaric Bird

Recent Posts

Change Apache Document Root in Linux

Learn how to change Apache document root in Linux by following this step-by-step guide. Adjust…

2 weeks ago

How to Change Apache Port in Linux

Discover how to change Apache port in Linux easily. Follow our simple guide to modify…

2 weeks ago

How to Create Virtual Host in Apache Server

Learn how to create a virtual host in Apache Server with this comprehensive guide. Set…

3 weeks ago

10 Practical Tasks for RHCSA Exam with Solutions

Discover 10 practical tasks for the RHCSA exam with step-by-step solutions. Boost your Linux skills…

3 weeks ago

Ultimate Fail2ban Configuration Guide

Discover the ultimate Fail2ban configuration guide. Learn how to set up, customize, and optimize Fail2ban…

3 weeks ago

VPS Server: The Ultimate Guide to Virtual Private Servers

Explore the ultimate guide to VPS servers and learn everything about Virtual Private Servers, including…

4 weeks ago

This website uses cookies.