PNP4Nagios não cria gráficos [RESOLVIDO]

1. PNP4Nagios não cria gráficos [RESOLVIDO]

thinomar
thinomar

(usa Linux Mint)

Enviado em 16/12/2014 - 13:23h

Olá pessoal,

Essa é a minha primeira vez aqui e vim porque realmente não consegui solucionar meu problema seguindo tópicos já criados.

Há algumas semanas atrás, comecei a implantar o Nagios, que é um software de monitoramento, na empresa em que trabalho. Tive alguns problemas durante a implantação, devido minha inexperiência com Linux e Nagios, porém consegui solucionar todos os problemas até agora.

Estou travado há uma semana no pnp4nagios. Consegui instalar tudo direitinho e configurar tudo do Nagios, porém ele não cria os gráficos, sempre informando que a pasta perfdata está vazia. Desinstalei e reinstalei e o problema persiste. Tentei pelo modo bulk, bulk+npcd e npcdmod (que n deu certo), mas em ambos o problema persiste.

A mensagem que aparece é "perfdata directory "/usr/local/pnp4nagios/var/perfdata/" is empty. Please check your Nagios config".

Estou utilizando o Nagios v. 4.0.8 e o PNP4Nagios v. 0.6.24.

Testando com "perl /usr/local/pnp4nagios/libexec/verify_pnp_config.pl/verify_pnp_config_v2.pl --mode bulk+npcd --config=/usr/local/nagios/etc/nagios.cfg --pnpcfg=/usr/local/pnp4nagios/etc", ele retorna o texto a seguir:

[INFO] Reading /usr/local/nagios/etc/nagios.cfg
[OK ] Running product is 'nagios'
[OK ] object_cache_file is defined
[OK ] object_cache_file=/usr/local/nagios/var/objects.cache
[INFO] Reading /usr/local/nagios/var/objects.cache
[OK ] resource_file is defined
[OK ] resource_file=/usr/local/nagios/etc/resource.cfg
[INFO] Reading /usr/local/nagios/etc/resource.cfg
[INFO] Reading /usr/local/pnp4nagios/etc/process_perfdata.cfg
[INFO] Reading /usr/local/pnp4nagios/etc/pnp4nagios_release
[OK ] Found PNP4Nagios version "0.6.24"
[OK ] Effective User is 'nagios'
[OK ] User nagios exists with ID '112'
[OK ] Effective group is 'nagios'
[OK ] Group nagios exists with ID '117'
[INFO] ========== Checking Bulk Mode + NPCD Config ============
[OK ] process_performance_data is 1 compared with '/1/'
[OK ] service_perfdata_file is defined
[OK ] service_perfdata_file=/usr/local/nagios/var/service-perfdata
[OK ] service_perfdata_file_template is defined
[OK ] service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$
[OK ] PERFDATA template looks good
[OK ] service_perfdata_file_mode is defined
[OK ] service_perfdata_file_mode=a
[OK ] service_perfdata_file_processing_interval is defined
[OK ] service_perfdata_file_processing_interval=15
[OK ] service_perfdata_file_processing_command is defined
[OK ] service_perfdata_file_processing_command=process-service-perfdata-file
[OK ] host_perfdata_file is defined
[OK ] host_perfdata_file=/usr/local/nagios/var/host-perfdata
[OK ] host_perfdata_file_template is defined
[OK ] host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$
[OK ] PERFDATA template looks good
[OK ] host_perfdata_file_mode is defined
[OK ] host_perfdata_file_mode=a
[OK ] host_perfdata_file_processing_interval is defined
[OK ] host_perfdata_file_processing_interval=15
[OK ] host_perfdata_file_processing_command is defined
[OK ] host_perfdata_file_processing_command=process-host-perfdata-file
[INFO] Nagios config looks good so far
[INFO] ========== Checking config values ============
[OK ] npcd daemon is running
[OK ] /usr/local/pnp4nagios/etc/npcd.cfg is used by npcd and readable
[INFO] Reading /usr/local/pnp4nagios/etc/npcd.cfg
[OK ] perfdata_spool_dir is defined
[OK ] perfdata_spool_dir=/usr/local/pnp4nagios/var/spool
[OK ] -1 files found in /usr/local/pnp4nagios/var/spool
service_perfdata_file_processing_command at /usr/local/pnp4nagios/libexec/verify_pnp_config.pl/verify_pnp_config_v2.pl line 462.
[OK ] Command process-service-perfdata-file is defined
[OK ] '/bin/mv /usr/local/pnp4nagios/var/service-perfdata /usr/local/pnp4nagios/var/spool/service-perfdata.$TIMET$'
[INFO] Regex = (?-xism:/bin/mv\s+/usr/local/nagios/var/service-perfdata\s+/usr/local/pnp4nagios/var/spool)
[CRIT] Command looks suspect (/bin/mv /usr/local/pnp4nagios/var/service-perfdata /usr/local/pnp4nagios/var/spool/service-perfdata.$TIMET$)


