[21] Comentário enviado por
pauloholiveria em 17/08/2012 - 11:39h:
Bom dia!
para acrescentar uma máquina com windows 2003: Estou acrescentando uma linha de comando no arquivo:
#nano /etc/nagios3/nagios.cfg
cfg_file=/etc/nagios3/objects/jupter.cfg
Em seguida criei o arquivo:
:/etc/nagios3/objects#nano jupter.cfg
Dentro do arquivo coloqueio o script e estou reiniciando o serviço da o seguinte erro:
Warning: Duplicate definition found for command 'check_nt_disk' (config file '/etc/nagios3/objects/jupter.cfg', starting on line 54)
Error: Could not add object property in file '/etc/nagios3/objects/jupter.cfg' on line 55.
Error processing object config files!
***> One or more problems was encountered while processing the config files...
Este é o meu script:
### ------------ Definições de Host ---------------------------------###
define host{
name TemplateHostJupter
alias TemplateHostJupter
check_command check-host-alive
max_check_attempts 3
check_interval 5
active_checks_enabled 1
passive_checks_enabled 0
check_period 24x7
retain_status_information 1
#contact_groups Admin
notification_interval 0
notification_period 24x7
notification_options d,u,r
register 0
}
define host{
host_name Jupter
use TemplateHostJupter
alias Servidor Jupter Local
address 10.50.101.8
}
### ----------- Definições de Serviço -------------------- ####
define service{
name ICMP-Jupter
service_description ICMP-Jupter
is_volatile 0
check_command check_ping!300,20%!900,52%!
max_check_attempts 3
normal_check_interval 5
retry_check_interval 5
active_checks_enabled 1
passive_checks_enabled 0
check_period 24x7
retain_status_information 1
notification_interval 0
notification_period 24x7
notification_options u,c,r
register 0
}
define service{
host_name Jupter
service_description ICMP-Jupter
use ICMP-Jupter
#contact_groups Admin
}
### ---------- Definições do Plugin ----------- #### ### (OBS: Tudo junto e misturado no mesmo arquivo) ##
define command{
command_name check_nt_disk
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 \
-v USEDDISKSPACE -l $ARG1$ -w 80 -c 90
}
## Criando o template de monitoração para partições do Windows
define service{
name Particao
service_description Particao
is_volatile 0
max_check_attempts 3
normal_check_interval 5
retry_check_interval 5
active_checks_enabled 1
passive_checks_enabled 0
check_period 24x7
notification_options u,c,r
register 0
}
define service{
host_name Jupter
service_description Particao
use Particao
check_command check_nt_disk!C
#contact_groups Admin
}