observium_logo

What is Observium?

Observium is an autodiscovering 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.
Observium is not intended to replace an up/down alerting system like Icinga or Nagios, but rather to complement it with an easy to manage, intuitive representation of historical and current performance statistics, configuration visualisation and syslog capture.

Assumptions

  • A working base install of Linux Debian 7 Wheezy or Ubuntu 12.04 LTS or Ubuntu 13.04
  • UDP port 161 open between the Observium Debian 7 server and the end devices
  • Aptitude sources configured correctly
  • Unrestricted root access

Installing Observium

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

1. Update and upgrade

apt-get update && apt-get -y upgrade

2. Install packages required

apt-get install -y libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-snmp php-pear snmp graphviz php5-mcrypt php5-json subversion mysql-server mysql-client rrdtool fping imagemagick whois mtr-tiny nmap ipmitool python-mysqldb

Optional: If you want to monitor libvirt Virtual Machines

apt-get install libvirt-bin

3. Create a folder for Observium to live in

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

4. Download the community version of Observium

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

5. Extract Observium

tar zxvf observium-community-latest.tar.gz

6. Change to Observium installation directory

cd observium

7. Copy the default configuration file and modify to your system

cp config.php.default config.php

Note: The only real change you need to make is to the “$config[‘db_pass’] = ” field unless you are installing the database elsewhere with a different database name.

8. Create the Observium database

$mysql -u root -p
CREATE DATABASE observium;
GRANT ALL PRIVILEGES ON observium.* TO 'observium'@'localhost' IDENTIFIED BY 'password';
quit;

9. Update the Observium config.php file and change the username and password fields

vi /opt/observium/config.php

9. Setup the MySQL database and insert the default schema

php includes/update/update.php

It’s OK to have some errors in the SQL revisions up to 006

10. Create  the directory to store RRDs in

mkdir rrd
chown www-data:www-data rrd

11. If the server will only be running Observium, change the /etc/apache2/sites-available/default to:

Alternatively you can create a vhost just for Observium

12. Enable mod_rewrite for Observium’s cleaner URLs:

a2enmod rewrite
apache2ctl restart

13. Add the first user (Level 10 for Admin)

cd /opt/observium
./adduser.php   

14. Add the first device (even if you haven’t configured it yet)

./add_device.php   v2c

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

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

16. Create cron jobs, create a new file /etc/cron.d/observium with the following contents

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

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

17. Connect to the web console by going to a browser and typing “http://serveripaddress”

Observium Login

Geotagging

For a list of locations for geo-tagging your servers on to the Observium map, please refer to this link:

https://developers.google.com/adwords/api/docs/appendix/geotargeting

Manual Configuration Settings

To set some manual settings in Observium you will need to edit the config.php file and insert the $config lines that you require. A reference of the configuration lines you can insert: http://www.observium.org/docs/config_options/

vi /opt/observium/config.php

Configuring Microsoft Windows 2008 Server SNMP Agent

1. Open Server Management

2. Right click on “Features” and click on “Add Features”

3. Expand “SNMP Services” and select “SNMP Service” click Next

4. Click Install

5. Close Server Manager

6. Open Server Manager

7. Expand Configuration and select Services

7. Select SNMP Service, right click and select properties

8. Select the “Agent” tab

9. Type the contact name responsible for this server or email address

10. Type the location eg, Sydney,Australia

11. Tick the following

  • Physical
  • Datalink and subnetworkSNMP Trap Service - Agent

12. Select the “Traps” tab

13. Type in the community string you are using in your environment and select “Add to list”

14. Click “Add”

15. Type the IP of the Observium ServerSNMP Trap Service - Traps

16. Select “Security” tab

17. Ensure “Send authentication trap” is ticked

18. Click “Add” under “Accepted community names”

19. Select “READ CREATE” under Community rights

20. Enter your community string under Community Name

21. Select “Accept SNMP packets from these hosts”

22. Select “Add” and type the IP address of the Observium Server

You can also put in the FQDN of the Observium serverSNMP Trap Service - Security23. Add your server into the Observium Web Console

Configuring SNMP on Linux Debian, Ubuntu or Redhat

1a. Install Net-SNMP on Debian/Ubuntu

apt-get install snmpd

1b. Install Net-SNMP on Redhat

