Observium is a powerful network discovery/management tool that is open source, free, and ready to install on your Linux datacenter servers.
Linux has a solution for just about any job. In many instances, you'll find a number of solutions for a single task. For instance, take the job of network discovery. You'll find quite a number of available tools for this. One such tool is Observium.
Observium is an open source platform for network discovery and monitoring that can detect a wide-range of devices, platforms, and operating systems.
I want to walk you through the process of installing Observium on Ubuntu Server 18.04. Once complete, you'll have a user-friendly, web-based tool for monitoring your network.
SEE: Hiring kit: Database administrator (TechRepublic Premium)
What you'll need
The only things you'll need to make this work are:
A running instance of Ubuntu Server 18.04
A user with sudo privileges
You should be able to get this installation completed 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 finishes, Install Apache with the command:
sudo apt-get install apache2 libapache2-mod-php-y
Start and enable Apache with the commands:
sudo systemctl start apache2 sudo systemctl enable apache2
Next we'll install the necessary 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 need 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:
Save and close the file.
How to install the database
Now we move on to the database installation. For this, issue the command:
sudo apt-get install mariadb-server -y
Start and enable the database with the command:
sudo systemctl start mariadb sudo systemctl enable mariadb
Secure the database installation with the command:
You will be asked to set a root password. After that, answer Y to the remaining questions.
How to create the database for Observium
With the database installed and running, it's time to create the necessary database for Observium. To do this, log in to MariaDB with the command:
sudo mysql -u root -p
Once at the MariaDB prompt, issue the following commands (where PASSWORD is a strong, unique password):
CREATE DATABASE observiumdb DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; GRANT ALL PRIVILEGES ON observiumdb.* TO 'observium'@'localhost' IDENTIFIED BY 'PASSWORD'; FLUSH PRIVILEGES; exit
How to install Observium
Finally, we can install Observium. First download the source with the command:
Unpack that file with the command:
tar -xvzf observium-community-latest.tar.gz
Copy the newly created directory with the command:
sudo cp -ar observium /var/www/html/
Rename the default configuration file with the commands:
cd /var/www/html/observium sudo cp config.php.default config.php
Open the configuration file for editing with the command:
sudo nano config.php
Make sure to edit the following lines to confirm to our database information (where PASSWORD is the password 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. Populate the database with the command:
sudo ./discovery.php -u
Create two new directories (for event storage) with the command:
sudo mkdir rrd logs
Give those directories the proper permissions with the command:
sudo chown -R www-data:www-data /var/www/html/observium
How to create a virtual host for Apache
Next we must create a virtual host configuration for Apache. Issue the command:
sudo nano /etc/apache2/sites-available/observium.conf
In that file, paste the following (modifying where needed):
<VirtualHost *:80> ServerAdmin firstname.lastname@example.org ServerName example.com DocumentRoot /var/www/html/observium/html <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/html/observium/html/> Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted </Directory> ErrorLog /var/log/apache2/error.log LogLevel warn CustomLog /var/log/apache2/access.log combined ServerSignature On </VirtualHost>
Save and close the file.
Enable the new site with the command:
sudo a2ensite observium
Disable the default site with the command:
sudo a2dissite 000-default
Enable the rewrite module with the command:
sudo a2enmod rewrite
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 see the Observium login window (Figure A).
Log in with the credentials you created with the admin user command and you'll find yourself on the Observium dashboard. Congratulations, your network discovery/monitoring tool is ready to be used.
- How to become a database administrator: A cheat sheet (TechRepublic)
- 10 things companies are keeping in their own data centers (TechRepublic download)
- How to enable Wake On LAN in Ubuntu Server 18.04 (TechRepublic)
- How to install OpenNMS network manager on Ubuntu 18.04 (TechRepublic)
- How to perform security audits on Ubuntu server with OpenSCAP (TechRepublic)
- How to install ntopng on a Debian minimal server (TechRepublic)
- Public cloud providers' network performance wildly varies (ZDNet)
- Best cloud services for small businesses (CNET)
- DevOps: More must-read coverage (TechRepublic on Flipboard)