NAGIOS 3 Nagios adalah Tools network monitoring system opensource yang mudah digunakan. Nagios awalnya didesign untuk berjalan ...
NAGIOS 3
2. Setelah itu lakukan konfigurasi selanjutnya dengan cara:
define hostgroup {
hostgroup_name ping-servers
alias PING servers
members jartel2,jartel3,jartel4
}
4. Setelah itu lakukan konfigurasi pada servicenya, dengan cara seperti di bawah ini :
#nano /etc/nagios3/conf.d/services_nagios2.cfg
Konfigurasinya seperti ini :
#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 ping services are running
define service {
t kita gunakan untuk melakukan management (install/uninstall).
4. Jika sudah terinstall, maka lakukan remove terlebih dahulu untuk install ulang paket. Hal ini dilakukan untuk memastikan bahwa paket yang anda install lengkap dengan menginstall ulang paketnya sendiri. Remove dapat dilakukan dengan cara :
hostgroup_name ping-servers
service_description PING
check_command check_ping
use generic-service
notification_interval 0 ; set > 0 if you want to be renotifi$
}
6. Untuk mensetting password baru sesuai dengan yang anda inginkan, ketikkan seperti di bawah ini :
7. Buka browser, kemudian buka link ini http:/localhost/nagios3
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.
KONFIGURASI NAGIOS 3
1. Install Nagios 3 pada Ubuntu anda dengan cara:
#apt-get install nagios3
2. Setelah itu lakukan konfigurasi selanjutnya dengan cara:
#nano /etc/nagios3/conf.d/localhost_nagios3.cfg
Ini merupakan perintah untuk konfigurasi pada local hostnya. Pada
Konfigurasi ini, saya akan memonitoring 3 jaringan tetangga, yaitu misra
(jartel2), ihsan (jartel3), dan agung (jartel4).
Konfigurasi pada local host ini dapat dilakukan seperti di bawah ini :
Konfigurasi pada local host ini dapat dilakukan seperti di bawah ini :
# 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$
host_name
jartel2
alias misra
address
172.16.30.44
}
define host{
use
generic-host ; Name of host template$
host_name
jartel3
alias ihsan
address
172.16.30.32
}
define host{
use
generic-host ; Name of host template$
host_name
jartel4
alias agung
address
172.16.30.6
}
# 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 servi$
host_name
jartel2
service_description
Disk Space
check_command
check_all_disks!20%!10%
}
define service{
use
generic-service ; Name of servi$
host_name
jartel2
service_description
Disk Space
check_command
check_all_disks!20%!10%
}
define service{
use generic-service ; Name of serv$
host_name jartel3
service_description Disk Space
check_command check_all_disks!20%!10%
}
use generic-service ; Name of serv$
host_name jartel3
service_description Disk Space
check_command check_all_disks!20%!10%
}
define service{
use
generic-service ; Name of serv$
host_name
jartel4
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 servi$
host_name
jartel2
service_description
Current Users
check_command
check_users!20!50
}
define service{
use
generic-service ; Name of serv$
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 servi$
host_name
jartel2
service_description
Total Processes
check_command
check_procs!250!400
}
define service{
use
generic-service ; Name of serv$
host_name
jartel4
service_description
Total Process
check_command
check_procs!250!400
}
# Define a service to check the load on
the local machine.
define service{
use
generic-service ; Name of servi$
host_name
jartel2
service_description
Current Load
check_command
check_load!5.0!4.0!3.0!10.0!6.0$
}
define service{
use
generic-service ; Name of serv$
host_name
jartel3
service_description
Current Load
check_command
check_load!5.0!4.0!3.0!10.0!6.$
define service{
use
generic-service ; Name of serv$
host_name
jartel4
service_description
Current Load
check_command
check_load!5.0!4.0!3.0!10.0!6.$
}
3. Kemudian lakukan konfigurasi pada host groups nya, dengan cara :
#nano /etc/nagios3/conf.d/hostgroups_nagios2.cfg
lalu konfigurasi seperti ini:
# Some generic hostgroup definitions
# A simple wildcard hostgroup
define hostgroup {
hostgroup_name all
alias All Servers
members jartel2,jartel3,jartel4
}
# A list of your Debian GNU/Linux servers
define hostgroup {
hostgroup_name debian-servers
alias Debian GNU/Linux Servers
members jartel2,jartel3,jartel4
}
# A list of your web servers
define hostgroup {
hostgroup_name http-servers
# A simple wildcard hostgroup
define hostgroup {
hostgroup_name all
alias All Servers
members jartel2,jartel3,jartel4
}
# A list of your Debian GNU/Linux servers
define hostgroup {
hostgroup_name debian-servers
alias Debian GNU/Linux Servers
members jartel2,jartel3,jartel4
}
# A list of your web servers
define hostgroup {
hostgroup_name http-servers
alias HTTP servers
members jartel2,jartel3,jartel4
}
# A list of your ssh-accessible servers
define hostgroup {
hostgroup_name ssh-servers
alias SSH servers
members jartel2,jartel3,jartel4
}
# A list of your ping-accessible serversmembers jartel2,jartel3,jartel4
}
# A list of your ssh-accessible servers
define hostgroup {
hostgroup_name ssh-servers
alias SSH servers
members jartel2,jartel3,jartel4
}
define hostgroup {
hostgroup_name ping-servers
alias PING servers
members jartel2,jartel3,jartel4
}
4. Setelah itu lakukan konfigurasi pada servicenya, dengan cara seperti di bawah ini :
#nano /etc/nagios3/conf.d/services_nagios2.cfg
Konfigurasinya seperti ini :
#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 ping services are running
define service {
t kita gunakan untuk melakukan management (install/uninstall).
Perintah
dpkg banyak macamnya, salah satunya adalah dpkg -l yang merupakan
perintah untuk melihat daftar package yang telah terinstall beserta
versi package yang telah terinstall dan deskripsinya. Sedangkan |grep digunakan untuk mencari file-file yang
mengandung teks dengan kriteria yang telah anda tentukan.
4. Jika sudah terinstall, maka lakukan remove terlebih dahulu untuk install ulang paket. Hal ini dilakukan untuk memastikan bahwa paket yang anda install lengkap dengan menginstall ulang paketnya sendiri. Remove dapat dilakukan dengan cara :
#apt-get remove apache2 >> untuk meremove paket apache2
#apt-get remove nagios3 >> untuk meremove paket nagios3
service_description PING
check_command check_ping
use generic-service
notification_interval 0 ; set > 0 if you want to be renotifi$
}
5. Setelah konfigurasi pada local host, host groups, dan services selesai, lakukan restart.
# /etc/init.d/nagios3 restart
6. Untuk mensetting password baru sesuai dengan yang anda inginkan, ketikkan seperti di bawah ini :
#sudo htpasswd -c /etc/nagios3/htpasswd.users nagiosadmin
7. Buka browser, kemudian buka link ini http:/localhost/nagios3
COMMENTS