Verifiquei e o /bin/mv /usr/local/pnp4nagios/var/service-perfdata /usr/local/pnp4nagios/var/spool/service-perfdata.$TIMET$ é o comando que uso no commands.cfg do Nagios para o service perfdata, como a seguir:

######################################################################
#
# PERFORMANCE DATA COMMANDS
#
######################################################################

define command {
command_name process-service-perfdata
command_line /usr/bin/perl /usr/local/nagios/libexec/process_perfdata.pl
}

define command {
command_name process-host-perfdata
command_line /usr/bin/perl /usr/local/nagios/libexec/process_perfdata.pl -d HOSTPERFDATA
}

define command{
command_name process-service-perfdata-file
command_line /bin/mv /usr/local/pnp4nagios/var/service-perfdata /usr/local/pnp4nagios/var/spool/service-perfdata.$TIMET$

}

define command{
command_name process-host-perfdata-file
command_line /bin/mv /usr/local/pnp4nagios/var/host-perfdata /usr/local/pnp4nagios/var/spool/host-perfdata.$TIMET$

}



Já desinstalei o PNP 0.6.23 e tentei com o 0.6.16, mas o erro persiste. Se puderem ajudar, agradeço.

Att.,
Thiago Martins



  


2. MELHOR RESPOSTA

Phillipe Smith
smithux

(usa Arch Linux)

Enviado em 23/12/2014 - 12:35h

thinomar escreveu:

Olá pessoal,

Vim apenas para notificar que não obtive sucesso com o pnp4nagios que, mesmo sendo uma aplicação com ótimas criticas, não funcionou comigo provavelmente por alguma falha no host mesmo, porém, consegui fazer das certo com o Nagiosgraph, que supriu as necessidades que eu tinha. Agradeço novamente pela ajuda e disposição.

Como consegui os benditos gráficos, mesmo não sendo com a aplicação que eu queria, o caso foi resolvido, então até mais.

Att.,
Thiago Martins


Poxa, uma pena não ter dado certo meu brother....
Em todo caso, que bom que pelo menos conseguiu uma alternativa. ;)


3. Re: PNP4Nagios não cria gráficos [RESOLVIDO]

Phillipe Smith
smithux

(usa Arch Linux)

Enviado em 17/12/2014 - 15:14h

Meu brother, primeiramente, recomendo a utilização via NPCDMOD.

Pelo NPCDMOD não é necessário configurar os commands no Nagios.

Basta configurar o broker_module do pnp4nagios no nagios.cfg, reiniciar o nagios e iniciar o serviço do npcd

Exemplo da minha configuração no nagios.cfg:
broker_module=/usr/lib64/nagios/brokers/npcdmod.o config_file=/etc/pnp4nagios/npcd.cfg 


Ah! Uma outra configuração extremamente importante e habilitar a geração do performance data no Nagios:
process_performance_data=1 


Sem essa configuração, não será gerado nenhum gráfico mesmo com o pnp4nagios corretamente configurado.


4. Re: PNP4Nagios não cria gráficos [RESOLVIDO]

thinomar
thinomar

(usa Linux Mint)

Enviado em 17/12/2014 - 15:41h

Olá smithux,

Antes de tudo, obrigado pela resposta.

