SNMP Monitoring
    Apache / MariaDB

    Deploy Observium on a VPS

    Install Observium Community Edition on a RamNode VPS with Apache, PHP, MariaDB, RRDtool, and SNMP discovery and polling cron jobs.

    Target: Observium Community Edition on Apache + PHP + MySQL/MariaDB + RRDtool, with SNMP-based discovery/polling driven by cron. Community edition is git-based (no installer script like the Pro/Enterprise tarball releases), so this pulls straight from the public repo mirror.

    0. Assumptions

    • Fresh Ubuntu 24.04 LTS VPS, non-root sudo user
    • Community edition — if you're actually licensing Observium Pro/Ent, use their observium_installer tarball/script instead of git clone; everything else below (Apache/PHP/MySQL layer) still applies

    1. Base packages

    shell
    sudo apt update && sudo apt upgrade -y
    sudo apt install -y apache2 libapache2-mod-php php php-cli php-mysql \
        php-gd php-json php-curl php-snmp php-xml php-mbstring php-zip \
        mariadb-server mariadb-client snmp fping rrdtool subversion \
        python3-mysqldb whois git graphviz imagemagick

    2. MariaDB

    shell
    sudo systemctl enable --now mariadb
    sudo mysql_secure_installation
    
    sudo mysql -u root -p <<'EOF'
    CREATE DATABASE observium DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    CREATE USER 'observium'@'localhost' IDENTIFIED BY 'CHANGE_ME_STRONG_PW';
    GRANT ALL PRIVILEGES ON observium.* TO 'observium'@'localhost';
    FLUSH PRIVILEGES;
    EOF

    Enable strict InnoDB settings Observium expects — edit /etc/mysql/mariadb.conf.d/50-server.cnf:

    shell
    [mysqld]
    innodb_file_per_table=1
    sql_mode=""
    shell
    sudo systemctl restart mariadb

    3. Fetch Observium

    shell
    sudo mkdir -p /opt/observium
    cd /opt
    sudo git clone https://github.com/observium/observium.git

    4. Directory perms

    shell
    sudo chown -R www-data:www-data /opt/observium/rrd /opt/observium/logs
    sudo chmod -R 775 /opt/observium/rrd /opt/observium/logs

    5. Configuration

    shell
    cd /opt/observium
    sudo cp config.php.default config.php

    Edit /opt/observium/config.php:

    shell
    $config['db_extension']    = 'mysqli';
    $config['db_host']         = 'localhost';
    $config['db_user']         = 'observium';
    $config['db_pass']         = 'CHANGE_ME_STRONG_PW';
    $config['db_name']         = 'observium';
    
    $config['base_url']        = 'https://observium.example.com/';
    
    $config['rrd_dir']         = '/opt/observium/rrd';
    $config['rrdtool']         = '/usr/bin/rrdtool';
    $config['mib_dir']         = '/opt/observium/mibs';
    
    $config['snmp']['community'] = array('YOUR_RO_COMMUNITY');

    6. Build the schema

    shell
    cd /opt/observium
    sudo php discovery.php -u

    This applies pending DB migrations (includes/update/*). Re-run after every git pull — it's idempotent and safe.

    7. Apache vhost

    shell
    sudo a2enmod rewrite php8.3

    /etc/apache2/sites-available/observium.conf:

    shell
    <VirtualHost *:80>
        ServerName observium.example.com
        DocumentRoot /opt/observium/html/
    
        <Directory "/opt/observium/html/">
            AllowOverride All
            Options FollowSymLinks
            Require all granted
        </Directory>
    
        ErrorLog ${APACHE_LOG_DIR}/observium_error.log
        CustomLog ${APACHE_LOG_DIR}/observium_access.log combined
    </VirtualHost>
    shell
    sudo a2ensite observium
    sudo a2dissite 000-default
    sudo systemctl reload apache2

    TLS via certbot:

    shell
    sudo apt install -y certbot python3-certbot-apache
    sudo certbot --apache -d observium.example.com

    If you'd rather run Nginx (matching your LibreNMS/NetBox stack) instead of Apache, use a try_files/fastcgi_pass vhost pointed at /opt/observium/html with PHP-FPM the same way as the LibreNMS guide — Observium doesn't require Apache specifically, mod_rewrite-equivalent try_files handling is all it needs.

    8. Create the first admin user

    shell
    cd /opt/observium
    sudo ./adduser.php admin CHANGE_ME_STRONG_PW 10

    The trailing 10 is the access level (10 = admin).

    9. Add and discover devices

    shell
    cd /opt/observium
    sudo ./add_device.php nlxsvz71.ramnode.com v2c YOUR_RO_COMMUNITY
    sudo ./discovery.php -h all
    sudo ./poller.php -h all

    10. Cron

    shell
    sudo tee /etc/cron.d/observium >/dev/null <<'EOF'
    33  */6 * * *   root    /opt/observium/discovery.php -h all >> /dev/null 2>&1
    */5 *   * * *   root    /opt/observium/poller-wrapper.py 4 >> /dev/null 2>&1
    EOF

    poller-wrapper.py fans out polling across N parallel workers (4 here — tune to core count). For larger fleets, bump the worker count and interval carefully; SNMP timeouts stack up fast on constrained VPS CPU.

    11. Log rotation

    shell
    sudo tee /etc/logrotate.d/observium >/dev/null <<'EOF'
    /opt/observium/logs/*.log {
        daily
        rotate 14
        compress
        delaycompress
        missingok
        notifempty
    }
    EOF

    12. Firewall

    shell
    sudo ufw allow OpenSSH
    sudo ufw allow 80,443/tcp
    sudo ufw enable

    13. Validate

    Log in at https://observium.example.com/, confirm the device you added shows graphs after the first poller run completes (give it one full 5-minute cycle). Check /opt/observium/logs/ if graphs stay empty — usually an RRD permissions or SNMP timeout issue.

    Notes on running LibreNMS + Observium + NetBox side-by-side

    If these all land on one VPS rather than three separate instances:

    • Pick one of Apache or Nginx system-wide and run the other app's PHP over FPM behind it — don't run both web servers bound to :80/:443.
    • Give each app its own MySQL/MariaDB database and dedicated unprivileged DB user (done above) — never share credentials across apps.
    • Watch RAM: LibreNMS + Observium pollers running concurrently on a 4GB VPS can OOM under load; consider staggering poller intervals or sizing up to 8GB if fleet size grows past ~100 devices per tool.