In this tutorial we will cover the steps needed for installing Observium on an Ubuntu 14.04 VPS.
Observium is a PHP/MySQL-based network observation and monitoring system which supports a wide range of hardware platforms and operating systems including Cisco, Windows, Linux, HP, Juniper, Dell, FreeBSD, Brocade, Netscaler, NetApp and many more. It collects data from devices using SNMP which you can check via it’s web interface. Observium makes heavy use of the RRDtool package and has a number of simple core design goals such as minimum interaction, maximum automation and maximum accessibility of information.
Observium comes in two editions, an Open Source “Community Edition” and a “Subscription Edition”. The first one is released on a 6 month cycle, the second one is released with additional features, rapid bug fixes and feature improvements on a daily basis and an easy to use SVN-based update mechanism.
REQUIREMENTS
We will be using our SSD 1 Linux VPS Hosting plan for this tutorial.
UPDATE THE SYSTEM
Make sure your server is fully up to date using:
# apt-get update && apt-get upgrade
INSTALL MYSQL
Install MySQL so you can create the database needed. Enter the following command:
# apt-get install mysql-server mysql-client
Now run the post-installation script ‘mysql_secure_installation’ in order to set a root password:
# mysql_secure_installation - Set root password? [Y/n] y - Remove anonymous users? [Y/n] y - Disallow root login remotely? [Y/n] y - Remove test database and access to it? [Y/n] y - Reload privilege tables now? [Y/n] y
So, you set the MySQL root password to your liking. Next thing you need to do is to create a database. Login to your MySQL service as root:
# mysql -u root -p mysql> create database observium; mysql> grant all privileges on observium.* to obsuser@localhost identified by 'your_password'; mysql> flush privileges; mysql> exit Bye
With the above MySQL commands you created a database called observium with an all privileged user obsuser assigned to it. Later you will use these credentials in the Observium config.php file.
INSTALL OBSERVIUM
To proceed with the installation, you need to install some much needed packages. Run:
# apt-get install libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-mcrypt php5-json php-pear snmp fping python-mysqldb rrdtool subversion whois mtr-tiny ipmitool graphviz imagemagick
Create a directory called observium in /opt:
# mkdir -p /opt/observium && cd /opt
Download the latest Observium version:
# wget http://www.observium.org/observium-community-latest.tar.gz
Unpack the installation archive:
# tar zxvf observium-community-latest.tar.gz
Next, enter the observium directory and copy the config.php.default file to a config.php one. Enter the following:
# cd observium # cp config.php.default config.php
Using your favorite text editor, modify the database configuration parameters with the ones created previously. We are using VIM:
# vim config.php
After you edit the file and modify the database parameters, the section should look like this:
// Database config $config['db_host'] = 'localhost'; $config['db_user'] = 'obsuser'; $config['db_pass'] = 'your_password'; $config['db_name'] = 'observium';
Enter the following command to setup the MySQL database and insert the database default file schema.
# cd /opt/observium # php ./discovery.php -u
Create the directory to store RRDs in and set the proper ownership:
# mkdir rrd # chown www-data:www-data rrd
Edit Apache’s default virtual host directive. If you want to avoid searching through the file and locate the lines that need to be edited, we suggest you to copy the original file and create a new one in which you can paste the parametars needed.
Copy the original file:
# cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/000-default.conf.org
Empty it:
# > /etc/apache2/sites-available/000-default.conf
Now, open the emptied 000-default.conf file and paste the following:
# vim /etc/apache2/sites-available/000-default.conf
<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /opt/observium/html <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /opt/observium/html/> Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined ServerSignature On </VirtualHost>
Enable the php mcrypt module:
# php5enmod mcrypt
Enable mod_rewrite for Observium’s cleaner URLs:
# a2enmod rewrite
Restart Apache so the changes can take effect:
# apache2ctl restart
Next, enter the observium directory:
# cd /opt/observium
Add a first user with the use level of 10 for admin. The command sintax is below:
# ./adduser.php <username> <password> <level>
We are using the following:
# ./adduser.php rosehosting random_password 10
After creating the admin user, you can open your favorite web browser and navigate to http://your_server_IP. You will be welcomed by the Observium login page where you can use the credentials you configured with the adduser.php script.
Congratulations, you have successfully installed Observium on your Ubuntu 14.04 VPS. Check Observium official documentation for more information on configuring devices, alerts, authentication modules etc…
Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install Observium for you.They are available 24×7 and will take care of your request immediately.
PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.
Hi,
I’ve installed observium like u said here, and by the book. All things went good, no erros. But when i try to open observium’s page (by 127.0.01 or localhost) it opens apache’s page only.
Any tip please?
Edit Apache’s default virtual host directive according to the instructions in our tutorial.
Also, check your Apache error log file.
There is typo in guide, see below: “php5-mcrypthp5-json” should be “php5-mcrypt php5-json”
INSTALL OBSERVIUM
To proceed with the installation, you need to install some much needed packages. Run:
# apt-get install libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-mcrypthp5-json php-pear snmp fping python-mys
Thanks for the info. We updated the tutorial.
Hi,
I tested this but was not what I’m looking for.
Is there any “official” uninstall instructions available to
remove it without breaking the system?
You can just delete the Observium directory using
php includes/update/update.php >> WARNING. Direct call to this script is no longer supported, please use ‘./discovery.php -u’ from main observium directory.
php ./discovery.php -u
Thanks for your feedback. The post has been updated.
hello, thanks for this tuto. i want to use observium for his snmp ability. can we use an external mysql database with observium ? It’s where observium store all the snmp informations he will get. so the database will grow with time ? can we change the web port of observium and also secure it with ssl ? thanks for the reply
Hi Nicolas,
In order to use an external database for Observium, you have to edit the ‘config.php’ file and enter the IP address of the database server in the ‘$config[‘db_host’]’ line.
You can install SSL certificate without a problem and access Observium through your domain name without specifying a port number.
Hello,
I have installed observium and everything looks fine. Only that the graphs are not showing anything and when i click on the interfaces to check power levels they don’t show anything….is there something i didn’t do right or??
i appreciate your feedback.
Hellen
Did you check the log files for warnings and errors?
Yes i did, I have no errors
Hello. Please check if the solution at http://www.observium.org/docs/faq/#my-graphs-dont-work works for you.
Thanks.
Hi,
Thanks for the tut,
I tried to install observium on Ubuntu 14.04.5 LTS server (As per the above steps).
Finally, I tried to access the page using server public IP.
But after few seconds browser returns an error (xx.xxx.xx.xx took too long to respond – Can’t be reached).
There is no error on apache error log.
Please advice on this