Observium is an open-source software that enables network monitoring and performance analysis. It is specifically designed to be easy to use and provides comprehensive network insights. In this tutorial, we will guide you on how to install Observium on Kali Linux Latest.
Before we can start the installation, we need to ensure that the following prerequisites have been met:
Initially, we need to update the package list, upgrade the software, and install the essential packages needed for the installation of Observium. Open the terminal in Kali and enter the following command.
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install -y apache2 php7.3 php7.3-cli php7.3-mbstring php7.3-mysql php7.3-gd php7.3-json php7.3-snmp php7.3-xml php7.3-mysql libapache2-mod-php7.3 libvirt0 python3-pip python3-pymysql python3-dotenv git graphviz imagemagick fping
This command will update the package list, upgrade the software packages that have updates, and install the necessary packages for installing Observium.
Next, we need to download the Observium code and place it into the /opt directory. For that purpose, we need to clone the code of Observium from the repository.
To clone the Observium repository, use the following command:
sudo git clone https://github.com/observium/observium.git /opt/observium
Observium requires certain Python libraries to perform different functions. Install the essential Python libraries with the following command.
sudo pip3 install -U setuptools && sudo pip3 install -U pip && sudo pip3 install -U rrdtool pysnmp cryptography mysql-connector-python pyroute2 mako jinja2
Configure Apache for Observium by creating a virtual host file. We will create a new file with the name of "observium.conf" in the directory /etc/apache2/sites-available with the following command.
sudo cp /opt/observium/scripts/apache2.4/observium.conf /etc/apache2/sites-available/observium.conf
Next, update this newly created configuration file with the following command.
sudo nano /etc/apache2/sites-available/observium.conf
Add the following lines in the file.
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /opt/observium/html/
<Directory /opt/observium/html/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/observium_error.log
CustomLog ${APACHE_LOG_DIR}/observium_access.log combined
</VirtualHost>
Save and close the file by hitting "Ctrl + X," then "Y," and finally Enter.
Then, enable the site by running the following command.
sudo a2ensite observium
This command will enable the site and create a symlink for it in the /etc/apache2/sites-enabled directory.
Finally, reload Apache for the changes to take effect.
sudo systemctl reload apache2
Observium requires a database where it can store its data. For this reason, we will create a new MySQL database and user for Observium.
To create a new MySQL user and database, first, sign in to MySQL by typing the following command.
sudo mysql -u root -p
Create a new database named "observium_db" with the following command.
CREATE DATABASE observium_db;
Create a new database user named "observium_user" with the following command.
CREATE USER 'observium_user'@'localhost' IDENTIFIED BY 'your-strong-password';
Now, we will grant all privileges for the newly created user on the created database.
GRANT ALL PRIVILEGES ON observium_db.* TO 'observium_user'@'localhost' WITH GRANT OPTION;
Update the privileges by running the following command.
FLUSH PRIVILEGES;
Exit from MySQL by typing "exit" and hitting Enter.
Copy the sample configuration file for Observium and then configure it for our setup.
To copy and configure the configuration file, type the following command.
sudo cp /opt/observium/config.php.default /opt/observium/config.php && sudo nano /opt/observium/config.php
Change the database details with your observation_db details.
$config['db_extension'] = 'mysqli';
$config['db_host'] = 'localhost';
$config['db_user'] = 'observium_user';
$config['db_pass'] = 'your-strong-password';
$config['db_name'] = 'observium_db';
$config['db_port'] = '3306';
$config['db_socket'] = '';
$config['db_debug'] = FALSE;
Add cron job for automatic polling.
sudo nano /etc/crontab
Add the following line in the file.
*/5 * * * * root /opt/observium/discovery.php -u
*/5 * * * * root /opt/observium/discovery.php -h new
*/5 * * * * root /opt/observium/poller-wrapper.py 16
59 23 * * * root /opt/observium/housekeeping.php -ysel
Save and close the file by hitting "Ctrl + X," then "Y," and finally Enter.
We have completed the installation and configuration of Observium on Kali Linux Latest. Now, to start Observium, type the following commands.
To start the PHP-FPM service, type:
sudo systemctl start php7.3-fpm.service
To start the polling and discovery daemons, type:
cd /opt/observium/
sudo ./scripts/daemon_wrapper.py start
Access the Observium at http://127.0.0.1/ with your web browser.
Sign in with the default username of "admin" and the password of "admin."
Congratulations! You have successfully installed and configured Observium on Kali Linux Latest. Now, you can monitor and analyze network performance with ease.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!