I have made a compiled installation of nagios and pnp4nagios using bulk mode with npcd on CentOs 7.4
The problem is that the RRD files are not generated in /usr/local/pnp4nagios/var/spool and the URL http://myip/pnp4nagios/graph show me.
Code: Select all
perfdata directory "/usr/local/pnp4nagios/var/perfdata/" is empty. Please check your Nagios config. <a href="http://docs.pnp4nagios.org/faq/3">Read FAQ online</a>
file [line]:
application/models/data.php [109]:
Code: Select all
more commands.cfg
define command {
command_name process-service-perfdata-file
command_line /usr/local/pnp4nagios/libexec/process_perfdata.pl --bulk=/usr/local/pnp4nagios/var/service-perfdata
}
define command {
command_name process-host-perfdata-file
command_line /usr/local/pnp4nagios/libexec/process_perfdata.pl --bulk=/usr/local/pnp4nagios/var/host-perfdata
Code: Select all
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$
}
Code: Select all
more /usr/local/nagios/etc/nagios.cfg
service_perfdata_file=/usr/local/pnp4nagios/var/service-perfdata
service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVIC
ECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE
service_perfdata_file_mode=a
service_perfdata_file_processing_interval=15
service_perfdata_file_processing_command=process-service-perfdata-file-pnp4
# *** the template definition differs from the one in the original nagios.cfg
#
host_perfdata_file=/usr/local/pnp4nagios/var/host-perfdata
host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTAT
E::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$
host_perfdata_file_mode=a
host_perfdata_file_processing_interval=15
host_perfdata_file_processing_command=process-host-perfdata-file-pnp4
Code: Select all
more /usr/local/nagios/etc/objects/templates.cfg
define host {
name host-pnp
action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=_HOST_' class='tips' rel='/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=_HOST_
register 0
}
define service {
name srv-pnp
action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=$SERVICEDESC$
register 0
}
Code: Select all
more /usr/local/nagios/etc/objects/localhost.cfg
define host{
use linux-server,host-pnp ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the linux-server host template definition.
host_name localhost
alias localhost
address 127.0.0.1
}
define service{
use local-service,srv-pnp ; Name of service template to use
host_name localhost
service_description PING
check_command check_ping!100.0,20%!500.0,60%
}
Code: Select all
./check_ping -H localhost -w 100.0,20% -c 500.0,60%
PING OK - Packet loss = 0%, RTA = 0.04 ms|rta=0.039000ms;100.000000;500.000000;0.000000 pl=0%;20;60;0
Code: Select all
ls -ld /usr/local/pnp4nagios/var/spool
drwxrwxr-x 2 nagios nagios 6 dic 14 09:00 /usr/local/pnp4nagios/var/spool
ls -ld /usr/local/pnp4nagios/var/perfdata/
drwxr-xr-x 2 nagios nagios 6 dic 14 16:04 /usr/local/pnp4nagios/var/perfdata/
ll /usr/local/pnp4nagios/var/perfdata/
total 0
Code: Select all
tail -25 /usr/local/pnp4nagios/var/npcd.log
[12-15-2017 12:27:09] NPCD: No more files to process... waiting for 15 seconds
[12-15-2017 12:27:24] NPCD: Found 2 files in /usr/local/pnp4nagios/var/spool
[12-15-2017 12:27:24] NPCD: ThreadCounter 0/5 File is .
[12-15-2017 12:27:24] NPCD: ThreadCounter 0/5 File is ..
[12-15-2017 12:27:24] NPCD: No more files to process... waiting for 15 seconds
[12-15-2017 12:27:39] NPCD: Found 2 files in /usr/local/pnp4nagios/var/spool
[12-15-2017 12:27:39] NPCD: ThreadCounter 0/5 File is .
[12-15-2017 12:27:39] NPCD: ThreadCounter 0/5 File is ..
[12-15-2017 12:27:39] NPCD: No more files to process... waiting for 15 seconds
[12-15-2017 12:27:54] NPCD: Found 2 files in /usr/local/pnp4nagios/var/spool
[12-15-2017 12:27:54] NPCD: ThreadCounter 0/5 File is .
[12-15-2017 12:27:54] NPCD: ThreadCounter 0/5 File is ..
[12-15-2017 12:27:54] NPCD: No more files to process... waiting for 15 seconds
[12-15-2017 12:28:09] NPCD: Found 2 files in /usr/local/pnp4nagios/var/spool
[12-15-2017 12:28:09] NPCD: ThreadCounter 0/5 File is .
[12-15-2017 12:28:09] NPCD: ThreadCounter 0/5 File is ..
[12-15-2017 12:28:09] NPCD: No more files to process... waiting for 15 seconds
[12-15-2017 12:28:24] NPCD: Found 2 files in /usr/local/pnp4nagios/var/spool
[12-15-2017 12:28:24] NPCD: ThreadCounter 0/5 File is .
[12-15-2017 12:28:24] NPCD: ThreadCounter 0/5 File is ..
[12-15-2017 12:28:24] NPCD: No more files to process... waiting for 15 seconds
[12-15-2017 12:28:39] NPCD: Caught Termination Signal - Astalavista... baby
[12-15-2017 12:28:39] NPCD: npcd Daemon (0.6.26) started with PID=19028
[12-15-2017 12:28:39] NPCD: Please have a look at 'npcd -V' to get license information
[12-15-2017 12:28:39] NPCD: HINT: load_threshold is disabled - ('0.000000')
Code: Select all
ll /usr/local/pnp4nagios/var/perfdata.log
ls: no se puede acceder a /usr/local/pnp4nagios/var/perfdata.log: No existe el fichero o el directorio
Best Regards