Observium is a powerful network detection / management tool that is open source, free and ready to install on your Linux data center servers.
Linux has a solution for almost every task. In many cases you will find a number of solutions for one task. Take the task of network detection, for example. You will find a good number of available tools for this. Such a tool is Observium.
Observium is an open source network detection and monitoring platform that can detect a wide range of devices, platforms and operating systems.
I want to guide you through the installation process of Observium on Ubuntu Server 18.04. Once completed, you have a user-friendly, web-based tool to monitor your network.
SEE: Rental package: database administrator (TechRepublic Premium)
What you need
The only things you need to make this work are:
You should be able to complete this installation within 30 minutes.
How to install dependencies
The first thing to do is to install a number of dependencies. Log in to your Ubuntu server and install the first dependencies with the command:
sudo apt-get install snmp fping python-mysqldb rrdtool subversion whois mtr-tiny ipmitool graphviz imagemagick -y
Once that is complete, install Apache with the command:
sudo apt-get install apache2 libapache2-mod-php-y
Start and enable Apache with the commands:
sudo systemctl starts apache2
sudo systemctl enable apache2
We then install the required PHP components with the command:
sudo apt-get install php php-cli php-mysql php-mysqli php-gd php-json php-pear -y
Now we have to install mcrypt with the following commands;
sudo apt install php-dev libmcrypt-dev php-pear
sudo pecl channel update pecl.php.net
sudo pecl install mcrypt-1.0.1
Open the php.ini file with the command:
sudo nano /etc/php/7.2/cli/php.ini
Add the following line:
extension = mcrypt.so
Save and close the file.
How to install the database
Now we continue with the database installation. Give the order for this:
sudo apt-get install mariadb server -y
Start and switch on the database with the command:
sudo systemctl starts mariadb
Enable sudo systemctl mariadb
Secure the database installation with the command:
You will be asked to set a root password. Then answer the following questions with Y.
How to create the Observium database
Now that the database is installed and active, it is time to create the required database for Observium. To do this, log in to MariaDB with the command:
sudo mysql -u root -p
At the MariaDB prompt, execute the following commands (where PASSWORD is a strong, unique password):
MAKE DATABASE observiumdb STANDARD SIGN SET utf8 COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON observiumdb. * ON ‘observium’ @ ‘localhost’ IDENTIFIED BY ‘PASSWORD’;
How to install Observium
We can finally install Observium. First download the source with the command:
Extract that file with the command:
tar -xvzf observium-community-newest.tar.gz
Copy the new folder with the command:
sudo cp -ar observium / var / www / html /
Change the name of the default configuration file with the commands:
cd / var / www / html / observium
sudo cp config.php.default config.php
Open the configuration file to edit with the command:
sudo nano config.php
Be sure to edit the following lines to confirm in our database information (where PASSWORD is the password that you created in the MariaDB prompt):
// Database config — This MUST be configured
$ config (‘db_extension’) = ‘mysqli’;
$ config (‘db_host’) = ‘localhost’;
$ config (‘db_user’) = ‘observium’;
$ config (‘db_pass’) = ‘PASSWORD’;
$ config (‘db_name’) = ‘observiumdb’;
Save and close the file. Enter the database with the command:
sudo ./discovery.php -u
Create two new folders (for event storage) with the command:
sudo mkdir rrd logs
Give those folders the correct permissions with the command:
sudo chown -R www-data: www-data / var / www / html / observium
Create a virtual host for Apache
Next, we must create a virtual host configuration for Apache. Give the command:
sudo nano /etc/apache2/sites-available/observium.conf
Paste the following in that file (change if necessary):
ServerAdmin [email protected]
DocumentRoot / var / www / html / observium / html
Options Indexes FollowSymLinks MultiViews
Require all granted
CustomLog /var/log/apache2/access.log combined
Server signature on
Save and close the file.
Switch on the new site with the command:
sudo a2ensite observium
Disable the standard site with the command:
sudo a2dissite 000 standard
Switch on the rewrite module with the command:
rewrite sudo a2enmod
Restart Apache with the command:
sudo systemctl restart apache2
Finally, create an admin user with the command (where PASSWORD is a strong, unique password):
sudo /var/www/html/observium/adduser.php admin PASSWORD 10
You should now be able to point a web browser to http: // SERVER_IP (where SERVER_IP is the IP address of the hosting server) and view the Observium login window (Figure A).
The Observium login window.
Log in with the login data that you created with the admin user command and you are on the Observium dashboard. Congratulations, your network detection / monitoring program is ready for use.
Datacenter Trends Newsletter
DevOps, virtualization, the hybrid cloud, storage and operational efficiency are just a few of the topics of the data center that we will discuss.
Delivered on Monday and Wednesday