Pages

Observium CE 0.13.10.4585 installation on FreeBSD

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.


1. Download Community Edition (Free) from http://www.observium.org/
2. Install MySQL, PHP, Web Server
3. Specific Configs

/etc/hosts
::1         localhost localhost.mylan
127.0.0.1   localhost localhost.mylan
10.2.2.2    observium.mylan observium
10.2.2.2    observium.mylan.
10.1.1.1    igw1.mylan
10.1.1.4    voip4.mylan
10.1.1.5    voip5.mylan
10.1.1.8    ciscoASA.mylan
10.1.1.153   console1.mylan

Lighttpd
/usr/local/etc/lighttpd/lighttpd.conf
# IPv4 listening socket
$SERVER["socket"] == "10.2.2.2:80" {
include "observium.conf"
}

/usr/local/etc/lighttpd/observium.conf
server.document-root = "/usr/local/www/data/html"
 url.rewrite-once = (
   "^/(.*)\.(png|css|jpg|gif|php)$" => "/$0",
   "^/cust/" => "/?page=cust",
   "^/bare/(.+)/" => "/index-bare.php?page=$1",
   "^/bare/(.+)/(.+)/" => "/index-bare.php?page=$1&opta=$2",
   "^/bare/(.+)/(.+)/(.+)/" => "/index-bare.php?page=$1&opta=$2&optb=$3",

   "^/mobile/([a-z|0-9]+)/(.+)/(.+)/" => "/mobile.php?page=$1&opta=$2&optb=$3",
   "^/mobile/([a-z|0-9]+)/(.+)/" => "/mobile.php?page=$1&opta=$2",
   "^/mobile/([a-z|0-9]+)/" => "/mobile.php?page=$1",
   "^/mobile/" => "/mobile.php",

   ## Rewrites for Devices

  "^/devices/location/(.+)/" => "/?page=devices&location=$1",
  "^/devices/alerted/" => "/?page=devices&status=alerted",
  "^/devices/(.+)/" => "/?page=devices&type=$1",

  "^/interfaces/(.+)/" => "/?page=interfaces&type=$1",

  "^/vrf/(.+)/(.+)/(.+)/" => "/?page=vrf&id=$1&opta=$2&optb=$3",
  "^/vrf/(.+)/(.+)/" => "/?page=vrf&id=$1&opta=$2",
  "^/vrf/(.+)/" => "/?page=vrf&id=$1",
  "^/device/([0-9]+)/([a-z]+)/(.+)/(.+)/(.+)/(.+)/(.+)/(.+)/(.+)/" => "/?page=device&id=$1&section=$2&opta=$3&optb=$4&optc=$5&optd=$6&opte=
  "^/device/([0-9]+)/([a-z]+)/(.+)/(.+)/(.+)/(.+)/(.+)/(.+)/" => "/?page=device&id=$1&section=$2&opta=$3&optb=$4&optc=$5&optd=$6&opte=$7&op
  "^/device/([0-9]+)/([a-z]+)/(.+)/(.+)/(.+)/(.+)/(.+)/" => "/?page=device&id=$1&section=$2&opta=$3&optb=$4&optc=$5&optd=$6&opte=$7",
  "^/device/([0-9]+)/([a-z]+)/(.+)/(.+)/(.+)/(.+)/" => "/?page=device&id=$1&section=$2&opta=$3&optb=$4&optc=$5&optd=$6",
  "^/device/([0-9]+)/([a-z]+)/(.+)/(.+)/(.+)/" => "/?page=device&id=$1&section=$2&opta=$3&optb=$4&optc=$5",
  "^/device/([0-9]+)/([a-z]+)/(.+)/(.+)/" => "/?page=device&id=$1&section=$2&opta=$3&optb=$4",
  "^/device/([0-9]+)/([a-z]+)/(.+)/" => "/?page=device&id=$1&section=$2&opta=$3",
  "^/device/([0-9]+)/([a-z]+)/" => "/?page=device&id=$1&section=$2",
  "^/device/([0-9]+)" => "/?page=device&id=$1",

  "^/([a-z|0-9\-]+)/$" => "/?page=$1",

  "^/([a-z|0-9]+)/(.+)/(.+)/(.+)/(.+)/(.+)/$" => "/?page=$1&opta=$2&optb=$3&optc=$4&optd=$5&opte=$6",
  "^/([a-z|0-9]+)/(.+)/(.+)/(.+)/(.+)/$" => "/?page=$1&opta=$2&optb=$3&optc=$4&optd=$5",
  "^/([a-z|0-9]+)/(.+)/(.+)/(.+)/$" => "/?page=$1&opta=$2&optb=$3&optc=$4",
  "^/([a-z|0-9]+)/(.+)/(.+)/$" => "/?page=$1&opta=$2&optb=$3",
  "^/([a-z|0-9]+)/(.+)/$" => "/?page=$1&opta=$2"
 )
/usr/local/etc/lighttpd/modules.conf
server.modules = (
  "mod_access",
  "mod_alias",
  "mod_auth",
  "mod_rewrite"
)

SNMP MIB files
copy all MIB folders form Observium to /usr/local/share/snmp/mibs
cat /usr/local/etc/snmp/snmp.conf 
mibs +ALL

Crontab
# OBSERVIUM POLLER
*/5     *       *       *       *       root    /usr/local/bin/python /usr/local/www/data/poller-wrapper.py 10  >> /dev/null 2>&1
*/5     *       *       *       *       root    /usr/local/bin/python /usr/local/www/data/discovery.php  -h new >> /dev/null 2>&1
*       */6     *       *       *       root    /usr/local/bin/python /usr/local/www/data/discovery.php -d -h all  >> /dev/null 2>&1

4. Initial Config
./discovery.php -d -h all  
./discovery.php -h all
./poller.php -h all
./adduser.php <username> <password> <level>

./add_device.php <hostname> [any|nanp|anp|ap] [v3] [user] [password] [enckey] [md5|sha] [aes|des] [port] [udp|udp6|tcp|tcp6]
./add_device.php localhost public v2c      
./add_device.php ciscoASA.mylan      public v2c

5. Logs
/usr/local/www/data/observium.log
/usr/local/www/data/poller.php 15 January 15, 2014, 2:15 - 1 devices polled in 28.29 secs
/usr/local/www/data/poller.php 16 January 15, 2014, 2:20 - 1 devices polled in 3.608 secs
/usr/local/www/data/poller.php 20 January 15, 2014, 2:20 - 1 devices polled in 4.333 secs