Use Observium to monitor your network and servers
Introduction
Have you ever encountered problems when monitoring your servers, switches, or devices? Observium can meet your needs. This is a free monitoring system that can help you remotely monitor your servers. It is a network monitoring platform based on automatic SNMP detection compiled by PHP. It supports a wide range of network hardware and operating systems, including Cisco, Windows, Linux, HP, and NetApp. Here I will introduce how to set up an Observium server step by step on Ubuntu 12.04.
There are currently two different versions of observium.
- The Observium Community version is a free tool under the QPL open-source license. This version is the best solution for small deployments. This version is updated every six months.
- The first version is the Observium Professional edition, which adopts the SVN-based release mechanism. The security is updated daily. This tool is suitable for service providers and enterprise-level deployment.
For more information, visit the official website.
System Requirements
To install Observium, you must have the latest installed server. Observium is developed on Ubuntu LTS and Debian systems. Therefore, we recommend that you install Observium on Ubuntu or Debian because it may cause minor issues on other platforms.
This article will guide you to install Observium on Ubuntu 12.04. For small-sized Observium installations, we recommend that you use 256 MB memory and dual-core processor configurations.
Installation requirements
Before installing Observuim, you must confirm to install all dependency packages.
First, use the following command to update your server:
sudo apt-get update
Then you need to install all the following software packages required to run the Observuim.
Observium must use the software listed below to run properly:
- LAMP Server
- Fping
- Net-SNMP 5.4 +
- RRDtool 1.3 +
- Graphviz
Requirements for optional features:
- Ipmitool-only when you want to obtain the IPMI (Intelligent Platform Management Interface) substrate controller on the server.
Libvirt-bin-only when you want to use libvirt for remote VM host monitoring.
Sudo apt-get install libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-mcrypt php5-json php-pear snmp fping mysql-server mysql-client python-mysqldb rrdtool subversion whois mtr-tiny ipmitool graphviz imagemagick libvirt ipmitool
Create a MySQL database and its users for Observium.
Now you need to log on to MySQL and create a database for Observium:
mysql -u root -p
After the user authentication is successful, you need to follow the command below to create the database.
CREATE DATABASE observium;
The database name is Observium. You will need this information later.
Now you need to create a database administrator user.
CREATE USER observiumadmin@localhost IDENTIFIED BY 'observiumpassword';
Next, you need to grant the Administrator the corresponding permissions to manage the created database.
GRANT ALL PRIVILEGES ON observium.* TO observiumadmin@localhost;
You need to write the permission information back to the disk to activate the new MySQL user:
FLUSH PRIVILEGES;
exit
Download and install Observium
Now that our system is ready, you can start the Observium installation.
Step 1: Create the file directory to be used by Observium:
mkdir -p /opt/observium && cd /opt
For the purpose of this tutorial, we will use the Community/open-source version of Observium. Run the following command to download and decompress the package:
wget http://www.observium.org/observium-community-latest.tar.gz
tar zxvf observium-community-latest.tar.gz
Now go to the Observium directory.
cd observium
Copy the default configuration file 'config. php. default' to 'config. php' and fill in the database configuration options in the configuration file:
cp config.php.default config.php
nano config.php
/Database config
$config['db_host']='localhost';
$config['db_user']='observiumadmin';
$config['db_pass']='observiumpassword';
$config['db_name']='observium';
Set the default database mode for the MySQL database:
php includes/update/update.php
Now you need to create a file directory to store the rrd file and modify its permissions so that apache can write data to the file.
mkdir rrd
chown apache:apache rrd
To troubleshoot the problem, you need to create a log file.
mkdir -p /var/log/observium
chown apache:apache /var/log/observium
Now you need to create virtual host configurations for Observium.
<VirtualHost *:80>
DocumentRoot /opt/observium/html/
ServerName observium.domain.com
CustomLog /var/log/observium/access_log combined
ErrorLog /var/log/observium/error_log
<Directory"/opt/observium/html/">
AllowOverride All
Options FollowSymLinks MultiViews
</Directory>
</VirtualHost>
Next, you need to make the rewrite function of your Apache server take effect.
To make 'mod _ rewrite' take effect, enter the following command:
sudo a2enmod rewrite
This module will take effect after the next Apache service restart.
sudo service apache2 restart
Configure Observium
Before logging on to the Web interface, you need to create an Administrator Account (Level 10) For Observium ).
# cd /opt/observium
# ./adduser.php admin adminpassword 10
User admin added successfully.
Next, set a cron task for the discovery and exploration tasks, create a new file '/etc/cron. d/observium', and add the following content to it.
33*/6 * * * root /opt/observium/discovery.php -h all >>/dev/null2>&1
*/5 * * * * root /opt/observium/discovery.php -h new>>/dev/null2>&1
*/5 * * * * root /opt/observium/poller-wrapper.py 1>>/dev/null2>&1
Reload the cron process to add new tasks.
# /etc/init.d/cron reload
Okay, you have completed the installation of the Observium server! Use your browser to log on to http: // <Server IP>.
Enjoy it!
This article permanently updates the link address: