Difference between revisions of "Observium: Instalasi di Ubuntu"

From OnnoWiki
Jump to navigation Jump to search
 
Line 6: Line 6:
  
  
==Prasyarat Instalasi==
+
==Instalasi Dependency==
  
 
+
Lakukan:
Before installing Observium you need to make sure to install all dependencies.
 
 
 
First step is to update your server
 
  
 
  sudo apt-get update
 
  sudo apt-get update
 
Then you need to install all packages required to run Observium.
 
 
Observuim need this list of software the run correctly:
 
 
* LAMP server
 
* fping
 
* Net-SNMP 5.4+
 
* RRDtool 1.3+
 
* Graphviz
 
 
Requirements for optional features:
 
 
    Ipmitool – Only if you want to poll IPMI baseboard controllers on servers
 
    Libvirt-bin – Only if you want to monitor remote VM hosts using libvirt
 
  
 
  sudo apt-get install libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-mcrypt \
 
  sudo apt-get install libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-mcrypt \
Line 34: Line 16:
 
  subversion whois mtr-tiny ipmitool graphviz imagemagick libvirt ipmitool
 
  subversion whois mtr-tiny ipmitool graphviz imagemagick libvirt ipmitool
  
Creation MySQL Database and  User  for Observium
+
==Buat Database==
  
Now you need to log into MySQL and create database for Observuim:
+
Buat database:
  
 
  mysql -u root -p
 
  mysql -u root -p
 
After successful authenticated, you need to create the database.
 
  
 
  CREATE DATABASE observium;
 
  CREATE DATABASE observium;
 
The database Name is Observium. You will need this information later.
 
 
Now, you should create the database administrator.
 
 
 
  CREATE USER observiumadmin@localhost IDENTIFIED BY 'observiumpassword';
 
  CREATE USER observiumadmin@localhost IDENTIFIED BY 'observiumpassword';
 
Next, you need to give this user  permissions to administer the database you created.
 
 
 
  GRANT ALL PRIVILEGES ON observium.* TO observiumadmin@localhost;
 
  GRANT ALL PRIVILEGES ON observium.* TO observiumadmin@localhost;
 
You need to flush the privilege information to disk to activate the new MySQL user:
 
 
 
  FLUSH PRIVILEGES;
 
  FLUSH PRIVILEGES;
 
  exit
 
  exit
  
Downloading and Installing Observium
+
==Download dan Instal Observium==
  
 
Now that our system is ready, we can start the installation of Observium.
 
Now that our system is ready, we can start the installation of Observium.
Line 66: Line 35:
  
 
  mkdir -p /opt/observium && cd /opt
 
  mkdir -p /opt/observium && cd /opt
 
For the purpose of this tutorial, we’re going to be using the Community/Open Source Edition of Observium. Download and unpack it.
 
 
 
  wget http://www.observium.org/observium-community-latest.tar.gz
 
  wget http://www.observium.org/observium-community-latest.tar.gz
 
  tar zxvf observium-community-latest.tar.gz
 
  tar zxvf observium-community-latest.tar.gz
  
Now go under Observium directory
+
Konfigurasi php
 
 
cd observium
 
  
Copy the default configuration file ‘config.php.default‘ to ‘config.php‘ and fill out the database config options:
+
  cd /opt/observium
  
 
  cp config.php.default config.php
 
  cp config.php.default config.php
Line 89: Line 53:
 
Let’s setup the default schema for the MySQL Database:
 
Let’s setup the default schema for the MySQL Database:
  
php includes/update/update.php
+
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 .
 
Now you need to create directory to store rrd file and change permission to let apache write into the file .
Line 101: Line 65:
 
  chown apache:apache /var/log/observium
 
  chown apache:apache /var/log/observium
  
Now you have to create the virtual host configuration for Observium
+
Edit konfigurasi apache, tambahkan virtual host observium,
  
 
  <VirtualHost *:80>
 
  <VirtualHost *:80>
Line 114: Line 78:
 
  </VirtualHost>
 
  </VirtualHost>
  
Next, you need to enable rewrite functionality for your Apache server.
+
Enable mod_rewrite,
 
 
To enable mod_rewrite modules, type this command:
 
  
 
  sudo a2enmod rewrite
 
  sudo a2enmod rewrite
  
This module will be enable the next after reboot of Apache service.
+
Restart apache,
  
 
  sudo service apache2 restart
 
  sudo service apache2 restart
  
Configuring Observium
+
==Configuring Observium==
  
 
Before log into the web interface, you need to create administrator account (level 10) to Observium
 
Before log into the web interface, you need to create administrator account (level 10) to Observium

Latest revision as of 17:02, 27 July 2015

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