Nagios 4.3.4 + PNP4Nagios 0.6.26 missing RRD files

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
PatanMan
Posts: 3
Joined: Wed Dec 13, 2017 3:58 am

Nagios 4.3.4 + PNP4Nagios 0.6.26 missing RRD files

Post by PatanMan »

Hi guys:

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]:
I have reviewed the configuration several times and I can not find the fault. I paste the configuration files and checks that I have seen in other similar post.

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
I try also

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')
The perfdata.log is not generated

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
I appreciate your help

Best Regards
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios 4.3.4 + PNP4Nagios 0.6.26 missing RRD files

Post by tgriep »

In your post, I did not see the option but the processing of performance data has to be enabled in nagios.cfg by adding the following to the nagios.cfg file and restarting nagios.

Code: Select all

process_performance_data=1
If you do enable it, you will have to wait for a few cycles of the checks to run so they will gather enough information to plot the graphs.
Be sure to check out our Knowledgebase for helpful articles and solutions!
PatanMan
Posts: 3
Joined: Wed Dec 13, 2017 3:58 am

Re: Nagios 4.3.4 + PNP4Nagios 0.6.26 missing RRD files

Post by PatanMan »

tgriep wrote:In your post, I did not see the option but the processing of performance data has to be enabled in nagios.cfg by adding the following to the nagios.cfg file and restarting nagios.

Code: Select all

process_performance_data=1
If you do enable it, you will have to wait for a few cycles of the checks to run so they will gather enough information to plot the graphs.
Hi tgriep:

Thanks for your response.
I already had activated this option in the nagios.cfg

Code: Select all

# 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

Any other idea?

Best regards
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios 4.3.4 + PNP4Nagios 0.6.26 missing RRD files

Post by tgriep »

Make sure the npcd daemon is running and that the configuration settings for npcd are correct.

Check this link for more information on the settings to get PNP4Nagios configured on your system.
https://docs.pnp4nagios.org/pnp-0.6/con ... _with_npcd
Be sure to check out our Knowledgebase for helpful articles and solutions!
PatanMan
Posts: 3
Joined: Wed Dec 13, 2017 3:58 am

Re: Nagios 4.3.4 + PNP4Nagios 0.6.26 missing RRD files

Post by PatanMan »

Hi:

I do a fresh install in a VM and copied the configuration files and now the RRD files appears.

You can close the thread.

Thank you.
kyang

Re: Nagios 4.3.4 + PNP4Nagios 0.6.26 missing RRD files

Post by kyang »

Sounds good! I'll be closing this thread!

If you have any more questions, feel free to create another thread.

Thanks for using the Nagios Support Forum!
Locked