Cara Installasi Nagios di Ubuntu
Pengertian Nagios
Nagios adalah Tools network monitoring
system opensource yang mudah digunakan. Nagios awalnya didesign untuk berjalan
pada sistem operasi Linux, namun dapat juga berjalan dengan baik hampir
disemua sistem operasi unix.
Nagios didesign
untuk memonitoring keadaan suatu jaringan atau bisa memonitoring
masalah-masalah pada suatu host tertentu yang ingin kita monitoring. Nagios mengawasi
host-host dan servis yang telah ditetapkan, memberi peringatan jika keadaan
memburuk, dan memberi tahu kapan keadaan tersebut membaik.
Cara Instalasi Nagios
1. Pertama, install terlebih dahulu Apache2 :
apt-get install apache2
2. Kemudian,install Nagios terlebih dahulu dengan memasukkan script pada terminal :
sudo apt-get install nagios3 nagios-nrpe-plugin
3. Pada saat selesai menginstall Nagios, maka akan keluar tampilan seperti berikut :
4. Kemudian, pilih type mail configuration :
5. Kemudian, masukkan system mail namenya :
6. Kemudian, setting define group hostnya dengan memasukkan define hostnya untuk di ping :
sudo nano /etc/nagios3/nagios.cfg
# 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 imam
address 172.16.30.44 (ip host yang akan dimonitoring)
}
define host{
use generic-host ; Name of host template to use
host_name jartel2
alias rido
address 172.16.30.26 ( ip host yang dimonitoring )
}
define host{
use generic-host ; Name of host template to use
host_name jartel3
alias hadi
address 172.16.40.62 ( ip host yang dimonitoring )
}
# 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 template to use
host_name jartel2
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 template to use
host_name jartel3
service_description Current Load
check_command check_load!5.0!4.0!3.0!10.0!6.0!4.0
}
7. Kemudian masukkan setting ping sebagai berikut :
ping check_command : # 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 } define service { hostgroup_name ping service_description ping check_command check_ping use generic-service notification_interval 0 ; set > 0 if you want to be renotified
Apabila sudah keluar tampilan seperti dibawah ini, maka sudah berhasil menyetingnya :
8. Kemudian, restart nagios dengan memasukkan script :
sudo /etc/init.d/nagios3 restart
9. Jalankan browser dengan memasukkan : http://localhost/nagios3
sehingga, akan keluar tampilan sebagai berikut :
masukkan user name dan passwordnya.
10. Kemudian, setelah OK maka akan masuk kenagios dengan tampilan berikut ini :
11. Buka map,
12. Ini adalah hostnya, setelah kita pilih host mana yang ingin kita lihat secara mendetail maka akan terlihat spesifikasi dalam gambar dibawah berikut.nagiosadmin dapat
melihat ada berapa host yang sedang dimonitoring, status masing-masing host, kapan terakhir kali pengecekan, durasi pengecekan, dan status information.
13. Service
Sekian dan Terima kasihWassalammualaikum,wr,wb.,reference :http://www.unixmen.com/install-configure-nagios-ubuntu-14-04-lts/
Tidak ada komentar:
Posting Komentar