How to setup Observium Monitoring server on Centos/Redhat

What is Observium?

Observium is an auto discovering SNMP based network monitoring platform written in PHP which includes support for a wide range of network hardware and operating systems including Cisco, Windows, Linux, HP, Dell, FreeBSD, Juniper, Brocade, Netscaler, NetApp and many more.  Observium has grown out of a lack of network monitoring platforms which are both simple to manage and pleasant to use. It is intended to provide a navigable interface to the health and performance of your network. Its design goals include collecting as much historical data about devices as possible, using as much auto-discovery as possible with little or no manual intervention, and having a very intuitive interface.

Repositories

For more extended package list, we first install the RPM Forge and EPEL repositories:

# rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
# rpm -Uvh http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

Packages

Now let's install the needed packages for Observium:

# yum install wget.x86_64 httpd.x86_64 php.x86_64 php-mysql.x86_64 php-gd.x86_64 php-posix.x86_64  php-mcrypt.x86_64 php-pear.noarch vixie-cron.x86_64 net-snmp.x86_64 net-snmp-utils.x86_64 fping.x86_64  mysql-server.x86_64 mysql.x86_64 MySQL-python.x86_64 rrdtool.x86_64 subversion.x86_64 jwhois.x86_64  ipmitool.x86_64 graphviz.x86_64 ImageMagick.x86_64


# service mysqld start
# service httpd start

# chkconfig mysqld on
# chkconfig httpd on


# mkdir -p /opt/observium && cd /opt


Observium Community Edition

Download the latest .tar.gz of Observium and unpack:

# wget http://www.observium.org/observium-community-latest.tar.gz
# tar zxvf observium-community-latest.tar.gz

Configuration

Change into the new install directory:

# cd /opt
# cd observium
Copy the default configuration file and edit it for your system:

# cp config.php.default config.php

MySQL Database : Create the MySQL database:

# mysql -u root -p<mysql root password>
mysql> CREATE DATABASE observium DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql> GRANT ALL PRIVILEGES ON observium.* TO 'observium'@'localhost'
    -> IDENTIFIED BY '<observium db password>';
mysql> quit

Setup the MySQL database and insert the default schema:

./discovery.php -u


System


Alternatively you can create a directory somewhere else and point the log_dir directive in the configuration to that directory.

Create the rrd directory to store RRDs in:

# mkdir rrd
# chown apache:apache rrd

Configure appache to host observium

# Vi /etc/httpd/conf/httpd.conf

add the following in at the end of the file


<VirtualHost *:80>
   DocumentRoot /opt/observium/html/
   ServerName  observium.domain.com
   CustomLog /opt/observium/logs/access_log combined
   ErrorLog /opt/observium/logs/error_log
   <Directory "/opt/observium/html/">
     AllowOverride All
     Options FollowSymLinks MultiViews
   </Directory>
</VirtualHost>

Create the logs directory Observium will store its logs in give permission to apache

# mkdir /opt/observium/logs
# chown apache:apache /opt/observium/logs

Add a first user, use level of 10 for admin:

# cd /opt/observium
# ./adduser.php <username> <password> <level>

Add a first device to monitor:

./add_device.php <hostname> <community> v2c

Do an initial discovery and polling run to populate the data for the new device:

./discovery.php -h all
./poller.php -h all

Restart the apache services to effect the changes

# service httpd start

access you observium server using http://your-ip-address  


 Observium login webpage

Comments

Popular posts from this blog

Observium: Configuring Microsoft Windows 2008 Server SNMP Agent

AWS: Introduction to AWS (Amazon Web Services)

System/Server Health Status using PowerShell