Então cara, tava vendo aqui, e o Nagios 4.x ainda não tem suporte para npcdmod, mas mesmo tendo lido a respeito, tentei testar, e assim que eu coloco o broker_module no nagios.cfg e reinicio o apache e o nagios, o nagios simplesmente para de funcionar e só volta quando eu tiro o broker_module e reinicio o apache e ele de novo. Por este motivo, resolvi tentar com o bulk+npcd.

Inclusive, na documentação do pnp, em https://docs.pnp4nagios.org/pnp-0.6/config diz o seguinte:
Attention Starting with Nagios 4 the internal structures have changed so the start of the module will fail. So far there are no plans to support Nagios 4. Please select any other of the modes.


As configurações do meu nagios.cfg sobre o perfdata são:

# PROCESS PERFORMANCE DATA OPTION
# This determines whether or not Nagios will process performance
# data returned from service and host checks. If this option is
# enabled, host performance data will be processed using the
# host_perfdata_command (defined below) and service performance
# data will be processed using the service_perfdata_command (also
# defined below). Read the HTML docs for more information on
# performance data.
# Values: 1 = process performance data, 0 = do not process performance data

process_performance_data=1



# HOST AND SERVICE PERFORMANCE DATA PROCESSING COMMANDS
# These commands are run after every host and service check is
# performed. These commands are executed only if the
# enable_performance_data option (above) is set to 1. The command
# argument is the short name of a command definition that you
# define in your host configuration file. Read the HTML docs for
# more information on performance data.

host_perfdata_command=process-host-perfdata
service_perfdata_command=process-service-perfdata



# HOST AND SERVICE PERFORMANCE DATA FILES
# These files are used to store host and service performance data.
# Performance data is only written to these files if the
# enable_performance_data option (above) is set to 1.

host_perfdata_file=/usr/local/pnp4nagios/var/host-perfdata
service_perfdata_file=/usr/local/pnp4nagios/var/service-perfdata



# HOST AND SERVICE PERFORMANCE DATA FILE TEMPLATES
# These options determine what data is written (and how) to the
# performance data files. The templates may contain macros, special
# characters (\t for tab, \r for carriage return, \n for newline)
# and plain text. A newline is automatically added after each write
# to the performance data file. Some examples of what you can do are
# shown below.

host_perfdata_file_template=DATATYPE::HOSTPERFDATA\t TIMET::$TIMET$\t HOSTNAME::$HOSTNAME$\t HOSTPERFDATA::$HOSTPERFDATA$\t HOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\t HOSTSTATE::$HOSTSTATE$\t HOSTSTATETYPE::$HOSTSTATETYPE$
service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\t TIMET::$TIMET$\t HOSTNAME::$HOSTNAME$\t SERVICEDESC::$SERVICEDESC$\t SERVICEPERFDATA::$SERVICEPERFDATA$\t SERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\t HOSTSTATE::$HOSTSTATE$\t HOSTSTATETYPE::$HOSTSTATETYPE$\t SERVICESTATE::$SERVICESTATE$\t SERVICESTATETYPE::$SERVICESTATETYPE$


# HOST AND SERVICE PERFORMANCE DATA FILE MODES
# This option determines whether or not the host and service
# performance data files are opened in write ("w") or append ("a")
# mode. If you want to use named pipes, you should use the special
# pipe ("p") mode which avoid blocking at startup, otherwise you will
# likely want the defult append ("a") mode.

host_perfdata_file_mode=a
service_perfdata_file_mode=a



# HOST AND SERVICE PERFORMANCE DATA FILE PROCESSING INTERVAL
# These options determine how often (in seconds) the host and service
# performance data files are processed using the commands defined
# below. A value of 0 indicates the files should not be periodically
# processed.

host_perfdata_file_processing_interval=15
service_perfdata_file_processing_interval=15



Ah sim, há outro porém. Para o fim de testes, fiz as seguintes alterações no commands.cfg:

define command{
command_name process-service-perfdata-file
command_line /bin/cp /usr/local/nagios/var/service-perfdata usr/local/pnp4nagios/var/spool/service-perfdata.$TIMET$
}

define command{
command_name process-host-perfdata-file
command_line /bin/cp /usr/local/nagios/var/host-perfdata /usr/local/pnp4nagios/var/spool/host-perfdata.$TIMET$
}


