How To Install Observium on Ubuntu 24.04 LTS
Observium is a powerful, feature-rich network monitoring platform designed to provide in-depth insights into your infrastructure’s health and performance. It offers an intuitive interface, robust reporting, and extensive device compatibility ranging from servers and routers to switches and firewalls. This platform is a crucial tool for modern IT environments, helping administrators detect issues in real time, automate monitoring tasks, and confidently manage various network elements.
Ubuntu 24.04 LTS is a reliable, long-term support operating system, making it an excellent choice for hosting Observium. Its stability, security, and wide community support simplify deployment and ongoing maintenance. In this guide, you will learn exactly how to install and configure Observium on Ubuntu 24.04 LTS step by step. You’ll explore essential system requirements, the LAMP stack configuration, Observium installation, and the final setup to ensure your monitoring solution runs efficiently. By following these instructions, you’ll have a highly optimized Observium deployment ready to watch over your network.
Let’s dive in and get started with setting up Observium on Ubuntu 24.04 LTS. Below is a comprehensive breakdown of each step you need to follow, including tips for troubleshooting and security best practices. Whether you’re an experienced Linux administrator or relatively new to the world of open-source network monitoring, this guide provides everything you need to confidently manage Observium in your environment.
System Requirements and Preparation
Before installing Observium on Ubuntu 24.04 LTS, ensure your system meets the recommended requirements. Having a stable environment not only makes installation smoother but also contributes to better performance in the long run.
Hardware Requirements
Observium can scale with your network’s growth, but it’s important to start with a base configuration that meets your initial monitoring needs. At a minimum, consider:
- CPU: A single-core processor (e.g., 1 GHz) for smaller setups. Dual-core or higher recommended.
- RAM: At least 2 GB of RAM. Larger networks might need 4 GB or more for smooth operation.
- Storage: 20 GB of disk space for a small to medium installation. Add more space as your environment grows to accommodate logs and RRD files.
While you can run Observium on less, having enough resources ensures stable, high-performance monitoring. For mission-critical deployments, allocate additional CPU cores, memory, and faster storage. This extra capacity supports a larger set of devices without becoming overwhelmed.
Software Prerequisites
Observium relies on a few key components:
- Ubuntu 24.04 LTS: A fresh installation or an updated system reduces conflicts.
- Web Server: Apache is commonly used, though Nginx is also a valid choice.
- Database: MySQL or MariaDB for storing Observium’s configuration and collected data.
- PHP: Observium uses PHP for its front end. Specific modules like
php-gd
,php-mysql
(orphp-mysqli
),php-xml
, and others are needed. - SNMP: Installing
snmp
andsnmpd
is crucial for device discovery and data collection.
Next, we’ll walk through how to prepare your system so it’s ready for Observium. This includes updating the package list, installing dependencies, and setting up essential packages.
Initial System Configuration
Keeping your Ubuntu 24.04 LTS system up to date is the best first step to ensure smooth installations and minimize vulnerabilities. A system lacking current software packages might experience dependency conflicts or performance issues when installing Observium.
System Updates
Open your terminal and run:
sudo apt update
sudo apt upgrade -y
This updates the package index and upgrades installed packages to their latest versions. The -y
flag automatically confirms prompts, saving time.
You may also remove unused or obsolete packages to streamline your environment:
sudo apt autoremove
A lean system ensures minimal conflicts when installing new software.
LAMP Stack Installation
Observium is typically deployed on Apache, MySQL (or MariaDB), and PHP. This stack provides the backbone for website hosting and dynamic content. Let’s install each component.
Step 1: Install Apache
sudo apt install apache2 -y
Once the installation completes, confirm Apache is running:
sudo systemctl status apache2
Step 2: Install MySQL or MariaDB
Observium supports both MySQL and MariaDB. For simplicity, we’ll use MariaDB, which is often pre-packaged in Ubuntu repositories.
sudo apt install mariadb-server mariadb-client -y
Secure your database server:
sudo mysql_secure_installation
This script prompts you for tasks like changing the root password, removing anonymous users, and disabling remote root login to improve security.
Step 3: Install PHP and Required Extensions
Observium requires PHP 7.4 or higher alongside extensions that handle XML, GD (for graphing), and MySQL. Install them as follows:
sudo apt install php php-cli php-gd php-mysql php-xml php-pear \
php-curl php-mbstring snmp fping rrdtool python3-mysqldb -y
Feel free to install any additional modules recommended by Observium’s official documentation, such as PHP zip or bcmath extensions if needed.
Observium Installation Process
With the environment in place, you’re ready to download and install Observium. The Observium team provides both Community and Enterprise editions. The Community edition is feature-rich and sufficient for most users, though the Enterprise edition offers extended support and advanced features.
Download and Extract Observium
Navigate to the Observium official website to obtain the latest Community edition archive. Alternatively, use wget
or curl
directly in your server command line for faster deployment. For example:
cd /opt
sudo wget http://www.observium.org/observium-community-latest.tar.gz
Next, extract the downloaded file:
sudo tar zxvf observium-community-latest.tar.gz
This unpacks the Observium directory structure into /opt/observium
. Verify that the files have been extracted correctly and that you have sufficient permissions.
Directory and Permissions Setup
Apache and Observium both require specific permissions to read from, write to, and execute certain files and directories. Proper permissions ensure Observium runs smoothly without triggering errors. Assign ownership to the Apache user (www-data
on Ubuntu) so Observium can generate graphs and perform updates:
sudo chown -R www-data:www-data /opt/observium
Confirm that your Observium files now belong to the correct user and group by running:
ls -l /opt/observium
Database Configuration
Observium requires a MySQL or MariaDB database to store data about discovered devices, performance metrics, and historical logs. Prepare a dedicated Observium database and user to avoid mixing data with other applications.
- Log in to the MySQL or MariaDB shell:
sudo mysql -u root -p
- Create a new database:
CREATE DATABASE observium_db;
- Create a dedicated user and grant privileges:
GRANT ALL PRIVILEGES ON observium_db.* TO 'observium_user'@'localhost' IDENTIFIED BY 'StrongPassword123'; FLUSH PRIVILEGES; EXIT;
Using distinct credentials ensures isolation and security between various applications. You can audit, revoke, or update Observium’s database privileges without affecting other services.
Import Initial Observium Schema
Open the Observium directory and import the initial database schema:
cd /opt/observium
sudo ./discovery.php -u
This step populates the new database with the tables Observium needs. If no errors appear, your schema is ready.
Configuration Steps
With Observium installed, it’s time to configure internal settings and connect your front end to the database. Proper configuration ensures you can monitor devices effectively, generate accurate graphs, and streamline your workflows.
Apache Virtual Host Configuration
By defining a dedicated virtual host for Observium, you keep your environment clean and prevent potential conflicts with other sites. Create a new file in the Apache configuration directory:
sudo nano /etc/apache2/sites-available/observium.conf
Paste the following sample configuration, adjusting domain names and paths to your needs:
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /opt/observium/html/
ServerName observium.example.com
<Directory /opt/observium/html/>
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/observium_error.log
CustomLog ${APACHE_LOG_DIR}/observium_access.log combined
</VirtualHost>
Enable the new site and rewrite module, then restart Apache:
sudo a2ensite observium.conf
sudo a2enmod rewrite
sudo systemctl restart apache2
If you plan to use HTTPS, install or renew your SSL certificates and revise the configuration accordingly.
Observium Configuration File
Observium’s main configuration file config.php
is located in /opt/observium
. It defines important elements such as database settings, paths, and optional features. Update the file with your database credentials:
$config['db_host'] = 'localhost';
$config['db_user'] = 'observium_user';
$config['db_pass'] = 'StrongPassword123';
$config['db_name'] = 'observium_db';
You can also set options for rrdtool, logging, or SNMP. Refer to Observium’s official documentation for a detailed list of configuration options that tailor your setup to specific requirements.
User Authentication and Role Assignment
By default, Observium uses its internal authentication, though you can integrate external authentication systems like LDAP. For now, create an administrative user:
sudo /opt/observium/adduser.php admin mypassword 10
Replace mypassword
with a secure password. The numeric parameter 10
represents an administrator account level. You can create different roles for your team by adjusting this parameter, assigning read-only access or full administrative capabilities.
Network Discovery and Polling Settings
Observium automatically polls devices to gather metrics on CPU usage, memory utilization, and interface status. It uses discovery.php
for discovering new devices and poller.php
for collecting performance data. Ensure these scripts run at consistent intervals via cron:
sudo nano /etc/cron.d/observium
Paste:
*/5 * * * * www-data /opt/observium/discovery.php -h all >/dev/null 2>&1
*/5 * * * * www-data /opt/observium/poller.php -h all >/dev/null 2>&1
Save and exit. These tasks discover new network elements and collect their performance metrics every five minutes.
Initial Setup and Discovery
Once Observium is installed and configured, it’s ready to discover and monitor your network. In this section, you’ll walk through the first steps to confirm that Observium works smoothly and gather preliminary data from your devices.
Logging In for the First Time
Open a web browser and navigate to http://observium.example.com
(or your chosen domain). You should see the Observium login screen. Enter your newly created administrative credentials. Upon logging in, you’ll land on the dashboard, where you can see an overview of your environment.
Basic Configuration Options
From the dashboard, you can access the Global Settings or Preferences page to refine Observium’s default behaviors. Adjust settings like:
- Alerting Intervals: Control how frequently Observium checks device states.
- Time Zone: Match your server or geographical time zone for accurate graphs.
- Theme: Select from available themes or color schemes for better readability.
It’s helpful to label your devices according to location or function, simplifying identification and summarizing complex networks at a glance.
Adding Devices
Device additions are the core of Observium’s functionality. They help produce relevant data and highlight events that need your attention. Observium supports several protocols, but SNMP remains the most common setup for monitoring most network equipment.
Manual Device Addition
If you want to add a single device instantly, go to the web interface and click the Devices tab, then Add Device. Fill in these fields:
- Hostname/IP: The IP address or host name of the device.
- SNMP Community String: The SNMP v2c community or v3 credentials.
- Additional Properties: Advanced parameters like port, version, or authentication method.
Save and wait for Observium to discover hardware details, interfaces, and associated metrics.
Auto-Discovery Configuration
Observium can automatically scan a range of IP subnets or rely on existing devices to discover related ones. Enable auto-discovery within config.php
if it’s not already active. Then specify subnets or advanced scanning rules if you want Observium to add hosts automatically whenever they respond to SNMP.
Configuring SNMP on Devices
For Observium’s device polling to work, SNMP must be enabled on the target device. Configure SNMP using:
- Linux Servers: Use the
snmpd
package and set correct communities or v3 credentials in/etc/snmp/snmpd.conf
. - Network Switches/Routers: Enable SNMP under the device’s management settings. Provide a secure community string or implement SNMPv3 for encryption.
Once SNMP is configured, Observium can collect metrics like bandwidth usage, CPU load, memory usage, and more.
Troubleshooting Common Issues
Although Observium is relatively straightforward, you may encounter occasional hiccups. Here are some of the most common issues and their quick solutions.
Permissions and Ownership Problems
If Observium cannot create graphs or write log files, check directory ownership and permissions. Run:
sudo chown -R www-data:www-data /opt/observium
Ensure logs are written to /opt/observium/logs
or wherever specified in config.php
.
Database Connection Errors
When Observium complains about connecting to MySQL or MariaDB, verify your credentials in config.php
. You can also test connectivity using:
mysql -u observium_user -p
Make sure the firewall or SELinux (if applicable) does not block MySQL traffic. If connections fail locally, double-check the bind-address parameter in MySQL’s configuration file.
SNMP Connectivity Problems
If devices do not appear in Observium, ensure SNMP is enabled and accessible. On Linux devices, confirm your /etc/snmp/snmpd.conf
file is properly configured. Test SNMP from the Observium server:
snmpwalk -v2c -c <community> <device-ip> system
Any errors encountered here guide you to the root cause—like incorrect community strings, blocked ports, or missing SNMP configuration on the device side.
Security Considerations
Network monitoring tools often manage sensitive data, so it’s vital to secure your Observium environment. Whether your setup is for a small lab or a large enterprise, always follow basic cybersecurity best practices.
Firewall Configuration
By default, Observium listens on port 80 (HTTP) or 443 (HTTPS if configured). Restrict incoming connections to your management network. For example, with Ubuntu’s Firewall, you might allow SSH and HTTP/HTTPS from specific IP ranges:
sudo ufw allow from 192.168.1.0/24 to any port 80
sudo ufw allow from 192.168.1.0/24 to any port 443
Restrict Apache Access
You can implement basic authentication or advanced configurations such as allowing only specific IP addresses to access /opt/observium/html
. Another method is enabling Fail2Ban to detect and block brute force attempts on Observium’s login page.
SSL/TLS Certificates
Ensure that your Observium web interface runs over HTTPS if you’re interacting through the public internet or untrusted networks. Free certificates from Let’s Encrypt help secure your environment without additional licensing costs.
Performance Optimization
As your monitored environment expands, Observium might require tuning to keep up. Optimizing Observium’s resource usage will improve responsiveness and lower the chances of missed polls or dropped data.
Caching and RRD Updates
Observium stores performance data in RRD (Round Robin Database) files. RRD updates can become disk-intensive. If your system uses SSDs, place RRD files on a fast disk. Some administrators also configure memory caching for frequently accessed RRD files to reduce I/O overhead.
Database Optimization
Periodically run optimization commands on your Observium database:
sudo mysqlcheck -o observium_db -u root -p
This reorganizes table indexes and can improve query performance. You may also tune MySQL’s my.cnf
to ensure adequate memory is allocated for caches and buffers if you have enough RAM available.
Apache Tuning
Adjusting Apache’s mpm_prefork.conf
or mpm_event.conf
can help handle multiple concurrent web requests. Settings such as MaxRequestWorkers or StartServers can scale your environment efficiently. Finding the ideal values typically involves monitoring CPU usage, concurrent connections, and load tests to fine-tune for your hardware.
Maintenance and Updates
Keeping Observium up to date is crucial for security, bug fixes, and feature improvements. Regular maintenance also ensures that you can accurately track your infrastructure health without disruptions.
Backup Procedures
Regular backups of your Observium directory and database prevent data loss. Common strategies include:
- MySQL Dumps:
mysqldump -u root -p observium_db > /backups/observium_db.sql
- Tar Archives:
tar czvf /backups/observium_files.tar.gz /opt/observium
- Remote Storage: Sync local backups to remote or cloud storage for geographical redundancy.
Updating Observium
To update Observium, navigate to its directory and run:
cd /opt/observium
sudo ./update.sh
After the files sync, update the database schema:
sudo ./discovery.php -u
This process ensures your Observium instance stays current with the latest features and security patches.
Regular Maintenance Tasks
In addition to backups and updates, consider scheduling regular log reviews, disk space checks, and system resource monitoring to preempt issues. Observium’s logs highlight concerns with polling or connectivity, while system logs can reveal hardware errors or user access attempts.
Congratulations! You have successfully installed Observium. Thanks for using this tutorial for installing Observium on Ubuntu 24.04 LTS system. For additional help or useful information, we recommend you check the official Observium website.