Monday, September 7, 2015

How to monitor CentOS and Ubuntu servers with Pandora FMS

https://www.howtoforge.com/tutorial/pandora-fms-monitor-centos-7

Introduction

Pandora FMS (Pandora Flexible Monitoring System) is a flexible and highly scalable monitoring software for networks, servers, applications and virtual environments. Pandora FMS can monitor the status and performance of a different server operating systems and server applications like web servers, databases, proxies etc. Pandora FMS consists of a server software and monitoring agents. In this tutorial, I will show you how to install Pandora FMS Server on CentOS 7 and how to add a monitoring agent on Ubuntu 15.04.

Prerequisites

  • CentOS 7 - 64bit for Pandora Server
  • Ubuntu 15.04 - 64bit for Pandora agent
  • Root privileges
CentOS 7 IP - 192.168.43.187
Ubuntu 15.04 IP - 192.168.43.105
What we will do in this tutorial:
  1. Install the prerequisite packages for Pandora FMS.
  2. Disable SELinux and firewalld.
  3. Installing Pandora Server on CentOS 7
  4. Installing Pandora Agent on Ubuntu 15.04
  5. Testing

Install the prerequisite packages

The first step is to install the prerequisites for the PandoraFMS software on our CentOS Server.The server will run the web-based Pandora UI and it will be the central place where the monitoring agents will connect to.
yum install mariadb-server httpd mod_php php-gd php-mysql php-mbstring xorg-x11-fonts-misc graphviz php-snmp php-pear php-ldap xorg-x11-fonts-75dpi graphviz perl-Sys-Syslog perl-libwww-perl perl-XML-Simple perl-XML-Twig net-snmp-utils perl-NetAddr-IP perl-IO-Socket-INET6 perl-Socket6 perl-Net-Telnet nmap perl-JSON perl-Encode-Locale net-snmp-perl perl-CPAN
The wimc package is not available from CentOS base repository so we will download it with wget and install it manually.
cd /tmp
wget http://softlayer-dal.dl.sourceforge.net/project/pandora/Tools%20and%20dependencies%20%28All%20versions%29/RPM%20CentOS%2C%20RHEL/wmic-4.0.0tp4-0.x86_64.rpm

rpm -ivh wmic-4.0.0tp4-0.x86_64.rpm
Disable SELinux:
sed -i -e 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
and stop firewalld:
systemctl stop firewalld

Installing Pandora FMS on CentOS 7

Step 1 - Configuring MariaDB/MySQL

systemctl start mariadb
mysql_secure_installation
Set root password? [Y/n] Y
TYPE YOUR PASSWORD
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y

Step 2 - Install Pandora Console

Download and Install Pandora Console:
cd /tmp
wget http://sourceforge.net/projects/pandora/files/Pandora%20FMS%205.1/SP1Final/RHEL_CentOS/pandorafms_console-5.1SP1-1.noarch.rpm
rpm -ivh pandorafms_console-5.1SP1-1.noarch.rpm
Give 777 permission for Pandora Server Configuration file.
chmod -R 777 /var/www/html/pandora_console/include
Start MariaDB and httpd
systemctl start mariadb
systemctl start httpd
Open the pandora server from your browser. http://yourip/pandora_console/.
Click Next.
Pandora FMS
Click Yes, I accept licence terms.
Licence
All Software dependencies are installed, please select "MySQL Database" for this tutorial and
click Next.
dependencies installed
You will Create a New Database with the name pandora with root privileges.
Click Next.
Configure Database
Database Configuration is finished successfully. Please note the random password generated - dxowdqfx because you need it for the next step.
Click Next.
Database Success
and finally, the Pandora Console is installed and you now can login with default credentials. username = admin - password = pandora.
Pandora Admin
Before you login to pandora, you need to rename the file install.php in the /var/www/html/pandora_console directory.
mv /var/www/html/pandora_console/install.php /var/www/html/pandora_console/install_backup.php
and now Log in to the Pandora Console. This is a Screenshot after Log into Pandora Console.
Pandora

Step 3 - Install Pandora Server

Download and Install Pandora Server.
cd /tmp
wget http://sourceforge.net/projects/pandora/files/Pandora%20FMS%205.1/SP1Final/RHEL_CentOS/pandorafms_server-5.1SP1-1.noarch.rpm

rpm -ivh pandorafms_server-5.1SP1-1.noarch.rpm
Edit Pandora server configuration file :
vi /etc/pandora/pandora_server.conf
add the password generated on dbpass line - dxowdqfx.
Pandora dbpass
and then start pandora server and tentacle server.
/etc/init.d/pandora-server start
/etc/init.d/tentacle_serverd start
At this step, Pandora server has been configured and ready to add new host monitoring to the server.

Installing Pandora Agent on Ubuntu 15.04

In this part of the tutorial, you will install the Pandora monitoring agent on Ubuntu 15.04 and add it to the pandora server.
Login to the Ubuntu server and become root user by running:
sudo -
Then download and install the agent on Ubuntu:
cd /tmp
wget http://softlayer-ams.dl.sourceforge.net/project/pandora/Pandora%20FMS%205.1/SP1Final/Debian_Ubuntu/pandorafms.agent_unix_5.1SP1.deb

dpkg -i pandorafms.agent_unix_5.1SP1.deb
Edit Pandora agent configuration file,
vi /etc/pandora/pandora_agent.conf
add the Pandora Server IP 192.168.43.187  in the server_ip line,
Pandora Agent
and then start Pandora agent.
/etc/init.d/pandora_agent_daemon start

Testing PandoraFMS

Open your browser and log in to the Pandora console. http://192.168.43.187/pandora_console/
Pandora Finish
You can see :
Pandora Server CentOS 7 with IP 192.168.43.187 is running.
Ubuntu 15.04 with the IP 192.168.43.105  has been monitored.

Conclusion

Pandora FMS is powerful monitoring tool for a servers, networks and applications. It is easy to configure and deploy onto the servers. Pandora FMS can monitor different operating systems like Linux, Windows, HP-UX, Solaris and BSD and has a complete documentation library.

No comments:

Post a Comment