Assim que reiniciei o Nagios, os gráficos de todos os hosts foram criados, porém com o perfdata do Nagios e não do PNP. Isso me fez chegar a conclusão de que o problema não está no Nagios e nem na geração dos gráficos, que pelo que eu vi é feita utilizando o rrdtool, mas sim na geração dos arquivos /usr/local/pnp4nagios/var/host-perfdata e /usr/local/pnp4nagios/var/service-perfdata, mas mesmo chegando a esta conclusão (que não tenho plena certeza se está correta), não consegui solucionar o problema ainda :/

Caso possa ajudar, agradeço.

Att.,
Thiago Martins


5. Re: PNP4Nagios não cria gráficos [RESOLVIDO]

Phillipe Smith
smithux

(usa Arch Linux)

Enviado em 17/12/2014 - 16:15h

Ah! Nem havia percebido que era o Nagios 4.

Bem, a questão da geração do performance_data o formato é do Nagios mesmo, o pnp4nagios vai simplesmente interpretar esses dados com o rrdtool para exibi-los.

Aparentemente sua configuração está correta.

Só pra desencargo de consciência... O NPCD está em execução?


6. Re: PNP4Nagios não cria gráficos [RESOLVIDO]

thinomar
thinomar

(usa Linux Mint)

Enviado em 17/12/2014 - 16:32h

O NPCD está ativo sim. O configurei para rodar na inicialização.

Sobre o perfdata_file, quando coloquei "/bin/cp /usr/local/nagios/var/service-perfdata /usr/local/pnp4nagios/var/spool/service-perfdata.$TIMET$" como comando apenas de teste, ele puxou o geral do Nagios, não distinguindo os serviços que ativei o perfdata e os que desativei. Por isso a minha sugestão é que o PNP não estão conseguindo gerar o /usr/local/nagios/var/service-perfdata && host-perfdata.


7. Re: PNP4Nagios não cria gráficos [RESOLVIDO]

Phillipe Smith
smithux

(usa Arch Linux)

Enviado em 17/12/2014 - 16:41h

Ah sim... uma outra pergunta?

Você compilou o pnp4nagios assim:

sudo ./configure --with-nagios-user=nagios --with-nagios-group=nagios
sudo make all
sudo make fullinstall


É que, na verdade, o pnp4nagios necessita de permissões para escrever nos diretórios.

Mais uma coisa, já verificou o log do pnp4nagios?


8. Re: PNP4Nagios não cria gráficos [RESOLVIDO]

thinomar
thinomar

(usa Linux Mint)

Enviado em 17/12/2014 - 17:17h

Instalei ele da seguinte forma:

# ./configure --with-nagios-user=nagios --with-nagios-group=nagios
# make all
# make install
# make install-config
# make install-commandmode
# make install-init
# make install-webconf


As ultimas linhas do log são:

