Instalação e configuração do Nagios (versões 3.2.1 e 4.0.8)
Esse artigo propõe-se auxiliar na instalação do serviço de monitoramento de equipamentos de rede Nagios.
[ Hits: 22.825 ]
Por: Vauires Vidal da Silva em 01/06/2015
###############################################################################
# TEMPLATES.CFG - SAMPLE OBJECT TEMPLATES
#
#
# NOTES: This config file provides you with some example object definition
# templates that are refered by other host, service, contact, etc.
# definitions in other config files.
#
# You don't need to keep these definitions in a separate file from your
# other object definitions. This has been done just to make things
# easier to understand.
#
###############################################################################
###############################################################################
###############################################################################
#
# CONTACT TEMPLATES
#
###############################################################################
###############################################################################
# Generic contact definition template - This is NOT a real contact, just a template!
define contact{
name generic-contact ; The name of this contact template
service_notification_period 24x7 ; service notifications can be sent anytime
host_notification_period 24x7 ; host notifications can be sent anytime
service_notification_options w,u,c,r,f,s ; send notifications for all service states, flapping events, and scheduled downtime events
host_notification_options d,u,r,f,s ; send notifications for all host states, flapping events, and scheduled downtime events
service_notification_commands notify-service-by-email ; send service notifications via email
host_notification_commands notify-host-by-email ; send host notifications via email
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL CONTACT, JUST A TEMPLATE!
}
###############################################################################
###############################################################################
#
# HOST TEMPLATES
#
###############################################################################
###############################################################################
# Generic host definition template - This is NOT a real host, just a template!
define host{
name generic-host ; The name of this host template
notifications_enabled 1 ; Host notifications are enabled
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
notification_period 24x7 ; Send host notifications at any time
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
max_check_attempts 4 ; Notification get sent out to everyone in the 'admins' group
}
###############################################################################
###############################################################################
#
# SERVICE TEMPLATES
#
###############################################################################
###############################################################################
# Generic service definition template - This is NOT a real service, just a template!
define service{
name generic-service ; The 'name' of this service template
active_checks_enabled 1 ; Active service checks are enabled
passive_checks_enabled 1 ; Passive service checks are enabled/accepted
parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
obsess_over_service 1 ; We should obsess over this service (if necessary)
check_freshness 0 ; Default is to NOT check service 'freshness'
notifications_enabled 1 ; Service notifications are enabled
event_handler_enabled 1 ; Service event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
is_volatile 0 ; The service is not volatile
check_period 24x7 ; The service can be checked at any time of the day
max_check_attempts 3 ; Re-check the service up to 3 times in order to determine its final (hard) state
normal_check_interval 10 ; Check the service every 10 minutes under normal conditions
retry_check_interval 2 ; Re-check the service every two minutes until a hard state can be determined
contact_groups admins ; Notifications get sent out to everyone in the 'admins' group
notification_options w,u,c,r ; Send notifications about warning, unknown, critical, and recovery events
notification_interval 60 ; Re-notify about service problems every hour
notification_period 24x7 ; Notifications can be sent out at any time
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}
define host{
use generic-host
host_name server-nagios
alias Remote Linux Host
address ip_address
check_command check-host-alive
contact_groups admins
}
define host{
use generic-host
host_name server-email
alias Remote Linux Host
address ip_address
check_command check-host-alive
contact_groups admins
}
define host{
use generic-host
host_name win7
alias Remote Windows Host
address ip_address
check_command check-host-alive
contact_groups admins
}
define host{
use generic-host
host_name server-http
alias Remote Linux Host
address ip_address
check_command check-host-alive
contact_groups admins
}
define host{
use generic-host
host_name wrt54g
alias Roteador Linksys
address 192.168.1.1
check_command check-host-alive
contact_groups admins
}
define host{
use generic-host
host_name dir-600
alias Roteador Dlink
address 192.168.1.2
check_command check-host-alive
contact_groups admins
}
define host{
use generic-host
host_name winxp
alias Windows XP
address 192.168.1.110
check_command check-host-alive
contact_groups admins
}
define host{
use generic-host
host_name camera_ip
alias Camera
address ip_address
check_command check-host-alive
contact_groups admins
}
define host{
use generic-host
host_name hp2605
alias HP LaserJet 2605dn
check_command check-host-alive
address 192.168.1.30
contact_groups admins
define service{
use generic-service
host_name server-mail,win7,server-http,server-nagios,winxp
service_description Current Users
check_command check_users!20!50
}
define service{
use generic-service
host_name server-mail,win7,server-http,server-nagios,camera_ip,winxp,dir-600,wrt54g,hp2605
service_description Ping
check_command check_ping!100.0,20%!500.0,60%
}
define service{
use generic-service
host_name server-http
service_description Http
check_command check_http
}
define service{
use generic-service
host_name win7
service_description TCP
check_command check_tcp!3389
}
define service{
use generic-service
host_name server-nagios,win7,server-mail,server-http
service_description Memory Usage
check_command check_nt!MEMUSE!-w 80 -c 90
}
define service{
use generic-service
host_name server-nagios,server-mail,server-http
service_description CPU Load
check_command check_nt!CPULOAD!-l 5,80,90
}
define service{
use generic-service
host_name server-nagios,win7,server-mail,server-http
service_description C:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90
}
define service{
use generic-service
host_name hp2605
service_description Printer Status
check_command check_hpjd!-C public
}
define service{
use generic-service
host_name hp2605
service_description Check Toner
check_command check_tonner!1.3.6.1.2.1.43.11.1.1.9.1.1
}
define command{
command_name check_tonner
command_line $USER1$/check_snmp -H $HOSTADDRESS$ -o $ARG1$ -w 20:109 -c $:100
}
Cliente Nagios no Windows - Instalação e Configuração
Asterisk - Configuração de conferência com PIN
Configurando Zabbix 3.4 no CentOS 7
Observium - Monitoramento de Rede
SNMPv3 no Debian/Ubuntu - Configurando para consultas externas
Como extrair chaves TOTP 2FA a partir de QRCODE (Google Authenticator)
Linux em 2025: Segurança prática para o usuário
Desktop Linux em alta: novos apps, distros e privacidade marcam o sábado
IA chega ao desktop e impulsiona produtividade no mundo Linux
Novos apps de produtividade, avanços em IA e distros em ebulição agitam o universo Linux
Como instalar o repositório do DBeaver no Ubuntu
Como instalar o Plex Media Server no Ubuntu
Digitando underscore com "shift" + "barra de espaços"
Como ativar a lixeira e recuperar aquivos deletados em um servidor Linux
Como mudar o nome de dispositivos Bluetooth via linha de comando
Linux é a solução para o fim do Windows10? [RESOLVIDO] (6)
Assinador JNLP do Site Portal da Nota Fiscal Eletrônica (0)
Programa fora de escala na tela do pc (29)









