Observium: Instalasi di Ubuntu

From OnnoWiki
Jump to navigation Jump to search

Kebutuhan System

Untuk menginstalasi Observium, diperlukan sebuah server yang masih baru di instalasi. Pengembangan Observium dilakukan di Ubuntu LTS dan Debian sistem, jadi disarankan untuk menginstal Observium pada Ubuntu atau Debian karena mungkin ada masalah dengan platform lain.

Artikel ini akan memandu anda tentang cara menginstal Observium pada Ubuntu 12.04. Untuk proses instalasi kecil Observium dianjurkan untuk menggunakan memori 256MB dan dual core.


Instalasi Dependency

Lakukan:

sudo apt-get update
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

Buat Database

Buat database:

mysql -u root -p
CREATE DATABASE observium;
CREATE USER observiumadmin@localhost IDENTIFIED BY 'observiumpassword';
GRANT ALL PRIVILEGES ON observium.* TO observiumadmin@localhost;
FLUSH PRIVILEGES;
exit

Download dan Instal Observium

Now that our system is ready, we can start the installation of Observium.

First step to do is, creating the directory Observium is going to operate out of:

mkdir -p /opt/observium && cd /opt
wget http://www.observium.org/observium-community-latest.tar.gz
tar zxvf observium-community-latest.tar.gz

Konfigurasi php

cd /opt/observium
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';

Let’s setup the default schema for the MySQL Database:

php includes/update/update.php

Now you need to create directory to store rrd file and change permission to let apache write into the file .

mkdir rrd
chown apache:apache rrd

To help you troubleshooting on case of problem, you need to create logs file.

mkdir -p /var/log/observium
chown apache:apache /var/log/observium

Edit konfigurasi apache, tambahkan virtual host 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>

Enable mod_rewrite,

sudo a2enmod rewrite

Restart apache,

sudo service apache2 restart

Configuring Observium

Before log into the web interface, you need to create administrator account (level 10) to Observium

# cd /opt/observium
# ./adduser.php admin adminpassword 10 
User admin added successfully.

Next set a cron jobs for the discovery and the poller jobs, create a new file ‘/etc/cron.d/observium‘ and add the following contents.

33  */6   * * *   root    /opt/observium/discovery.php -h all >> /dev/null 2>&1
*/5 *      * * *   root    /opt/observium/discovery.php -h new >> /dev/null 2>&1
*/5 *      * * *   root    /opt/observium/poller-wrapper.py 1 >> /dev/null 2>&1

Reload cron process to take new entries.

# /etc/init.d/cron reload

You’ve installed Observium Server! Log into Observium using your browser http://<Server IP> and be on your way.


Referensi