Rabu, 21 November 2012

Install Nagios di Ubuntu


Install Nagios di Ubuntu

20JUL
Nagios adalah tool network monitoring system open source yang terbaik. Nagios bersifat modular, mudah digunakan, dan memiliki skalablitas tinggi. Modul atau plugin pada nagios sangat simple. Anda pun dapat membuatnya guna melengkapi system checking pada nagios sesuai dengan kebutuhan Anda. Untuk mendownload source nagios klik url ini http://www.nagios.org/download/. Nagios awalnya didesain untuk berjalan pada sistem operasi Linux, namun dapat juga berjalan dengan baik hampir di semua sistem operasi unix.
Fitur-­fitur yang tersedia pada Nagios diantaranya adalah:
• Monitoring network services (SMTP, POP3, HTTP, NNTP, PING, dsb.)
• Monitoring resources dari host (processor load, disk usage, dsb.)
• Desain plugin sederhana sehingga user dapat membangun service checks sendiri dengan mudah.
• Pengecekan service secara paralel
• Mampu mendefinisikan konfigurasi jaringan menggunakan “parent” hosts, sehingga memungkinkan pendeteksian antar host jika terjadi down atau ketika unreachable
• Dapat memberikan notifikasi kepada Admin ketika terjadi masalah (via email, pager, atau metode yang lain)
• Dapat mendefinisikan event handlers saat service berjalan atau host events sehingga dapat digunakan sebagai proactive problem resolution
• Automatic log file rotation
• Mendukung implementasi redundant monitoring hosts
• Web interface pilihan untuk melihat current network statusnotification dan problem history, log file, dsb.
Instalasi Nagios
Persiapan yang dibutuhkan untuk instalasi Nagios adalah Host Mesin dengan sistem operasi Ubuntu (pada kasus ini menggunakan versi Ubuntu Server 10.04 64Bit ) dapat juga menggunakan linux versi lain.
Sedangkan langkah-langkah instalasinya cukup mudah, berikut adalah urutannya:
1. Installasi Web server
Nagios membutuhkan web server untuk monitoring via web (Web Base), sehingga apabila host sudah terpasang web server, maka langkah ini bisa di lewati.
Disini kita menggunakan web server Apache
Command :
apt-get install apache2
2. Installasi PHP
Setelah web server terinsatall , selanjutnya software yang kita butuhkan adalah PHP
Command :
apt-get install php5-common php5 libapache2-mod-php5
3. Installasi Nagios
Command:
apt-get nagios3
4. Konfigurasi Nagios
Setelah tahapan instalasi nagios3 selesai, sebenarnya dapat langsung dicoba, tetepai untuk menyesuaikan terhadap penelitian kali ini, maka diperlukan beberapa konfigurasi,
Ganti konfigurasi “/etc/nagios3/nagios.cfg”
check_external_commands = 0
admin_email = root@localhost
Ganti check_external_commands=1 untuk mengaktifkan eksternal command dan ganti “root@localhost” dengan alamat email kita misalnya admin@stikom.edu
5. Menambah host
Kita dapat dengan mudah menambahkan host dengan menambahkan file config pada direktori “/etc/nagios3/config.”
# A simple configuration file for monitoring the local host
# This can serve as an example for configuring other servers;
# Custom services specific to this host are added here, but services
# defined in nagios2-common_services.cfg may also apply.
#
define host{
use generic-host ; Name of host template to use
host_name localhost #ganti dengan nama host(bebas)
alias localhost #ganti dengan nama host(bebas)
address 127.0.0.1 #ganti dengan IP Address host baru
}
# Define a service to check the disk space of the root partition
# on the local machine. Warning if < 20% free, critical if
# < 10% free space on partition.
define service{
use generic-service ; Name of service template to use
host_name localhost #ganti sesuai nama host
service_description Disk Space
check_command check_all_disks!20%!10%
}
# Define a service to check the number of currently logged in
# users on the local machine. Warning if > 20 users, critical
# if > 50 users.
define service{
use generic-service ; Name of service template to use
host_name localhost #ganti sesuai nama host
service_description Current Users
check_command check_users!20!50
}
# Define a service to check the number of currently running procs
# users on the local machine. Warning if > 20 users, critical
# if > 50 users.
define service{
use generic-service ; Name of service template to use
host_name localhost #ganti sesuai nama host
service_description Current Users
check_command check_users!20!50
}
# Define a service to check the number of currently running procs
# on the local machine. Warning if > 250 processes, critical if
# > 400 processes.
define service{
use generic-service ; Name of service template to use
host_name localhost #ganti sesuai nama host
service_description Total Processes
check_command check_procs!250!400
}
# Define a service to check the load on the local machine.
define service{
use generic-service ; Name of service template to use
host_name localhost #ganti sesuai nama host
service_description Current Load
check_command check_load!5.0!4.0!3.0!10.0!6.0!4.0
}
Beri nama file config dengan ekstensi “.cfg” dan boleh diberi nama bebas. Jangan lupa untuk merestart nagios setelah selesai menambahkan host baru, sehingga nagios akan membaca ulang host membernya.
Command :
/etc/init.d/nagios3 restart
Mengakses Nagios
Untuk mengakses nagios, kita memerlukan web browser dengan memasukkan url http://ipataudomain/nagios3 misalnya http://10.10.10.139/nagios3 akan muncul dialog login :
Default user adalah : nagiosadmin, sedangkan passwordnya sesuai password yang diset sewaktu proses instalasi.

Tidak ada komentar:

Posting Komentar