Install Observium in linux

Observium is one of the best tool ever used by system network admin for monitoring everything about routers, switches and physical machines.

Please follow the following working steps to get Observium installed.

1. instal ncecessary packages
# yum install httpd php php-mysql php-gd php-snmp vixie-cron php-pear net-snmp net-snmp-utils graphviz subversion mysql-server mysql rrdtool fping ImageMagick jwhois nmap OpenIPMI-tools
2. install pear
# pear install Net_IPv6
# pear install Net_IPv4
3. # yum install libvirt
4. # mkdir /opt/observium
    # cd /opt
5. # wget http://www.observium.org/observium-community-latest.tar.gz
5.1 #tar zxvf observium-community-latest.tar.gz
6. # cd observium
7. Create mysql username and password
# /etc/init.d/mysql start
# /usr/bin/mysqladmin -u root password ‘yournrewrootpassword’
# mysql -u root -p
mysql> create database observium;
Query OK, 1 row affected (0.00 sec)
mysql>grant all privileges on observium. * to ‘observium’@’localhost’ identified by ‘passworD321’;
Query OK, 0 rows affected (0.00 sec)

#setenforce 0

We need to disable SELinux permanently, so you also need to change /etc/selinux/config so that the SELINUX option is set to permissive SELINUX=permissive

8. # cp config.php.default config.php
9. vi config.php and add the following part.
$config[‘fping’] = "/usr/sbin/fping";
# php includes/update/update.php
10. # mkdir graphs rrd
11. chown apache.apache graphs rrd
12. Allow in httpd

If the server will be running *only* Observium, change /etc/httpd/conf/httpd.conf default to :
# vi /etc/httpd/conf.d/observium.conf

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

13. Create logs directory for apache
# mkdir /opt/observium/logs
# chown apache.apache /opt/observium/logs
14. Add user, use level of 10 for admin
# cd /opt/observium
# php adduser.php <user-name> <password> <level=10>
15. Add a first device to monitor:
# php addhost.php <hostname> <community> v2c
16. Discover and add hosts
# php discovery.php -h all
# php poller.php -h all
17. Add to cronjobs

Please note that the below example includes a username, so will only work in /etc/crontab or /etc/cron.d/. It will NOT work in a user crontab edited with crontab -e.

33  */6 * * * /opt/observium/discovery.php -h all >> /dev/null 2>&1
*/5 * * * * /opt/observium/discovery.php -h new >> /dev/null 2>&1
*/5 * * * * /opt/observium/poller.php -h all >> /dev/null 2>&1

and restart the cron
# /etc/init.d/cron reload

18. In case if server rebooted, add to startup
# chkconfig mysqld on
# chkconfig httpd on

Now check,on your browser as http://[ip]/observium with the username and password we have created.
Thats All, Have Fun and Informative Monitoring

http://www.observium.org/wiki/RHEL_Installation

Leave a comment