Professional Documents
Culture Documents
A) CONTACTS
B) CONTACT GROUP
Sessão onde são definidos quem participa do grupo de administradores que serão
notificados em caso de alerta.
C) CONTACT TEMPLATES
D) HOST TEMPLATES
E) SERVICE TEMPLATES
F) TIME PERIODS
Espaço onde são definidos o período de tempo em que o Nagios fará as suas notificações,
(dia da semana e hora, por exemplo). Inclusive há modelos prontos, embora você possa
criar o seu modelo personalizado.
G) HOST DEFINITION
I) SERVICE DEFINITION
.
Sessão onde serão definidos os serviços a serem monitorados em cada host.
2) Seguindo o padrão da sessão HOST DEFINITION crie de declaração que
possibilitem a utilização de:
########################################################################
######## HOST DEFINITION ##############
define host{
use windows-server
host_name win_xp
alias servidor-win
address 192.168.0.1
}
define host{
use linux-server
host_name linux
alias servidor-tux
address 192.168.0.2
}
define host{
use linux-server
host_name router
alias roteador
address 10.0.3.252
}
define hostgroup{
hostgroup_name admin
alias equipamentos da rede
members router, linux, win_xp
}
define service{
use generic-service
host_name linux, win_xp, router
service_description PING
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admin
notification_interval 120
notification_period 24x7
notification_options c,r
check_command check_ping!100.0,20%!500.0,60%
}
define service{
use generic-service
host_name linux
service_description Raiz
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admin
notification_interval 120
notification_period 24x7
notification_options c,r
check_command check_local_disk!20%!10%!/
c) Usuário local
define service{
use generic-service
host_name linux
service_description Usuarios
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admin
notification_interval 10
notification_period 24x7
notification_options w,u,c,r
check_command check_local_users!5!10
}
d) Processos locais
define service{
use generic-service
host_name linux
service_description Processos
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admin
notification_interval 10
notification_period 24x7
notification_options w,u,c,r
check_command check_local!check_total_procs
e) Uso de CPUs
define service{
use generic-service
host_name linux
service_description Processador
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admin
notification_interval 10
notification_period 24x7
notification_options w,u,c,r
check_command check_local_procs!300!400!procs
f) Uso de swap
define service{
use generic-service
host_name linux
service_description Swap
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admin
notification_interval 10
notification_period 24x7
notification_options w,u,c,r
check_command check_local_swap!20%!10%
g) ssh
define service{
use generic-service
host_name linux
service_description SSH
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admin
notification_interval 10
notification_period 24x7
notification_options w,u,c,r
check_command check_ssh
}
define service{
use windows-server
host_name win_xp
service_description versao
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admin
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command check_ winver
i) Uptime
define service{
use windows-server
host_name win_xp
service_description Tempo Ligado
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admin
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command check_ uptime
define service{
use windows-server
host_name win_xp
service_description Uso Cpu
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admin
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command check_ calc_load
define service{
use windows-server
host_name win_xp
service_description Uso Cpu
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admin
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command check_nt_disk!USEDDISKSPACE!C!80!90
define service{
use windows-server
host_name win_xp
service_description IIS
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admin
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command check_w3sv
}
}
b. Apache (Windows)
define service{
use windows-server
host_name win_xp
service_description Apache
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admin
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command check_apache
}
c. DNS (Windows)
define service{
use windows-server
host_name win_xp
service_description DNS
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admin
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command check_dns
}
d. DHCP (Windows)
define service{
use windows-server
host_name win_xp
service_description DNS
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admin
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command check_dhcp
}
a. Explorer
define service{
use windows-server
host_name win_xp
service_description Explorer
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admin
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command check_explorer.exe
}
b. MSN
define service{
use windows-server
host_name win_xp
service_description MSN
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admin
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command check_msnmsgr.exe
}
c. Word
define service{
use windows-server
host_name win_xp
service_description Word
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admin
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command check_winword.exe
}
d. Paint
define service{
use windows-server
host_name win_xp
service_description Paint
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admin
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command check_mspaint.exe
}
e. Calculadora
define service{
use windows-server
host_name win_xp
service_description Calculadora
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admin
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command check_calc.exe
}
Referencias:
http://www.vivaolinux.com.br/dica/Nagios3-Correcao-do-wrong-l-argument-no-check_nt
http://www.mail-archive.com/nagios-users@lists.sourceforge.net/msg03289.html