pnp4nagios not working since core 4 upgrade

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
AndyR
Posts: 4
Joined: Tue Apr 30, 2013 6:58 pm

pnp4nagios not working since core 4 upgrade

Post by AndyR »

Hey,
Was using Nagios Core 3.5 for over 12 months along with pnp4nagios 0.6.21 I think in sync mode. All was working fine until last week I upgraded Nagios Core to 4.0.8. The upgrade went fine but today I noticed pnp4nagios although it looks to be working and shows me historical data, isn't recording any new info?

I downloaded the verify script and this is what I get.

Code: Select all

[root@wexnz-nagios pnp4nagios]# ./verify_pnp_config --mode sync --config=/usr/local/nagios/etc/nagios.cfg --pnpcfg=/usr/local/pnp4nagios/etc/
[INFO]  ========== Starting Environment Checks ============
[INFO]  My version is: verify_pnp_config-0.6.24-R.40
[INFO]  Start Options: ./verify_pnp_config --mode sync --config=/usr/local/nagios/etc/nagios.cfg --pnpcfg=/usr/local/pnp4nagios/etc/
[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.21"
[OK  ]  ./configure Options '--with-httpd-conf=/etc/httpd/conf.d'
[OK  ]  Effective User is 'nagios'
[OK  ]  User nagios exists with ID '500'
[OK  ]  Effective group is 'nagios'
[OK  ]  Group nagios exists with ID '501'
[INFO]  ========== Checking Sync Mode Config  ============
[OK  ]  process_performance_data is 1 compared with '/1/'
[OK  ]  enable_environment_macros is 1 compared with '/1/'
[OK  ]  service_perfdata_command is defined
[OK  ]  service_perfdata_command=process-service-perfdata
[OK  ]  host_perfdata_command is defined
[OK  ]  host_perfdata_command=process-host-perfdata
[INFO]  Nagios config looks good so far
[INFO]  ========== Checking config values ============
service_perfdata_command at ./verify_pnp_config line 462.
[OK  ]  Command process-service-perfdata is defined
[OK  ]  '/usr/bin/perl /usr/local/pnp4nagios/libexec/process_perfdata.pl'
[OK  ]  Command looks good
[OK  ]  Script /usr/local/pnp4nagios/libexec/process_perfdata.pl is executable
host_perfdata_command at ./verify_pnp_config line 462.
[OK  ]  Command process-host-perfdata is defined
[OK  ]  '/usr/bin/perl /usr/local/pnp4nagios/libexec/process_perfdata.pl -d HOSTPERFDATA'
[OK  ]  Command looks good
[OK  ]  Script /usr/local/pnp4nagios/libexec/process_perfdata.pl is executable
[INFO]  ========== Starting global checks ============
[OK  ]  status_file is defined
[OK  ]  status_file=/usr/local/nagios/var/status.dat
[INFO]  host_query =
[INFO]  service_query =
[INFO]  Reading /usr/local/nagios/var/status.dat
[INFO]  ==== Starting rrdtool checks ====
[OK  ]  RRDTOOL is defined
[OK  ]  RRDTOOL=/usr/bin/rrdtool
[OK  ]  /usr/bin/rrdtool is executable
[OK  ]  RRDtool 1.3.8  Copyright 1997-2009 by Tobias Oetiker <[email protected]>
[OK  ]  USE_RRDs is defined
[OK  ]  USE_RRDs=1
[WARN]  Perl RRDs modules are not loadable
[INFO]  ==== Starting directory checks ====
[OK  ]  RRDPATH is defined
[OK  ]  RRDPATH=/usr/local/pnp4nagios/var/perfdata
[OK  ]  Perfdata directory '/usr/local/pnp4nagios/var/perfdata' exists
[WARN]  166 hosts/services are not providing performance data
[WARN]  'process_perf_data 1' is set for 167 hosts/services which are not providing performance data!
[OK  ]  'process_perf_data 1' is set for 761 of your hosts/services
[INFO]  ==== System sizing ====
[OK  ]  760 hosts/service objects defined
[HINT]  Use at least mode 'bulk+npcd' to reduce I/O
[INFO]  ==== Check statistics ====
[WARN]  Warning: 3, Critical: 0
[WARN]  Checks finished...
Now all my paths look OK and like I say, pnp4nagios can see historical data like the monthtly/yearly graphs and let me drill down OK, its just new data coming in. One thing that jumps out at me from the verify script is:-

Code: Select all

[WARN]  Perl RRDs modules are not loadable
Not sure why this came up, so I did a yum install rrdtool-perl and now this clears OK but still doesn;t work?

Code: Select all

[root@wexnz-nagios pnp4nagios]# ./verify_pnp_config --mode sync --config=/usr/local/nagios/etc/nagios.cfg --pnpcfg=/usr/local/pnp4nagios/etc/
[INFO]  ========== Starting Environment Checks ============
[INFO]  My version is: verify_pnp_config-0.6.24-R.40
[INFO]  Start Options: ./verify_pnp_config --mode sync --config=/usr/local/nagios/etc/nagios.cfg --pnpcfg=/usr/local/pnp4nagios/etc/
[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.21"
[OK  ]  ./configure Options '--with-httpd-conf=/etc/httpd/conf.d'
[OK  ]  Effective User is 'nagios'
[OK  ]  User nagios exists with ID '500'
[OK  ]  Effective group is 'nagios'
[OK  ]  Group nagios exists with ID '501'
[INFO]  ========== Checking Sync Mode Config  ============
[OK  ]  process_performance_data is 1 compared with '/1/'
[OK  ]  enable_environment_macros is 1 compared with '/1/'
[OK  ]  service_perfdata_command is defined
[OK  ]  service_perfdata_command=process-service-perfdata
[OK  ]  host_perfdata_command is defined
[OK  ]  host_perfdata_command=process-host-perfdata
[INFO]  Nagios config looks good so far
[INFO]  ========== Checking config values ============
service_perfdata_command at ./verify_pnp_config line 462.
[OK  ]  Command process-service-perfdata is defined
[OK  ]  '/usr/bin/perl /usr/local/pnp4nagios/libexec/process_perfdata.pl'
[OK  ]  Command looks good
[OK  ]  Script /usr/local/pnp4nagios/libexec/process_perfdata.pl is executable
host_perfdata_command at ./verify_pnp_config line 462.
[OK  ]  Command process-host-perfdata is defined
[OK  ]  '/usr/bin/perl /usr/local/pnp4nagios/libexec/process_perfdata.pl -d HOSTPERFDATA'
[OK  ]  Command looks good
[OK  ]  Script /usr/local/pnp4nagios/libexec/process_perfdata.pl is executable
[INFO]  ========== Starting global checks ============
[OK  ]  status_file is defined
[OK  ]  status_file=/usr/local/nagios/var/status.dat
[INFO]  host_query =
[INFO]  service_query =
[INFO]  Reading /usr/local/nagios/var/status.dat
[INFO]  ==== Starting rrdtool checks ====
[OK  ]  RRDTOOL is defined
[OK  ]  RRDTOOL=/usr/bin/rrdtool
[OK  ]  /usr/bin/rrdtool is executable
[OK  ]  RRDtool 1.3.8  Copyright 1997-2009 by Tobias Oetiker <[email protected]>
[OK  ]  USE_RRDs is defined
[OK  ]  USE_RRDs=1
[OK  ]  Perl RRDs modules are loadable
[INFO]  ==== Starting directory checks ====
[OK  ]  RRDPATH is defined
[OK  ]  RRDPATH=/usr/local/pnp4nagios/var/perfdata
[OK  ]  Perfdata directory '/usr/local/pnp4nagios/var/perfdata' exists
[WARN]  166 hosts/services are not providing performance data
[WARN]  'process_perf_data 1' is set for 167 hosts/services which are not providing performance data!
[OK  ]  'process_perf_data 1' is set for 761 of your hosts/services
[INFO]  ==== System sizing ====
[OK  ]  760 hosts/service objects defined
[HINT]  Use at least mode 'bulk+npcd' to reduce I/O
[INFO]  ==== Check statistics ====
[WARN]  Warning: 2, Critical: 0
[WARN]  Checks finished...
I'm thinking it might be soemthing to do with

Code: Select all

[WARN]  166 hosts/services are not providing performance data
[WARN]  'process_perf_data 1' is set for 167 hosts/services which are not providing performance data!
so assume this is a change the 4.0.8 upgrade did to my config files? Any suggestions?
Thanks!

Andy
AndyR
Posts: 4
Joined: Tue Apr 30, 2013 6:58 pm

Re: pnp4nagios not working since core 4 upgrade

Post by AndyR »

OK, fixed this myself.

Turns out the problem was that pnp4nagios doesn't work in syncronous mode with nagios core 4.x. I found a load of errors in my Nagios event log relating to the service perfdata worker failing. Then I found this entry on another forum - http://www.monitoring-portal.org/wbb/in ... adID=29625 where someone had the same problem, and was able to resolve it by changing from sync to bulk+npcd. Once I did that the graphs have started working again and my event log is much happier!

Hope this helps someone else :)
Locked