yum install net-snmp

2a. Make sure the SNMPDOPTS line in /etc/default/snmpd looks like this on Ubuntu or Debian

SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -p /var/run/snmpd.pid'

2b. Make sure the OPTIONS line in /etc/sysconfig/snmpd looks like this on Redhat

OPTIONS="-Lsd -Lf /dev/null -p /var/run/snmpd.pid"

3. Replace the default /etc/snmp/snmpd.conf file with something like this, changing the community, location and contact fields

com2sec readonly default COMMUNITY
group MyROGroup v1 readonly
group MyROGroup v2c readonly
group MyROGroup usm readonly
view all included .1 80
access MyROGroup "" any noauth exact all none none
syslocation LOCATION
syscontact CONTACT
#This line allows Observium to detect the host OS if the distro script is installed
extend .1.3.6.1.4.1.2021.7890.1 distro /usr/bin/distro

4. Get the Observium ‘distro’ script to identify your distribution via SNMP

cd /tmp
wget http://www.observium.org/svn/observer/trunk/scripts/distro
mv distro /usr/bin/distro
chmod 755 /usr/bin/distro

5. Restart SNMPD

/etc/init.d/snmpd restart

6. Add the host to your Observium Web Console

Configuring SNMP on Cisco IOS

In this example I will be using IPv4 Only named ACL’s which is a standard set up these days.

1. Shell into the Cisco console

2. Elevate to privileged mode

enable

3. Enter global configuration mode

configure terminal

4. Create named access list

ip access-list standard SNMPv4

5. Allow Observium server IP address

permit 
exit

6. Configure community string (change <community> to the community string in your environment)

snmp-server community  RO SNMPv4

7. Globally enable SNMP ifindex persistence

snmp-server ifindex persist

8. Set SNMP device location

snmp-server location Sydney,Australia

9. Set SNMP owner

snmp-server contact Chris
Cisco SNMP Setup Commands

 

13 Responses to “Setting up Observium”

  1. Karen

    Has anyone seen an issue with the graph’s not working? I’m getting “Draw Error” for traffic, storage, memory and cpu load on my servers I’m guessing it’s something that missed but I’m not sure.

    Thanks you for any assistance.

    Reply
  2. Karen Gleiter

    Thank you for the response. I have manually ran the polling and I see no errors. This is the command that I ran for running it manually.

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

    I’m new to this so please be patient with me.

    Thanks,

    Reply
    • cr_admin

      Hi Karen,

      Is this for one device or all devices?

      This could be a number of reasons, please check the following:

      1. A connection from the observium server to the mysql DB (also check db permissions).
      2. Check point 16 (adding a cron) and ensure this is working
      3. Check the /var/log/syslog for any errors
      4. Try removing the rrd files (rm -rf /opt/observium//*.rrd)
      5. Try reinstalling rrdtools

      Try and not do step 4 or 5 unless you are sure (and do backups).

      Let me know how you get on.

      Reply
  3. Karen Gleiter

    I’m sorry that I didn’t explain that it was only happening with the Linux systems. I have it working with the Cisco and the graphs are working fine. Should I still go through the list of items?

    Thanks again,

    Reply
    • Chris

      Hi Karen,

      That makes a lot of difference! Sounds like there isn’t anything wrong with Observium but more to do with the network/client server.

      Try the following:

      1. Ping to the client linux box (this should reply)
      2. Telnet from Observium server to the client server on port 199
      3. Run “Netstat -ntlp” and see if the process “snmpd” is listening on port 199
      4. Check over the /etc/snmp/snmpd.conf config file
      5. Check permissions & owner on /etc/snmp/snmpd.conf

      What Linux distro are you using?

      Thanks,

      Chris

      Reply
  4. Praveen Kumar

    Hi there,

    I have installed and configured on my Centos 7 with latest observium and followed snmp configuration as per your guide in my test environment, when i trying to add windows server in Observium i am getting error could not resolve ip like this but i am able to ping. Please provide me solution. I will be thankful to you.

    Thanks
    Praveen Kumar

    Reply
    • Chris

      Hi Praveen,

      Do you have a firewall blocking ports between Observium and the client? Is the client listening on the correct port? These would be the first things I’d be checking.

      Thanks, Chris

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.