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
#
######################################################################