Showing posts with label linux observium. Show all posts
Showing posts with label linux observium. Show all posts

How to 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. # svn co http://www.observium.org/svn/observer/trunk observium

6. # cd observium

7. Create mysql username and password
# /usr/bin/mysqladmin -u root password 'passworD321'
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)

8. # cp config.php.default config.php

9. vi config.php and add the following part.

$config['fping'] = "/usr/sbin/fping";

# php includes/sql-schema/update.php

10. # mkdir graphs rrd

11. chown apache.apache graphs rrd

12. Allow in httpd

# 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
# ./adduser.php <user-name> <password> <level=10>

15. Add a first device to monitor:
# ./addhost.php <hostname> <community> v2c

16. Discover and add hosts
# ./discovery.php -h all
# ./poller.php -h all

17. Add to cronjobs
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://localhost/observium with the username and password we have created.

Thats All, Have Fun and Informative Monitoring