How to Install Observium on Ubuntu 20.04

In this article, we’ll explain how to install Observium on Ubuntu 20.04.

Observium is an auto-discovering network monitoring platform supporting a wide range of hardware platforms and operating systems including Cisco, Windows, Linux, HP, Juniper, Dell, FreeBSD, F5, Brocade, Citrix Netscaler, NetApp and many more. Being a PHP-based platform, it offers an easy-to-use web interface to allow you to monitor the network devices.

Prerequisites

  • Installed Ubuntu 20.04 dedicated server or KVM VPS.
  • A root user access or normal user with administrative privileges.

Install Observium on Ubuntu

1. Keep the server updated

# apt update -y

2. Install PHP and Dependencies

# apt install libapache2-mod-php7.4 php7.4-cli php7.4-mysql php7.4-gd php7.4-json php7.4-bcmath php7.4-mbstring php7.4-opcache php7.4-curl php-apcu php-pear snmp fping rrdtool whois mysql-server mysql-client subversion mtr-tiny ipmitool graphviz imagemagick apache2 python3-mysqldb python3-pymysql python-is-python3 -y

3. Create the MySQL database and user

Run following commands to create database and user also grant privileges to the user.

# mysql -u root -p

 

CREATE DATABASE observium DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

GRANT ALL PRIVILEGES ON observium.* TO ‘observium’@’localhost’ IDENTIFIED BY ‘’;

FLUSH PRIVILEGES;

exit

4. Download, Install, and Configure Observium

Download Observium

First, create a directory for Observium to live in:

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

Change the permissions of the directory.

# chown -R observium:observium /opt/observium/

# chmod -R 775 /opt/observium/

Here we are installing Observium community edition.

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

Extract it using following command:

# tar zxvf observium-community-latest.tar.gz

Configure 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 the file for your system.

# vim config.php

Modify the file as shown bellow:

$config[‘db_user’] = ‘observium’;
$config[‘db_pass’] = ‘’;

Save and exit.

Create required directories

Create the directory Observium will store its logs in:

# mkdir /opt/observium/{rrd,logs}

Insert the default MySQL database schema.

# ./discovery.php -u

5. Configure Apache

Remove the default Apache configuration file.

# rm -rf /etc/apache2/sites-enabled/000-default.conf && rm -rf /etc/apache2/sites-available/000-default.conf

Create new Apache configuration file for Observium

# vim /etc/apache2/sites-available/observium.conf

Add following content:

    ServerAdmin webmaster@localhost
    DocumentRoot /opt/observium/html

    
        SetHandler application/x-httpd-php
    

    
        Options FollowSymLinks
        AllowOverride None
    

    
        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

Save and exit.

Create symbolic link to enable the configuration file using following command:

# ln -s /etc/apache2/sites-available/observium.conf /etc/apache2/sites-enabled/observium.conf

Restart the Apache service

# systemctl restart apache2

Disable mpm_event module.

# a2dismod mpm_event

Enable mpm_prefork module.

# a2enmod mpm_prefork

Enable mod_rewrite.

# a2enmod rewrite

Restart the Apache service.

# apache2ctl restart

6. Create Admin Account

Add and initial user with level of 10 for admin. Modify the AdminPassword value with your own secure password.

# ./adduser.php admin Admin@Pass 10

Create a new file /etc/cron.d/observium to add cron jobs.

# nano /etc/cron.d/observium

Add the following contents:

# 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/poller-wrapper.py >> /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

That’s it we have successfully installed and configured Observium on Ubuntu 20.04

Now, navigate to your browser and access Observium web interface using server IP. http://192.1.1.15/ and login with the admin user and password we have created earlier.

In this article, we have explained how to install Observium on Ubuntu 20.04.

Ubuntu Server Admin

Recent Posts

Canonical Releases Ubuntu 25.04 Plucky Puffin

The latest interim release of Ubuntu introduces “devpacks” for popular frameworks like Spring, along with…

2 days ago

Ubuntu 25.04 (Plucky Puffin) Released

Ubuntu 25.04, codenamed “Plucky Puffin”, is here. This release continues Ubuntu’s proud tradition of integrating…

3 days ago

Extended Security Maintenance for Ubuntu 20.04 (Focal Fossa) begins May 29, 2025

Ubuntu released its 20.04 (Focal Fossa) release 5 years ago, on March 23, 2020. As…

3 days ago

Ubuntu 20.04 LTS End Of Life – activate ESM to keep your fleet of devices secure and operational

Focal Fossa will reach the End of Standard Support in May 2025, also known as…

4 days ago

Ubuntu MATE 25.04 Release Notes

Ubuntu MATE 25.04 is ready to soar! 🪽 Celebrating our 10th anniversary as an official…

4 days ago

Ubuntu Weekly Newsletter Issue 887

Welcome to the Ubuntu Weekly Newsletter, Issue 887 for the week of April 6 –…

5 days ago