2014-12-17 17:03:01 [31059] [2] Processing Line 1
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 1
2014-12-17 17:03:01 [31059] [2] Processing Line 2
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 2
2014-12-17 17:03:01 [31059] [2] Processing Line 3
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 3
2014-12-17 17:03:01 [31059] [2] Processing Line 4
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 4
2014-12-17 17:03:01 [31059] [2] Processing Line 5
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 5
2014-12-17 17:03:01 [31059] [2] Processing Line 6
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 6
2014-12-17 17:03:01 [31059] [2] Processing Line 7
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 7
2014-12-17 17:03:01 [31059] [2] Processing Line 8
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 8
2014-12-17 17:03:01 [31059] [2] Processing Line 9
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 9
2014-12-17 17:03:01 [31059] [2] Processing Line 10
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 10
2014-12-17 17:03:01 [31059] [2] Processing Line 11
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 11
2014-12-17 17:03:01 [31059] [2] Processing Line 12
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 12
2014-12-17 17:03:01 [31059] [2] Processing Line 13
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 13
2014-12-17 17:03:01 [31059] [2] Processing Line 14
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 14
2014-12-17 17:03:01 [31059] [2] Processing Line 15
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 15
2014-12-17 17:03:01 [31059] [2] Processing Line 16
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 16
2014-12-17 17:03:01 [31059] [2] Processing Line 17
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 17
2014-12-17 17:03:01 [31059] [2] Processing Line 18
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 18
2014-12-17 17:03:01 [31059] [2] Processing Line 19
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 19
2014-12-17 17:03:01 [31059] [2] Processing Line 20
2014-12-17 17:03:01 [31058] [2] RRDs::update /usr/local/pnp4nagios/var/perfdata/.pnp-internal/runtime_skipped.rrd 1418842966:213
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31058] [2] /usr/local/pnp4nagios/var/perfdata/.pnp-internal/runtime_skipped.rrd updated
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 20
2014-12-17 17:03:01 [31059] [2] Processing Line 21
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 21
2014-12-17 17:03:01 [31058] [2] RRDs::update /usr/local/pnp4nagios/var/perfdata/.pnp-internal/runtime_update.rrd 1418842966:0
2014-12-17 17:03:01 [31059] [2] Processing Line 22
2014-12-17 17:03:01 [31058] [2] /usr/local/pnp4nagios/var/perfdata/.pnp-internal/runtime_update.rrd updated
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 22
2014-12-17 17:03:01 [31059] [2] Processing Line 23
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31058] [2] RRDs::update /usr/local/pnp4nagios/var/perfdata/.pnp-internal/runtime_create.rrd 1418842966:0
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 23
2014-12-17 17:03:01 [31059] [2] Processing Line 24
2014-12-17 17:03:01 [31058] [2] /usr/local/pnp4nagios/var/perfdata/.pnp-internal/runtime_create.rrd updated
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 24
2014-12-17 17:03:01 [31059] [2] Processing Line 25
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 25
2014-12-17 17:03:01 [31059] [2] Processing Line 26
2014-12-17 17:03:01 [31058] [1] PNP exiting (runtime 0.010519s) ...
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 26
2014-12-17 17:03:01 [31059] [2] Processing Line 27
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 27
2014-12-17 17:03:01 [31059] [2] Processing Line 28
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 28
2014-12-17 17:03:01 [31059] [2] Processing Line 29
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 29
2014-12-17 17:03:01 [31059] [2] Processing Line 30
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 30
2014-12-17 17:03:01 [31059] [2] Processing Line 31
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 31
2014-12-17 17:03:01 [31059] [2] Processing Line 32
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 32
2014-12-17 17:03:01 [31059] [2] Processing Line 33
2014-12-17 17:03:01 [31059] [2] Datatype set to 'SERVICEPERFDATA'
2014-12-17 17:03:01 [31059] [2] No Perfdata. Skipping line 33
2014-12-17 17:03:01 [31059] [1] 33 lines processed
2014-12-17 17:03:01 [31059] [1] /usr/local/pnp4nagios/var/spool/service-perfdata.1418842975-PID-31059 deleted
2014-12-17 17:03:01 [31059] [1] PNP exiting (runtime 0.023773s) ...
2014-12-17 17:03:01 [31068] [2] Using Config File /usr/local/pnp4nagios/etc/process_perfdata.cfg parameters
2014-12-17 17:03:01 [31068] [2] Default Timeout: 15 secs.
2014-12-17 17:03:01 [31068] [2] Config Timeout: 15 secs.
2014-12-17 17:03:01 [31068] [2] Actual Timeout: 15 secs.
2014-12-17 17:03:01 [31068] [1] process_perfdata.pl-0.6.24 starting in BULK Mode called by NPCD
2014-12-17 17:03:01 [31068] [2] searching for /usr/local/pnp4nagios/var/spool/host-perfdata.1418842975
2014-12-17 17:03:01 [31068] [1] ERROR: File /usr/local/pnp4nagios/var/spool/host-perfdata.1418842975 not found
2014-12-17 17:03:01 [31068] [1] PNP exiting (runtime 0.000179s) ...
2014-12-17 17:03:01 [31069] [2] Using Config File /usr/local/pnp4nagios/etc/process_perfdata.cfg parameters
2014-12-17 17:03:01 [31070] [2] Using Config File /usr/local/pnp4nagios/etc/process_perfdata.cfg parameters
2014-12-17 17:03:01 [31071] [2] Using Config File /usr/local/pnp4nagios/etc/process_perfdata.cfg parameters
2014-12-17 17:03:01 [31069] [2] Default Timeout: 15 secs.
2014-12-17 17:03:01 [31069] [2] Config Timeout: 15 secs.
2014-12-17 17:03:01 [31069] [2] Actual Timeout: 15 secs.
2014-12-17 17:03:01 [31069] [1] process_perfdata.pl-0.6.24 starting in BULK Mode called by NPCD
2014-12-17 17:03:01 [31069] [2] searching for /usr/local/pnp4nagios/var/spool/service-perfdata.1418842975
2014-12-17 17:03:01 [31069] [1] ERROR: File /usr/local/pnp4nagios/var/spool/service-perfdata.1418842975 not found
2014-12-17 17:03:01 [31069] [1] PNP exiting (runtime 0.00018s) ...
2014-12-17 17:03:01 [31070] [2] Default Timeout: 15 secs.
2014-12-17 17:03:01 [31070] [2] Config Timeout: 15 secs.
2014-12-17 17:03:01 [31070] [2] Actual Timeout: 15 secs.
2014-12-17 17:03:01 [31070] [1] process_perfdata.pl-0.6.24 starting in BULK Mode called by NPCD
2014-12-17 17:03:01 [31070] [2] searching for /usr/local/pnp4nagios/var/spool/host-perfdata.1418842975
2014-12-17 17:03:01 [31070] [1] ERROR: File /usr/local/pnp4nagios/var/spool/host-perfdata.1418842975 not found
2014-12-17 17:03:01 [31070] [1] PNP exiting (runtime 0.000179s) ...
2014-12-17 17:03:01 [31071] [2] Default Timeout: 15 secs.
2014-12-17 17:03:01 [31071] [2] Config Timeout: 15 secs.
2014-12-17 17:03:01 [31071] [2] Actual Timeout: 15 secs.
2014-12-17 17:03:01 [31071] [1] process_perfdata.pl-0.6.24 starting in BULK Mode called by NPCD
2014-12-17 17:03:01 [31071] [2] searching for /usr/local/pnp4nagios/var/spool/service-perfdata.1418842975
2014-12-17 17:03:01 [31071] [1] ERROR: File /usr/local/pnp4nagios/var/spool/service-perfdata.1418842975 not found
2014-12-17 17:03:01 [31071] [1] PNP exiting (runtime 0.000173s) ...



