Konfigurasi
nagios3
Pengertian
nagios
Nagios adalah open source aplikasi
yang memantau untuk maslah jaringan komputer sehingga mereka dapat memperbaiki
lebih cepat. Nagios dirancang untuk digunakan dengan Linux sistem operasi,
tetapi juga akan bekerja dibawah unix dan sebagian sistem berbasis unix.
Nagios berjala pada pemeriksaan yan
ditentukan pengguna sumber daya dan jasa . sember daya yang dapat dipantau
termasuk memori penggunaan,penggunaan disk, mikroprosesor beban, dan file log. Layanan
yang dapat dipantau meliputi Mail Transfer Protocol Sederhana ( SMTP ),
Post Office Protocol 3 ( POP3 ), Hypertext Transfer Protocol ( HTTP ), dan lain
protokol jaringan yang umum. Program ini dapat memonitor variabel lingkungan
seperti suhu, kelembaban, atau tekanan udara dalam hubungannya dengan perangkat
keras ukur yang tepat. Sebuah user-friendly berbasis web antarmuka pengguna
grafis disediakan. Sebuah sistem otorisasi memungkinkan administrator untuk membatasi
akses yang diperlukan.
Nagios telah
terbukti populer dikalangan usaha kecil. Pengguna lainnya termasuk penyedia
layanan internet, lembaga pendidikan, intansi pemerintah, lembaga perawatan
kesehatan,perusahaan manufaktur,dan lembaga keuangan. Sebelum disebut NetSaint,
nagios dikembangkan oleh ethan gelstad dan disempurnakan oleh banyak
kontributor.
sumber
:http://searchenterpriselinux.techtarget.com/definition/Nagios
Kelebihan Nagios :
- Memonitoring servis jaringan (SMTP , POP3,
HTTP, NNTP,PING,dsb)
- Servis cek yang parallel
- Memonitoring sumber sumber host (load
prosesor, penggunaan disk, dsb)
- Desain plugin yang sederhana,yang mengijinkan
pengguna untuk lebih mudah menggunakan pemeriksaan terhadap servisnya
- Kemampuan mendefinisikan kejadian yang
ditangani selama servis atau host berlangsung untuk mempermudah pemecahan
masalah
- Perputaran file log yag otomatis
Langkah langkah konfigurasi Nagios3
1. Masuk ke Root dulu (#). Sudo su
2. Lakukan install nagios3
Dengan perintah : # apt-get install
nagios3
3. Lakukan install apache2 Dengan perintah : # apt-get install
apache2
4. Konfigurasi selanjutnya : Dengan perintah : nano
/etc/nagios3/conf.d/localhost_nagios2.cfg
- Tambahkan pada define host tetangga dibawah define host local
host, atau bisa juga dengan cara mencopy file localhost_nagios2.cfg
dengan nama lain asalkan define host pada local host tetap ada. Hal tersebut
agar fungsi dari local host tidak hilang.
- Edit host name, alias dan address-nya sesuai dengan nama dan IP
tetangga.
- Tambahkan define service untuk host tetangga untuk
masing-masing service description(disk space, current users, total
processes dan current load).
# 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 jartel1
alias misra
address 172.16.30.44
}
define host{
use generic-host
; Name of host templat$
host_name jartel12
alias lili
address 172.16.30.3
}
define host{
use generic-host
; Name of host templat$
host_name jartel13
alias marta
address 172.16.30.17
}
# 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 jartel1
service_description Disk Space
check_command check_all_disks!20%!10%
}
define service{
use generic-service ; Name of
service template to use
host_name jartel2
service_description Disk Space
check_command check_all_disks!20%!10%
}
define service{
use generic-service ; Name of
service template to use
host_name jartel3
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 jartel1
service_description Current Users
check_command check_users!20!50
}
define service{
use generic-service ; Name of
service template to use
host_name jartel2
service_description Current Users
check_command check_users!20!50
}
define service{
use generic-service ; Name of
service template to use
host_name jartel3
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 jartel1
service_description Total Processes
check_command check_procs!250!400
}
define service{
use generic-service ; Name of
service template to use
host_name jartel2
service_description Total Processes
check_command check_procs!250!400
}
define service{
use generic-service ; Name of
service template to use
host_name jartel3
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 jartel1
service_description Current Load
check_command check_load!5.0!4.0!3.0!10.0!6.0!4.0
}
define service{
use generic-service ; Name of
service templete to use
host_name jartel2
service_description Current Load
check_command check_load!5.0!4.0!3.0!10.0!6.$
}
define service{
use generic-service ; Name of
service template to use
host_name jartel3
service_description Current Load
check_command check_load!5.0!4.0!3.0!10.0!6.$
}
5. Selanjutnya lakukan konfigurasi hostgroup
dengan perintah : #nano/etc/nagios3/conf.d/hostgroup_nagios2.cfg
- Tambahkan
define hostgroup untuk ping di bagian paling bawah, kalau cuma sampai
ssh-accessible servers, maka ketik baru/tambahkan untuk ping server
- Ubah members sesuai
dengan host tetangga yang ingin di monitoringkan
# Some generic hostgroup definitions
# A simple wildcard hostgroup
define hostgroup {
hostgroup_name all
alias All Servers
members jartel1,jartel2,jartel3
}
# A list of your Debian GNU/Linux servers
define hostgroup {
hostgroup_name debian-servers
alias Debian GNU/Linux Servers
members jartel1,jartel2,jartel3
}
# A list of your web servers
define hostgroup {
hostgroup_name http-servers
alias HTTP servers
members jartel1,jartel2,jartel3
}
# A list of your ssh-accessible servers
define hostgroup {
hostgroup_name ssh-servers
alias SSH servers
members jartel1,jartel2,jartel3
}
# A list of your ping accessbile servers
define hostgroup {
hostgroup_name ping-servers
alias PING servers
members jartel1,jartel2,jartel3
}
6. Selanjutnya lakukan konfigurasi untuk services
dengan perintah : #nano/etc/nagios3/conf.d/services_nagios2.cfg
# check that web services are running
define service {
hostgroup_name http-servers
service_description HTTP
check_command check_http
use generic-service
notification_interval 0 ; set > 0 if you want to be
renotified
}
# check that ssh services are running
define service {
hostgroup_name ssh-servers
service_description SSH
check_command check_ssh
use generic-service
notification_interval 0 ; set > 0 if you want to be
renotified
}
# check that ssh services are running
define service {
hostgroup_name ping-servers
service_description PING
check_command check_ping
use generic-service
notification_interval 0 ; set > 0 if you want to be r$
}
7. Selanjutnya lakukan konfigurasi untuk services
dengan perintah : #nano/etc/nagios3/conf.d/services_nagios2.cfg
8. Selanjutnya lakukan restart nagios
dengan perintah : # etc/init.d/nagios3 restart
9. Lalu pada web browser ketikkan http:/localhost/nagios3
Maka akan keluar tampilan seperti berikut :
User Name : nagiosadmin
Pass : Sesuai dengan pada saat instalasi
Setelah selesai login,maka akan keluar tampilan seperti berikut
sumber
:http://searchenterpriselinux.techtarget.com/definition/Nagios
Kelebihan Nagios :
- Memonitoring servis jaringan (SMTP , POP3, HTTP, NNTP,PING,dsb)
- Servis cek yang parallel
- Memonitoring sumber sumber host (load prosesor, penggunaan disk, dsb)
- Desain plugin yang sederhana,yang mengijinkan pengguna untuk lebih mudah menggunakan pemeriksaan terhadap servisnya
- Kemampuan mendefinisikan kejadian yang ditangani selama servis atau host berlangsung untuk mempermudah pemecahan masalah
- Perputaran file log yag otomatis
Langkah langkah konfigurasi Nagios3
1. Masuk ke Root dulu (#). Sudo su2. Lakukan install nagios3
Dengan perintah : # apt-get install nagios3
3. Lakukan install apache2 Dengan perintah : # apt-get install apache2
4. Konfigurasi selanjutnya : Dengan perintah : nano /etc/nagios3/conf.d/localhost_nagios2.cfg
- Tambahkan pada define host tetangga dibawah define host local host, atau bisa juga dengan cara mencopy file localhost_nagios2.cfg dengan nama lain asalkan define host pada local host tetap ada. Hal tersebut agar fungsi dari local host tidak hilang.
- Edit host name, alias dan address-nya sesuai dengan nama dan IP tetangga.
- Tambahkan define service untuk host tetangga untuk masing-masing service description(disk space, current users, total processes dan current load).
# 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 jartel1
alias misra
address 172.16.30.44
}
define host{
use generic-host
; Name of host templat$
host_name jartel12
alias lili
address 172.16.30.3
}
define host{
use generic-host
; Name of host templat$
host_name jartel13
alias marta
address 172.16.30.17
}
# 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 jartel1
service_description Disk Space
check_command check_all_disks!20%!10%
}
define service{
use generic-service ; Name of
service template to use
host_name jartel2
service_description Disk Space
check_command check_all_disks!20%!10%
}
define service{
use generic-service ; Name of
service template to use
host_name jartel3
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 jartel1
service_description Current Users
check_command check_users!20!50
}
define service{
use generic-service ; Name of
service template to use
host_name jartel2
service_description Current Users
check_command check_users!20!50
}
define service{
use generic-service ; Name of
service template to use
host_name jartel3
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 jartel1
service_description Total Processes
check_command check_procs!250!400
}
define service{
use generic-service ; Name of
service template to use
host_name jartel2
service_description Total Processes
check_command check_procs!250!400
}
define service{
use generic-service ; Name of
service template to use
host_name jartel3
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 jartel1
service_description Current Load
check_command check_load!5.0!4.0!3.0!10.0!6.0!4.0
}
define service{
use generic-service ; Name of
service templete to use
host_name jartel2
service_description Current Load
check_command check_load!5.0!4.0!3.0!10.0!6.$
}
define service{
use generic-service ; Name of
service template to use
host_name jartel3
service_description Current Load
check_command check_load!5.0!4.0!3.0!10.0!6.$
}
- Tambahkan define hostgroup untuk ping di bagian paling bawah, kalau cuma sampai ssh-accessible servers, maka ketik baru/tambahkan untuk ping server
- Ubah members sesuai dengan host tetangga yang ingin di monitoringkan
# Some generic hostgroup definitions
# A simple wildcard hostgroup
define hostgroup {
hostgroup_name all
alias All Servers
members jartel1,jartel2,jartel3
}
# A list of your Debian GNU/Linux servers
define hostgroup {
hostgroup_name debian-servers
alias Debian GNU/Linux Servers
members jartel1,jartel2,jartel3
}
# A list of your web servers
define hostgroup {
hostgroup_name http-servers
alias HTTP servers
members jartel1,jartel2,jartel3
}
# A list of your ssh-accessible servers
define hostgroup {
hostgroup_name ssh-servers
alias SSH servers
members jartel1,jartel2,jartel3
}
# A list of your ping accessbile servers
define hostgroup {
hostgroup_name ping-servers
alias PING servers
members jartel1,jartel2,jartel3
}
# check that web services are running
define service {
hostgroup_name http-servers
service_description HTTP
check_command check_http
use generic-service
notification_interval 0 ; set > 0 if you want to be
renotified
}
# check that ssh services are running
define service {
hostgroup_name ssh-servers
service_description SSH
check_command check_ssh
use generic-service
notification_interval 0 ; set > 0 if you want to be
renotified
}
# check that ssh services are running
define service {
hostgroup_name ping-servers
service_description PING
check_command check_ping
use generic-service
notification_interval 0 ; set > 0 if you want to be r$
}
9. Lalu pada web browser ketikkan http:/localhost/nagios3
Maka akan keluar tampilan seperti berikut :
User Name : nagiosadmin
Pass : Sesuai dengan pada saat instalasi
Setelah selesai login,maka akan keluar tampilan seperti berikut




0 komentar:
Posting Komentar