On Debian 13:
sudo apt update
sudo apt install -y apache2 mariadb-server php php-cli php-mysql php-gd php-snmp php-ldap php-curl php-mbstring php-xml php-zip libapache2-mod-php snmp snmpd fping graphviz imagemagick rrdtool librrdp-perl
On RHEL 10:
sudo dnf install -y epel-release
sudo dnf install -y httpd mariadb-server php php-cli php-mysqlnd php-gd php-snmp php-ldap php-curl php-mbstring php-xml php-zip net-snmp net-snmp-utils fping graphviz imagemagick rrdtool
On Debian 13:
sudo systemctl enable --now mariadb
On RHEL 10:
sudo systemctl enable --now mariadb
Secure and create the database:
sudo mysql_secure_installation
sudo mysql -e "CREATE DATABASE observium DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;"
sudo mysql -e "CREATE USER 'observium'@'localhost' IDENTIFIED BY 'StrongPassword123!';"
sudo mysql -e "GRANT ALL PRIVILEGES ON observium.* TO 'observium'@'localhost';"
sudo mysql -e "FLUSH PRIVILEGES;"
cd /opt
sudo mkdir observium
sudo chown $USER:$USER observium
cd observium
wget http://devs.observium.org/observium-community-latest.tar.gz
tar -xzf observium-community-latest.tar.gz
Copy configuration template:
cp config.php.default config.php
nano config.php
Key settings to configure:
<?php
$config['db_host'] = 'localhost';
$config['db_user'] = 'observium';
$config['db_pass'] = 'StrongPassword123!';
$config['db_name'] = 'observium';
$config['base_url'] = 'http://observium.example.com';
$config['snmp']['community'] = array('public');
$config['snmp']['version'] = 'v2c';
$config['discovery_by_ip'] = true;
$config['discovery_networks'] = array('192.168.0.0/24');
?>
cd /opt/observium
mkdir rrd log html/graphs/cache
chmod 777 rrd log html/graphs/cache
Run the installation script:
./discovery.php -h
./discovery.php -p
Create admin user:
./adduser.php admin SecurePassword123! admin admin@example.com
Create Apache configuration:
sudo tee /etc/apache2/sites-available/observium.conf >/dev/null <<'EOF'
<VirtualHost *:80>
ServerName observium.example.com
DocumentRoot /opt/observium/html
<Directory /opt/observium/html>
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/observium_error.log
CustomLog ${APACHE_LOG_DIR}/observium_access.log combined
</VirtualHost>
EOF
On Debian 13:
sudo a2ensite observium
sudo a2enmod rewrite
sudo systemctl restart apache2
On RHEL 10:
sudo ln -s /etc/apache2/sites-available/observium.conf /etc/httpd/conf.d/observium.conf
sudo systemctl restart httpd
sudo tee /etc/cron.d/observium >/dev/null <<'EOF'
33 */6 * * * observium cd /opt/observium && ./discovery.php -h >> /dev/null 2>&1
15 */6 * * * observium cd /opt/observium && ./poller.php >> /dev/null 2>&1
25 */6 * * * observium cd /opt/observium && ./bill-collect.php >> /dev/null 2>&1
45 1 * * * observium cd /opt/observium && ./cleanup.php >> /dev/null 2>&1
55 1 * * * observium cd /opt/observium && ./syslog-update.php >> /dev/null 2>&1
EOF
Edit SNMP daemon config:
sudo tee /etc/snmp/snmpd.conf >/dev/null <<'EOF'
rocommunity public default
sysLocation Your Server Location
sysContact admin@example.com
EOF
Restart SNMP:
sudo systemctl enable --now snmpd
On UFW:
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 161/udp
On firewalld:
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --permanent --add-port=161/udp
sudo firewall-cmd --reload
Open http://SERVER_IP or http://observium.example.com and log in with username admin and the password you set.
Edit config.php:
$config['discovery_schedule'] = array(
array('network' => '192.168.1.0/24', 'snmp_ver' => 'v2c', 'community' => 'public'),
array('network' => '10.0.0.0/8', 'snmp_ver' => 'v2c', 'community' => 'public'),
);
See Observium Hardening.
Need professional assistance with your monitoring infrastructure? Our team provides:
Get in touch: office@linux-server-admin.com | Contact Page
Prefer automation? See Observium Ansible Setup for an example playbook.
Prefer containers? See Observium Docker Setup.
See Observium Configuration for configuration guidance.
See Observium Security for hardening guidance.