RHEL/CentOS Install
Introduction
This guide will show you how to perform an Observium installation on an CentOS/RHEL or derivative system.
Compatible Versions
This guide works with RHEL and CentOS releases 7, 8 and 9. We strongly recommend using release 9 or above.
Remote SSH
If you need to install SSH to install remotely, this can be installed via YUM:
Text Only | |
---|---|
1 |
|
Then you can start the SSH server and add it to system startup
Text Only | |
---|---|
1 2 |
|
Repositories and Packages
Repositories
Add CRB, EPEL and REMI repositories and switch to REMI's PHP8.3 packages.
Packages
Install the packages required for Observium
Text Only | |
---|---|
If you want to monitor libvirt virtual machines, install libvirt
dnf install libvirt
Repositories
Add EPEL, OpenNMS and REMI repositories, and switch to REMI's PHP 8.3 packages.
Text Only | |
---|---|
Packages
Install the packages required for Observium
Text Only | |
---|---|
Set Python3 to be the default Python version
alternatives --set python /usr/bin/python3
If you want to monitor libvirt virtual machines, install libvirt
yum install libvirt
Recommended Version
We strongly recommend using CentOS 9
Repositories
For more extended packagelist, we first install the REMI, OpenNMS and EPEL repositories:
Bash | |
---|---|
Packages
Install yum-utils and switch to REMI's PHP 8.3 packages
yum install yum-utils yum-config-manager --enable remi-php8.3
Update all installed packages
Text Only | |
---|---|
Now let's install the needed packages for Observium:
If you want to be able to monitor libvirt virtual machines, install libvirt:
Text Only | |
---|---|
1 |
|
Download Observium
First, create a directory for Observium to live in:
Text Only | |
---|---|
1 |
|
Observium Editions
Observium comes in two editions, an Open Source Community Edition released on a biannual 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:
Text Only | |
---|---|
1 2 |
|
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:
Text Only | |
---|---|
1 |
|
For the stable
train:
Text Only | |
---|---|
1 |
|
MySQL Database
Start MySQL/MariaDB and configure it to be run at startup.
Text Only | |
---|---|
1 2 |
|
Set the MySQL root password:
Text Only | |
---|---|
1 |
|
Create the MySQL database:
Text Only | |
---|---|
1 2 3 4 5 |
|
Observium Configuration
Change into the new install directory:
Text Only | |
---|---|
1 |
|
Copy the default configuration file and edit it for your system:
Text Only | |
---|---|
1 |
|
Edit config.php. Change the options to reflect your installation.
MySQL Credentials
You must change the MySQL username and password contained in db_user
and db_pass
to those set in the previous step. Most other settings can be left as default.
Insert MySQL Schema
Run the discovery.php script with the upgrade switch -u
in order to insert the initial MySQL schema
Bash | |
---|---|
It is OK to have some errors in the SQL revisions
Fping
Since Fping is in a different location, add a line to config.php to tell Observium.
Text Only | |
---|---|
1 2 |
|
Add the following
Text Only | |
---|---|
1 |
|
SELinux
Explaining SELinux and how to make Observium work within it is beyond the scope of this guide, so we will disable it. If you are competent enough to maintain SELinux, then that is possible too, but is an even more unsupported configuration than RHEL/CentOS themselves.
Firstly, disable SELinux. You can do this temporarily with the following command:
Text Only | |
---|---|
1 |
|
We need to disable SELinux permanently, so you also need to change /etc/selinux/config
so that the SELINUX
option is set to permissive
Text Only | |
---|---|
1 |
|
System
Create the rrd directory to store RRDs in:
Text Only | |
---|---|
1 2 |
|
If the server will be running only Observium, create /etc/httpd/conf.d/observium.conf with these contents :
Create logs directory for apache
Text Only | |
---|---|
1 2 |
|
Add a first user, use level of 10 for admin:
Text Only | |
---|---|
1 2 |
|
Add a first device to monitor:
Text Only | |
---|---|
1 |
|
Do an initial discovery and polling run to populate the data for the new device:
Text Only | |
---|---|
1 2 |
|
Cron
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.
And reload the cron process:
Text Only | |
---|---|
1 |
|
Final Points
Let's set the httpd to startup when we reboot the server:
Permit HTTP through the server's default firewall
You should now be able to see http://<server ip>
Updating
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.
Problems
When running eg. poller.php or discovery.php a lot of notices regarding undefined indexes, variables and offsets. To hide these notices you can do the following:
Text Only | |
---|---|
1 |
|
Find the line containing:
Text Only | |
---|---|
1 |
|
Change this to:
Text Only | |
---|---|
1 |
|
If there are problems with this installation tutorial, please make sure you've followed the install guide closely, check the FAQs, then join our IRC channel or Mailing Lists and ask for help.