[TUTORIAL]: Instalasi Network Monitoring System Nagios on Ubuntu 12.04

nagios core Author: Febi Gelar Ramadhan.

Instalasi Network Monitoring System on Ubuntu 12.04

[socialring] Pertama masuk pada terminal di ubuntu untuk mulai instalasi nagios3

root@febiramadhan-Aspire-4741:/home/febiramadhan#

cek apakah packet yang dibutuhkan sudah ada atau perlu diinstalkan kembali

root@febiramadhan-Aspire-4741:/home/febiramadhan# dpkg -l |grep apache2

root@febiramadhan-Aspire-4741:/home/febiramadhan# dpkg -l |grep nagios3

Jika belum anda perlu setting /etc/apt/source.list dan masukan alamat repository

root@febiramadhan-Aspire-4741:/home/febiramadhan# nano /etc/apt/sources.list

lalu save dan mulai ketikan apt-get install nagios3 dan apt-get install apache2

root@febiramadhan-Aspire-4741:/home/febiramadhan# apt-get install apache2

root@febiramadhan-Aspire-4741:/home/febiramadhan# apt-get install nagios3

lalu mulai konfigurasi dan masuk pada file /etc/nagios3/conf.d/localhost_nagios2.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 nugroho

alias LMD

address 192.168.0.19

}

define host{

use generic-host ; Name of host template to use

host_name firman

alias LMD

address 192.168.0.18

}

define host{

use generic-host ; Name of host template to use

host_name indri

alias LMD

address 192.168.0.26

}

# 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 nugroho

service_description Disk Space

check_command check_all_disks!20%!10%

}

define service{

use generic-service ; Name of service template to use

host_name firman

service_description Disk Space

check_command check_all_disks!20%!10%

}

define service{

use generic-service ; Name of service template to use

host_name indri

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 nugroho

service_description Current Users

check_command check_users!20!50

}

define service{

use generic-service ; Name of service template to use

host_name firman

service_description Current Users

check_command check_users!20!50

}

define service{

use generic-service ; Name of service template to use

host_name indri

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 nugroho

service_description Total Processes

check_command check_procs!250!400

}

define service{

use generic-service ; Name of service template to use

host_name firman

service_description Total Processes

check_command check_procs!250!400

}

define service{

use generic-service ; Name of service template to use

host_name indri

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 nugroho

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 firman

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 indri

service_description Current Load

check_command check_load!5.0!4.0!3.0!10.0!6.0!4.0

}

Lalu masuk pada /etc/nagios3/conf.d/hostgroup_nagios2.cfg dan masukan sintaks tambahan pada file dan mengelompokan sesuai yang kita inginkan.

# Some generic hostgroup definitions

# A simple wildcard hostgroup

define hostgroup {

hostgroup_name all

alias All Servers

members nugroho,firman,indri

}

# A list of your Debian GNU/Linux servers

define hostgroup {

hostgroup_name debian-servers

alias Debian GNU/Linux Servers

members nugroho,firman,indri

}

# A list of your web servers

define hostgroup {

hostgroup_name http-servers

alias HTTP servers

members nugroho,firman,indri

}

# A list of your ssh-accessible servers

define hostgroup {

hostgroup_name ssh-servers

alias SSH servers

members nugroho,firman,indri

}

# A list of your ping servers

define hostgroup {

hostgroup_name ping-servers

alias Ping Servers

members nugroho,firman,indri

}

Lalu masuk file /etc/nagios3/conf.d/services_nagios2.cfg untuk memasukan settingan dan perintah pengecekan monitoring yang akan dilakukan.

# 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-servers

service_description PING

check_command check_ping

use generic-service

notification_interval 0 ; set >0 if you want to be renotified

}

Lalu restart paket nagios

root@febiramadhan-Aspire-4741:/home/febiramadhan# invoke-rc.d nagios3 restart

Dan terkahir jangan lupa masukan perintah memasukan password dan ussername nya

root@febiramadhan-Aspire-4741:/home/febiramadhan# htpasswd c /etc/nagios3/htpaswd.users nagiosadmin

Konfigurasi selesai, kita langsung bisa membuktikan bahwa host atau ketiga user dalam ketiga IP tersebut dapat kita monitoring Nugroho : 192.168.0.19 Firman : 192.168.0.18 Indri : 192.168.0.26

Buka web browser

gmbr1-TUTORIAL_ Instalasi_Network_Monitoring_System_on_Ubuntu_12.04

masuk ke halaman http:/localhost/nagios3 dan masuk sesuai username dan password yang telah di setting.

gmbr2-TUTORIAL_ Instalasi_Network_Monitoring_System_on_Ubuntu_12.04

Lalu pilih map di pojok kiri untuk melihat hasil user yang telah kita monitoring.

Dan kita lihat semua status host yang telah kita monitoringgmbr3-TUTORIAL_ Instalasi_Network_Monitoring_System_on_Ubuntu_12.04 Demikian tutorial tentang Instalasi Network Monitoring System Nagios on Ubuntu 12.04 kali ini.

article by : Boksi Suryani (Febi Gelar Ramadhan) PT. Lintas Media Danawa


lintasmediadanawa.com | cozy.co.id


visit our other blog: Cloud Indonesia

Tidak ada komentar:

Posting Komentar