zaterdag 20 juli 2013

Installing Observium Monitoring Tool

Hi all, today another new blog from my side. My colleague Rob has a nice monitoring tool called Observium. So i thought lets check this out and lets install this on a brand new Debian server.

Photo-main

Observium was started true a kickstarter project.
http://www.kickstarter.com/projects/588464062/observium-alerting

A small introduction about Observium.

"

Introduction

Observium is an Open Source, auto-discovering network monitoring platform written in PHP which supports a wide range of devices and operating systems. We collect data and status via SNMP and an optional Agent and present the information in a useful-to-engineers manner.
To keep things simple to manage, we try to discover everything that can be graphed or monitored on a device automatically. You usually don't know you need to graph something until after the event or outage! We even try to automatically discover neighboring devices seen via CDP and LLDP tables or OSPF neighbor tables. 
We believe that one of the key purposes of an NMS is to help engineers understand their networks. One of the very first features implemented was the ability to visualize a device's place in the network based on the devices it connected directly to, and the devices its interfaces share sub-nets with. 

"

Ok now a little tutorial on how to install this brilliant package.
Install the following packages:
aptitude install libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-snmp \
php-pear snmp graphviz subversion mysql-server mysql-client rrdtool \
fping imagemagick whois mtr-tiny nmap ipmitool
  

Create and copy the following directories and files
$ mkdir /opt/observium/
$ cd /opt/observium/
$ cp config.php.default config.php
$ mkdir graphs rrd
$ chown www-data.www-data graphs rrd
$ mkdir /opt/observium/logs
  

  
CREATE DATABASE observium;
GRANT ALL PRIVILEGES ON observium.* TO 'observium'@'localhost'
IDENTIFIED BY '<observium db yourpassword>';
  
  

We need to create some Mysql database lines by following up the commands bellow
  
$ mysql -uroot -p
Enter password: <mysql root password>
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 238145

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE DATABASE observium;
Query OK, 1 row affected (0.10 sec)

mysql> GRANT ALL PRIVILEGES ON observium.* TO 'observium'@'localhost' IDENTIFIED BY 'observium';
Query OK, 0 rows affected (0.06 sec)
  
  

Now we need to add the config.php
cd/opt/observium/ nano config.php

### Database config
$config['db_host'] = "localhost";
$config['db_user'] = "observium";
$config['db_pass'] = "observium";
$config['db_name'] = "observium";

  

Ok now we need to add a virtual host to our apache
$ sudo vim /etc/apache2/sites-enabled/010-observium

<VirtualHost *:80>
       ServerName  observium.yourdomain.com
       DocumentRoot /opt/observium/html
       <Directory />
               Options FollowSymLinks
               AllowOverride None
       
       ErrorLog /var/log/apache2/error.log
       LogLevel warn
       CustomLog /var/log/apache2/access.log combined
       
</VirtualHost>
  
  

$ a2enmod rewrite
Enabling module rewrite.
Run '/etc/init.d/apache2 restart' to activate new configuration!

$ a2ensite observium
Enabling site observium.
Run '/etc/init.d/apache2 reload' to activate new configuration!

$ service apache2 restart
  

  
$ ./adduser.php
Add User Tool
Usage: ./adduser.php <username> <password> <level 1-10> [email]

$ ./adduser.php admin adminpass1 10 

$ ./adduser.php admin1 adminpass2 1 


The only thing left is to add a new record in your hostfile.

192.168.0.20 observium.yourdomain.com

When you have don this you can access the web page true IE by typing observium.yourdomain.com


Good luck installing :)

P.S
Make sure you have a router with SNMP.








Geen opmerkingen:

Een reactie posten