Obrigado pela ajuda.


9. Re: PNP4Nagios não cria gráficos [RESOLVIDO]

thinomar
thinomar

(usa Linux Mint)

Enviado em 17/12/2014 - 17:24h

Grupos Nagios:

nagios:x:117:nagios,www-data
nagiocmd:x:1009:nagios,www-data




10. Re: PNP4Nagios não cria gráficos [RESOLVIDO]

Phillipe Smith
smithux

(usa Arch Linux)

Enviado em 17/12/2014 - 17:33h

Dá uma olhada no config.php da sua instalação do PNP e verifica se o spool de está configurado corretamente:

Exemplo:


#
# Directory where the RRD Files will be stored
#
$conf['rrdbase'] = "/usr/local/nagios/share/perfdata/";


Esse $conf['rrdbase'] deveria ser:

$conf['rrdbase'] = "/usr/local/nagios/var/spool/perfdata/"; 



11. Re: PNP4Nagios não cria gráficos [RESOLVIDO]

thinomar
thinomar

(usa Linux Mint)

Enviado em 17/12/2014 - 17:40h

Ele está assim:

$conf['rrdbase'] = "/usr/local/pnp4nagios/var/perfdata/"; 


E muito obrigado por estar dando uma força, cara. Obrigado mesmo.


12. Re: PNP4Nagios não cria gráficos [RESOLVIDO]

thinomar
thinomar

(usa Linux Mint)

Enviado em 17/12/2014 - 17:44h

Estou dando uma vasculhada para ver se acho algo sobre o problema, porque creio que deva ser em algumas configuração, já que testei o pnp4nagios com as versões 0.6.16, 0.6.21 e 0.6.24 e mesmo assim o problema persiste.

Dei uma verificada aqui e as configurações estão corretas para o modo bulk com npcd.



01 02



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts