Page 2 of 2
Re: performance data empty
Posted: Sat Dec 17, 2016 1:29 am
by sneppie
Hi, sent you a pm again.
I'll wait before changing to sync. Please let me know if you want me to switch
Re: performance data empty
Posted: Mon Dec 19, 2016 2:44 am
by sneppie
Hi there,
Worked further on the issue. As mentioned NPCD copies all performance data to:
/usr/local/pnp4nagios/var/perfdata/.pnp-internal.
I manually copied the entire folder to:
/usr/local/pnp4nagios/var/perfdata/localhost.
Performance data in PNP4Nagios is now shown correctly
I think problem is caused by:
/usr/local/pnp4nagios/libexec/process_perfdata.pl. I don have any code knowledge. Can anyone help me out?
Re: performance data empty
Posted: Mon Dec 19, 2016 11:16 am
by rkennedy
Performance data in PNP4Nagios is now shown correctly
What issue are you experiencing at this point?
Re: performance data empty
Posted: Mon Dec 19, 2016 11:45 am
by dwhitfield
sneppie wrote:
Performance data in PNP4Nagios is now shown correctly
I received your PM when I came in this morning. It sounds like I don't need to take a look at it though. Is that correct?
Re: performance data empty
Posted: Tue Dec 20, 2016 1:46 am
by sneppie
It's only working when i MANUALLY copy the ../.pnp-local folder to ../localhost. The script process_perfdata.pl is coping the performance data from the spool folder to /usr/local/pnp4nagios/var/perfdata/.pnp-internal, which is a hidden folder and not found by PNP4Nagios.
Can I change something in the script so the performance data is copied to /usr/local/pnp4nagios/var/perfdata/localhost?
Re: performance data empty
Posted: Tue Dec 20, 2016 2:40 pm
by tgriep
It looks like the settings in the nagios.cfg file are not correct in the host and service performance data section and that could be causing the issue.
I am guessing that you are trying to setup bulk mode with NPCD for your server and the link below has the instructions for the settings that have to be in the nagios.cfg file.
https://docs.pnp4nagios.org/pnp-0.6/con ... _with_npcd
Go through it and verify that the nagios.cfg file and the commands.cfg files match the example.
Re: performance data empty
Posted: Sat Dec 24, 2016 4:11 am
by sneppie
I was working on the wrong side of the issue. I focused on .pnp-internal, but that's just the performance data of PNP4Nagios itself.
I rechecket nagios.cfg. It seems the perfdata_file_templates are incorrect. I was using the config as described in the guide, but it was not generating correct performance data. I changed the settings, now it is generating readable data.
Config in guide:
Code: Select all
host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$
service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$
My config:
Code: Select all
host_perfdata_file_template=[HOSTPERFDATA]\t$TIMET$\t$HOSTNAME$\t$HOSTPERFDATA$\t$HOSTCHECKCOMMAND$\t$HOSTSTATE$\t$HOSTSTATETYPE$
service_perfdata_file_template=[SERVICEPERFDATA]\t$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICEPERFDATA$\t$SERVICECHECKCOMMAND$\t$HOSTSTATE$\t$HOSTSTATETYPE$\t$SERVICESTATE$\t$SERVICESTATETYPE$
Unfortunatly this data is still not recognized by PNP4Nagios:
service-perfdata.1482569831:
Code: Select all
[SERVICEPERFDATA] 1482569011 localhost Temperature HDD /dev/sdd check_hddtemp!/dev/sdd!40!50 UP HARD OK HARD
[SERVICEPERFDATA] 1482569161 localhost Temperature CPU CPU Temperature: +33.0°C (high = +60.0°C, crit = +75.0°C) check_cputemp!60!75 UP HARD OK HARD
[SERVICEPERFDATA] 1482569165 localhost Total Processes procs=93;250;400;0; check_local_procs!250!400!RSZDT UP HARD OK HARD
[SERVICEPERFDATA] 1482569191 localhost Swap Usage swap=8145MB;0;0;0;8187 check_local_swap!20!10 UP HARD OK HARD
[SERVICEPERFDATA] 1482569201 localhost Current Users users=2;20;50;0 check_local_users!20!50 UP HARD OK HARD
[SERVICEPERFDATA] 1482569201 localhost Temperature Motherboard MB Temperature: +34.0°C (high = +45.0°C, crit = +75.0°C) check_mbtemp!45!75 UP HARD OK HARD
[SERVICEPERFDATA] 1482569219 localhost Current Load load1=0.120;5.000;10.000;0; load5=0.200;4.000;6.000;0; load15=0.130;3.000;4.000;0; check_local_load!5.0,4.0,3.0!10.0,6.0,4.0 UP HARD OK HARD
[SERVICEPERFDATA] 1482569241 localhost Root Partition /=27979MB;47065;52948;0;58832 check_local_disk!20%!10%!/ UP HARD OK HARD
[SERVICEPERFDATA] 1482569465 localhost Total Processes procs=93;250;400;0; check_local_procs!250!400!RSZDT UP HARD OK HARD
[SERVICEPERFDATA] 1482569491 localhost Swap Usage swap=8145MB;0;0;0;8187 check_local_swap!20!10 UP HARD OK HARD
[SERVICEPERFDATA] 1482569501 localhost Current Users users=2;20;50;0 check_local_users!20!50 UP HARD OK HARD
[SERVICEPERFDATA] 1482569519 localhost Current Load load1=0.090;5.000;10.000;0; load5=0.110;4.000;6.000;0; load15=0.110;3.000;4.000;0; check_local_load!5.0,4.0,3.0!10.0,6.0,4.0 UP HARD OK HARD
[SERVICEPERFDATA] 1482569541 localhost Root Partition /=27979MB;47065;52948;0;58832 check_local_disk!20%!10%!/ UP HARD OK HARD
[SERVICEPERFDATA] 1482569746 localhost Bandwidth InUsage=0.00%;150000000;200000000 OutUsage=0.00%;150000000;200000000 inBandwidth=0.01Mbs outBandwidth=0.00Mbs in=10528;150000000;200000000 in=4644;150000000;200000000 check_bandwidth UP HARD OK HARD
[SERVICEPERFDATA] 1482569765 localhost Total Processes procs=95;250;400;0; check_local_procs!250!400!RSZDT UP HARD OK HARD
[SERVICEPERFDATA] 1482569791 localhost Swap Usage swap=8145MB;0;0;0;8187 check_local_swap!20!10 UP HARD OK HARD
[SERVICEPERFDATA] 1482569791 localhost Temperature HDD /dev/sda check_hddtemp!/dev/sda!40!50 UP HARD OK HARD
[SERVICEPERFDATA] 1482569801 localhost Current Users users=2;20;50;0 check_local_users!20!50 UP HARD OK HARD
[SERVICEPERFDATA] 1482569819 localhost Current Load load1=0.070;5.000;10.000;0; load5=0.080;4.000;6.000;0; load15=0.100;3.000;4.000;0; check_local_load!5.0,4.0,3.0!10.0,6.0,4.0 UP HARD OK HARD
[SERVICEPERFDATA] 1482569831 localhost Temperature HDD /dev/sdb check_hddtemp!/dev/sdb!40!50 UP HARD OK HARD
perfdata.log:
Code: Select all
2016-12-24 09:57:48 [15750] [1] /usr/local/pnp4nagios/var/spool/host-perfdata.1482569831-PID-15750 deleted
2016-12-24 09:57:48 [15750] [1] PNP exiting (runtime 0.000457s) ...
2016-12-24 09:57:48 [15755] [2] Using Config File /usr/local/pnp4nagios/etc/process_perfdata.cfg parameters
2016-12-24 09:57:48 [15755] [2] Default Timeout: 15 secs.
2016-12-24 09:57:48 [15755] [2] Config Timeout: 60 secs.
2016-12-24 09:57:48 [15755] [2] Actual Timeout: 60 secs.
2016-12-24 09:57:48 [15755] [1] process_perfdata.pl-0.6.25 starting in BULK Mode called by NPCD
2016-12-24 09:57:48 [15755] [2] searching for /usr/local/pnp4nagios/var/spool/service-perfdata.1482569831
2016-12-24 09:57:48 [15755] [2] renaming /usr/local/pnp4nagios/var/spool/service-perfdata.1482569831 to /usr/local/pnp4nagios/var/spool/service-perfdata.1482569831-PID-15755 for bulk update
2016-12-24 09:57:48 [15755] [2] reading /usr/local/pnp4nagios/var/spool/service-perfdata.1482569831-PID-15755 for bulk update
2016-12-24 09:57:48 [15755] [2] Processing Line 1
2016-12-24 09:57:48 [15755] [2] Datatype set to 'SERVICEPERFDATA'
2016-12-24 09:57:48 [15755] [2] No Perfdata. Skipping line 1
2016-12-24 09:57:48 [15755] [2] Processing Line 2
2016-12-24 09:57:48 [15755] [2] Datatype set to 'SERVICEPERFDATA'
2016-12-24 09:57:48 [15755] [2] No Perfdata. Skipping line 2
2016-12-24 09:57:48 [15755] [2] Processing Line 3
2016-12-24 09:57:48 [15755] [2] Datatype set to 'SERVICEPERFDATA'
2016-12-24 09:57:48 [15755] [2] No Perfdata. Skipping line 3
2016-12-24 09:57:48 [15755] [2] Processing Line 4
2016-12-24 09:57:48 [15755] [2] Datatype set to 'SERVICEPERFDATA'
2016-12-24 09:57:48 [15755] [2] No Perfdata. Skipping line 4
2016-12-24 09:57:48 [15755] [2] Processing Line 5
2016-12-24 09:57:48 [15755] [2] Datatype set to 'SERVICEPERFDATA'
2016-12-24 09:57:48 [15755] [2] No Perfdata. Skipping line 5
2016-12-24 09:57:48 [15755] [2] Processing Line 6
2016-12-24 09:57:48 [15755] [2] Datatype set to 'SERVICEPERFDATA'
2016-12-24 09:57:48 [15755] [2] No Perfdata. Skipping line 6
2016-12-24 09:57:48 [15755] [2] Processing Line 7
2016-12-24 09:57:48 [15755] [2] Datatype set to 'SERVICEPERFDATA'
2016-12-24 09:57:48 [15755] [2] No Perfdata. Skipping line 7
2016-12-24 09:57:48 [15755] [2] Processing Line 8
2016-12-24 09:57:48 [15755] [2] Datatype set to 'SERVICEPERFDATA'
2016-12-24 09:57:48 [15755] [2] No Perfdata. Skipping line 8
2016-12-24 09:57:48 [15755] [2] Processing Line 9
2016-12-24 09:57:48 [15755] [2] Datatype set to 'SERVICEPERFDATA'
2016-12-24 09:57:48 [15755] [2] No Perfdata. Skipping line 9
2016-12-24 09:57:48 [15755] [2] Processing Line 10
2016-12-24 09:57:48 [15755] [2] Datatype set to 'SERVICEPERFDATA'
2016-12-24 09:57:48 [15755] [2] No Perfdata. Skipping line 10
2016-12-24 09:57:48 [15755] [2] Processing Line 11
2016-12-24 09:57:48 [15755] [2] Datatype set to 'SERVICEPERFDATA'
2016-12-24 09:57:48 [15755] [2] No Perfdata. Skipping line 11
2016-12-24 09:57:48 [15755] [2] Processing Line 12
2016-12-24 09:57:48 [15755] [2] Datatype set to 'SERVICEPERFDATA'
2016-12-24 09:57:48 [15755] [2] No Perfdata. Skipping line 12
2016-12-24 09:57:48 [15755] [2] Processing Line 13
2016-12-24 09:57:48 [15755] [2] Datatype set to 'SERVICEPERFDATA'
2016-12-24 09:57:48 [15755] [2] No Perfdata. Skipping line 13
2016-12-24 09:57:48 [15755] [2] Processing Line 14
2016-12-24 09:57:48 [15755] [2] Datatype set to 'SERVICEPERFDATA'
2016-12-24 09:57:48 [15755] [2] No Perfdata. Skipping line 14
2016-12-24 09:57:48 [15755] [2] Processing Line 15
2016-12-24 09:57:48 [15755] [2] Datatype set to 'SERVICEPERFDATA'
2016-12-24 09:57:48 [15755] [2] No Perfdata. Skipping line 15
2016-12-24 09:57:48 [15755] [2] Processing Line 16
2016-12-24 09:57:48 [15755] [2] Datatype set to 'SERVICEPERFDATA'
2016-12-24 09:57:48 [15755] [2] No Perfdata. Skipping line 16
2016-12-24 09:57:48 [15755] [2] Processing Line 17
2016-12-24 09:57:48 [15755] [2] Datatype set to 'SERVICEPERFDATA'
2016-12-24 09:57:48 [15755] [2] No Perfdata. Skipping line 17
2016-12-24 09:57:48 [15755] [2] Processing Line 18
2016-12-24 09:57:48 [15755] [2] Datatype set to 'SERVICEPERFDATA'
2016-12-24 09:57:48 [15755] [2] No Perfdata. Skipping line 18
2016-12-24 09:57:48 [15755] [2] Processing Line 19
2016-12-24 09:57:48 [15755] [2] Datatype set to 'SERVICEPERFDATA'
2016-12-24 09:57:48 [15755] [2] No Perfdata. Skipping line 19
2016-12-24 09:57:48 [15755] [2] Processing Line 20
2016-12-24 09:57:48 [15755] [2] Datatype set to 'SERVICEPERFDATA'
2016-12-24 09:57:48 [15755] [2] No Perfdata. Skipping line 20
2016-12-24 09:57:48 [15755] [1] 20 lines processed
2016-12-24 09:57:48 [15755] [1] /usr/local/pnp4nagios/var/spool/service-perfdata.1482569831-PID-15755 deleted
2016-12-24 09:57:48 [15755] [1] PNP exiting (runtime 0.001614s) ...
Can anybody show me the correct format?
Re: performance data empty
Posted: Tue Dec 27, 2016 11:05 am
by tgriep
What you could try is to set all of the configuration settings to the default settings for the template settings and then delete all of the .rrd and .xml files so they will regenerate with the new settings.
Try that and see if that works for you.
Re: performance data empty
Posted: Wed Jan 11, 2017 1:35 pm
by sneppie
Hi,
Changed the templates back to standard. PNP4Nagios is working ok now.
Thanks for your help
Re: performance data empty
Posted: Wed Jan 11, 2017 1:41 pm
by dwhitfield
It sounds like this issue has been resolved. Is it okay if we lock this thread? Thanks for choosing the Nagios forums!