Debian/Ubuntu Installation

Compatible Versions

This guide works with Ubuntu 12.04 to 16.04 and Debian 7 and 8. For Ubuntu 13.10 and later, the Apache access configuration is different, and for Ubuntu 16.04 and later the package list and PHP configurations are different. These are documented below.

We strongly recommend using Ubuntu 16.04 or later with PHP 7.

Install Dependencies

Install the packages we need to run Observium:

For Ubuntu versions 16.04 and later:

apt-get install libapache2-mod-php7.0 php7.0-cli php7.0-mysql php7.0-mysqli php7.0-gd php7.0-mcrypt \
php7.0-json php-pear snmp fping mysql-server mysql-client python-mysqldb rrdtool subversion whois \
mtr-tiny ipmitool graphviz imagemagick apache2

For Debian and Ubuntu versions 15.10 and earlier:

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

If you want to be able to monitor libvirt virtual machines, install libvirt-bin (beware: this pulls in a whole bunch of dependencies you otherwise probably wouldn't need on your server):

apt-get install libvirt-bin

Download Observium

First, create a directory for Observium to live in:

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

Observium Editions

Observium comes in two editions, an Open Source Community Edition released on a 6 month cycle, and a Subscription Edition with additional features, rapid bug fixes and feature improvements on a daily basis and an easy to use SVN-based update mechanism.

Observium Community Edition

If you would like to install the Community Edition, please install using the most recent .tar.gz release.

Download the latest .tar.gz of Observium and unpack:

tar zxvf observium-community-latest.tar.gz

Observium Subscription Edition

If you have a valid Observium subscription, please use one of the automated SVN release repositories.

We recommend the stable train for people who intend to use automated updates to keep their Observium installation up to date.

For the current train:

svn co observium

For the stable train:

svn co observium


Change into the new install directory:

cd observium

Copy the default configuration file and edit it for your system:

cp config.php.default config.php

Edit config.php. Change the options to reflect your installation.

MySQL Credentials

You must change the MySQL username and password. Most other settings can be left as default.

MySQL Database

Create the MySQL database:

mysql -u root -p
<mysql root password>
mysql> CREATE DATABASE observium DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql> GRANT ALL PRIVILEGES ON observium.* TO 'observium'@'localhost'
    -> IDENTIFIED BY '<observium db password>';

Setup the MySQL database and insert the default schema:

./discovery.php -u

It is OK to have some errors in the SQL revisions

Create required directories

Create the directory Observium will store its logs in:

mkdir logs

Alternatively you can create a directory somewhere else and point the log_dir directive in the configuration to that directory.

Create the directory to store RRDs in:

mkdir rrd
chown www-data:www-data rrd

Apache Configuration

Ubuntu newer than 14.04 and newer versions of Debian use Apache 2.4. You can check your version of Apache with the following command:

dpkg -l apache2

Apache 2.2

If you're using Apache 2.2 the server will be running only Observium, change /etc/apache2/sites-available/default to :

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /opt/observium/html
    <FilesMatch \.php$>
      SetHandler application/x-httpd-php
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    <Directory /opt/observium/html/>
            DirectoryIndex index.php
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
    ErrorLog  ${APACHE_LOG_DIR}/error.log
    LogLevel warn
    CustomLog  ${APACHE_LOG_DIR}/access.log combined
    ServerSignature On

Apache 2.4

If you're using Apache 2.4 (Ubuntu 14.04 or newer Debian), you need to use this alternative format :

The required file is now /etc/apache2/sites-available/000-default.conf on some installations, such as Ubuntu 16.04.

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /opt/observium/html
    <FilesMatch \.php$>
      SetHandler application/x-httpd-php
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    <Directory /opt/observium/html/>
            DirectoryIndex index.php
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Require all granted
    ErrorLog  ${APACHE_LOG_DIR}/error.log
    LogLevel warn
    CustomLog  ${APACHE_LOG_DIR}/access.log combined
    ServerSignature On

Alternatively you can create a vhost just for Observium (see the bottom of the page)

Enable php mcrypt module:

phpenmod mcrypt

Or for older distributions:

php5enmod mcrypt

On newer distros (Ubuntu 16.04 and above), enable PHP and switch to mpm_prefork:

a2dismod mpm_event
a2enmod mpm_prefork
a2enmod php7.0

Enable mod_rewrite for Observium's URLs:

a2enmod rewrite
apache2ctl restart

Add Initial User and Device

Add a first user, use level of 10 for admin:

./adduser.php <username> <password> <level>

Add a first device to monitor:

./add_device.php <hostname> <community> v2c

Perform Initial Discovery and Poll

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

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

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

Cron Usage

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 without removing the username.

Polling Interval

Observium operates on a fixed poller frequency of 5 minutes or 300 seconds. The poller-wrapper process must be run at this frequency will NOT work otherwise.

# Run a complete discovery of all devices once every 6 hours
33  */6   * * *   root    /opt/observium/discovery.php -h all >> /dev/null 2>&1

# Run automated discovery of newly added devices every 5 minutes
*/5 *     * * *   root    /opt/observium/discovery.php -h new >> /dev/null 2>&1

# Run multithreaded poller wrapper every 5 minutes
*/5 *     * * *   root    /opt/observium/ 4 >> /dev/null 2>&1

# Run housekeeping script daily for syslog, eventlog and alert log
13 5 * * * root /opt/observium/housekeeping.php -ysel >> /dev/null 2>&1

# Run housekeeping script daily for rrds, ports, orphaned entries in the database and performance data
47 4 * * * root /opt/observium/housekeeping.php -yrptb >> /dev/null 2>&1

Poller Performance

Please note running four poller instances is good for initial testing, but do check the Performance Tuning page for further performance enhancing options once you get going.

You should now be able to browser to your server's IP address or hostname and access the Observium web interface.


Updating Observium has been designed to be as quick and painless as possible. Using our SVN delivery mechanism, it can even be automated. Because we have a rapid development and model, we recommend that you update frequently, at least once per month, though once or twice per week is better and many users update daily via an automated CRON job.

See Updating the Subscription Edition for a short explanation on how to update the Subscription Edition of Observium.

Apache Virtual Host

If you want to create a proper virtual host, something like this:

<VirtualHost *:80>
  DocumentRoot /opt/observium/html/
  CustomLog /opt/observium/logs/access_log combined
  ErrorLog /opt/observium/logs/error_log
  <Directory "/opt/observium/html/">
    AllowOverride All
    Options FollowSymLinks MultiViews

You'll need to create an /opt/observium/logs directory with permissions so that Apache can write to it.


If you're using Debian, due to the decision of Debian not to ship SNMP MIBs with the distribution anymore, you either have to enable the non-free repository and install the snmp-mibs-downloader package and having it download the MIBs from the internet, or, you can make the snmp utilities use the MIBs delivered with Observium:

Remove this line in /etc/snmp/snmp.conf:

mibs :

and add the following line:

mibdirs /opt/observium/mibs:/opt/observium/mibs/net-snmp


When running poller.php or discovery.php you may see a lot of notices regarding undefined indexes, variables and offsets. To hide these notices you can do the following:

nano /etc/php5/cli/php.ini

Find the line containing:

error_reporting = E_ALL & ~E_DEPRECATED

Change this to:

error_reporting = E_ALL & ~E_NOTICE

If there are problems with this installation tutorial, please ask on the Mailing Lists or IRC.