Encontrando erros no Nagios
Publicado por Avalanche em 23/03/2011
[ Hits: 17.521 ]
Nagios Core 3.2.3Ele encontra o erro, indica o arquivo que o contém,e ainda fala o número da linha. No meu teste apenas tirei a letra "r" do nome do host. Quando as configurações estão corretas, ele mostra da seguinte forma:
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config file '/etc/nagios/objects/commands.cfg'...
Processing object config file '/etc/nagios/objects/contacts.cfg'...
Processing object config file '/etc/nagios/objects/timeperiods.cfg'...
Processing object config file '/etc/nagios/objects/templates.cfg'...
Processing object config directory '/etc/nagios/objects/dir_conf'...
Processing object config file '/etc/nagios/objects/dir_conf/box_services.cfg'...
Processing object config file '/etc/nagios/objects/dir_conf/services_firewall.cfg'...
Processing object config file '/etc/nagios/objects/dir_conf/hosts_mail.cfg'...
Processing object config file '/etc/nagios/objects/dir_conf/services_mail.cfg'...
Processing object config file '/etc/nagios/objects/dir_conf/hosts_firewall.cfg'...
Processing object config file '/etc/nagios/objects/dir_conf/wg_services.cfg'...
Processing object config file '/etc/nagios/objects/dir_conf/links_services.cfg'...
Processing object config file '/etc/nagios/objects/dir_conf/grupos.cfg'...
Processing object config file '/etc/nagios/objects/dir_conf/links_hosts.cfg'...
Processing object config file '/etc/nagios/objects/dir_conf/box_hosts.cfg'...
Processing object config file '/etc/nagios/objects/dir_conf/wg_hosts.cfg'...
Error: Could not find any host matching 'wg_vecto' (config file '/etc/nagios/objects/dir_conf/wg_services.cfg', starting on line 2)
Error: Could not expand hostgroups and/or hosts specified in service (config file '/etc/nagios/objects/dir_conf/wg_services.cfg', starting on
line 2)
Error processing object config files!
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
Nagios Core 3.2.3Espero ajudar com essa dica, pois perdi muito tempo verificando várias vezes os meus arquivos em busca de erro. Já que a ferramenta nos dá essa opção, vamos usar.
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config file '/etc/nagios/objects/commands.cfg'...
Processing object config file '/etc/nagios/objects/contacts.cfg'...
Processing object config file '/etc/nagios/objects/timeperiods.cfg'...
Processing object config file '/etc/nagios/objects/templates.cfg'...
Processing object config directory '/etc/nagios/objects/dir_conf'...
Processing object config file '/etc/nagios/objects/dir_conf/box_services.cfg'...
Processing object config file '/etc/nagios/objects/dir_conf/services_firewall.cfg'...
Processing object config file '/etc/nagios/objects/dir_conf/hosts_mail.cfg'...
Processing object config file '/etc/nagios/objects/dir_conf/services_mail.cfg'...
Processing object config file '/etc/nagios/objects/dir_conf/hosts_firewall.cfg'...
Processing object config file '/etc/nagios/objects/dir_conf/wg_services.cfg'...
Processing object config file '/etc/nagios/objects/dir_conf/links_services.cfg'...
Processing object config file '/etc/nagios/objects/dir_conf/grupos.cfg'...
Processing object config file '/etc/nagios/objects/dir_conf/links_hosts.cfg'...
Processing object config file '/etc/nagios/objects/dir_conf/box_hosts.cfg'...
Processing object config file '/etc/nagios/objects/dir_conf/wg_hosts.cfg'...
Read object config files okay...
Running pre-flight check on configuration data...
Checking services...
Checked 185 services.
Checking hosts...
Checked 55 hosts.
Checking host groups...
Checked 5 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Checked 4 contacts.
Checking contact groups...
Checked 2 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 35 commands.
Checking time periods...
Checked 7 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
Java 5.0 update 11 no Fedora Core 5
Verificando logs do Squid em tempo real
Netflix - Bug na atualização do Silverlight em instalação via Wine [Resolvido]
Ubuntu-Tweak: Configurando seu Ubuntu 7.10
Instalando o Java 14 no Ubuntu, Linux Mint e Debian
Transição usando o Kdenlive [vídeo]
Iniciar software automaticamente no Enlightenment
Compartilhando a tela do Computador no Celular via Deskreen
Como Configurar um Túnel SSH Reverso para Acessar Sua Máquina Local a Partir de uma Máquina Remota
Configuração para desligamento automatizado de Computadores em um Ambiente Comercial
Como renomear arquivos de letras maiúsculas para minúsculas
Imprimindo no formato livreto no Linux
Vim - incrementando números em substituição
Efeito "livro" em arquivos PDF
Como resolver o erro no CUPS: Unable to get list of printer drivers
Não to conseguindo resolver este problemas ao instalar o playonelinux (1)
Excluir banco de dados no xampp (1)
[Python] Automação de scan de vulnerabilidades
[Python] Script para analise de superficie de ataque
[Shell Script] Novo script para redimensionar, rotacionar, converter e espelhar arquivos de imagem
[Shell Script] Iniciador de DOOM (DSDA-DOOM, Doom Retro ou Woof!)
[Shell Script] Script para adicionar bordas às imagens de uma pasta