pnp4nagios on Oracle linux6.5

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
serouja
Posts: 3
Joined: Mon Jun 23, 2014 5:01 am

pnp4nagios on Oracle linux6.5

Post by serouja »

Hi,
I'm running Oracle Linux 6.5 on a virtualbox, I have installed nagios, nagios plugins and pnp4nagios following the below:

Code: Select all

yum -y install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum -y install nagios-3.5* pnp4nagios-0.6* nagios-plugins-all
setup the configurations as per the sync mode instrunctions, nagios and nagios plugins is working perfectly, but I can't get pnp4nagios charts to appear, it keep showing the error for the host:
perfdata directory "/usr/local/pnp4nagios/var/perfdata/localhost" for host "localhost" does not exist

could you please advice?

thanks
sergey
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: pnp4nagios on Oracle linux6.5

Post by slansing »

When you installed pnp4naigos, where did you point it to look for perfdata directories? I'm not sure where the yum installed version of nagios places all of that, but as an example on a centos/rhel XI installation it would be in:

Code: Select all

/usr/local/nagios/share/perfdata/
Though I believe we intentionally changed that for XI, so it may not be consistent with core.
serouja
Posts: 3
Joined: Mon Jun 23, 2014 5:01 am

Re: pnp4nagios on Oracle linux6.5

Post by serouja »

thanks for your reply, I tried to check the setting by the verify_pnp_config_v2, nagios config at /etc/nagios and pnp4nagios at /etc/pnp4nagios

Code: Select all

perl verify_pnp_config_v2 --mode sync --config=/etc/nagios/nagios.cfg --pnpcfg=/etc/pnp4nagios/
below the output:

Code: Select all

[INFO]  ========== Starting Environment Checks ============
[INFO]  My version is: verify_pnp_config-0.6.22-R.40
[INFO]  Start Options: verify_pnp_config_v2 --mode sync --config=/etc/nagios/nagios.cfg --pnpcfg=/etc/pnp4nagios/
[INFO]  Reading /etc/nagios/nagios.cfg
[OK  ]  Running product is 'nagios'
[OK  ]  object_cache_file is defined
[OK  ]  object_cache_file=/var/log/nagios/objects.cache
[INFO]  Reading /var/log/nagios/objects.cache
[OK  ]  resource_file is defined
[OK  ]  resource_file=/etc/nagios/private/resource.cfg
[INFO]  Reading /etc/nagios/private/resource.cfg
[INFO]  Reading /etc/pnp4nagios//process_perfdata.cfg
[INFO]  Reading /etc/pnp4nagios//pnp4nagios_release
[OK  ]  Found PNP4Nagios version "0.6.20"
[OK  ]  ./configure Options '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linu x-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/et c' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/v ar' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--bindir=/usr/sbin' '--libexecdir=/u sr/libexec/pnp4nagios' '--sysconfdir=/etc/pnp4nagios' '--localstatedir=/var/log/pnp4nagios' '--datadir=/usr/share/nagios/ht ml/pnp4nagios' '--datarootdir=/usr/share/nagios/html/pnp4nagios' '--with-perfdata-dir=/var/lib/pnp4nagios' '--with-perfdata -spool-dir=/var/spool/pnp4nagios' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'target_alias= x86_64-redhat-linux-gnu' 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buff er-size=4 -m64 -mtune=generic'
[OK  ]  Effective User is 'nagios'
[OK  ]  User nagios exists with ID '497'
[OK  ]  Effective group is 'nagios'
[OK  ]  Group nagios exists with ID '496'
[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_v2 line 462.
[OK  ]  Command process-service-perfdata is defined
[OK  ]  '/usr/bin/perl /usr/libexec/pnp4nagios/process_perfdata.pl'
[OK  ]  Command looks good
[OK  ]  Script /usr/libexec/pnp4nagios/process_perfdata.pl is executable
host_perfdata_command at verify_pnp_config_v2 line 462.
[OK  ]  Command process-host-perfdata is defined
[OK  ]  '/usr/bin/perl /usr/libexec/pnp4nagios/process_perfdata.pl -d HOSTPERFDATA'
[OK  ]  Command looks good
[OK  ]  Script /usr/libexec/pnp4nagios/process_perfdata.pl is executable
[INFO]  ========== Starting global checks ============
[OK  ]  status_file is defined
[OK  ]  status_file=/var/log/nagios/status.dat
[INFO]  host_query =
[INFO]  service_query =
[INFO]  Reading /var/log/nagios/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=/var/lib/pnp4nagios
[OK  ]  Perfdata directory '/var/lib/pnp4nagios' exists
[WARN]  1 hosts/services are not providing performance data
[WARN]  'process_perf_data 1' is set for 2 hosts/services which are not providing performance data!
[OK  ]  'process_perf_data 1' is set for 10 of your hosts/services
[INFO]  ==== System sizing ====
[OK  ]  9 hosts/service objects defined
[INFO]  ==== Check statistics ====
[WARN]  Warning: 2, Critical: 0
[WARN]  Checks finished...
also I tried to set the process_perf_data 1 in host/service but still with no luck.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: pnp4nagios on Oracle linux6.5

Post by abrist »

It looks like pnp4nagios is trying to write your perfdata to a directory that does not exist. What is the listing of:

Code: Select all

ls -la /usr/local/pnp4nagios/var/perfdata
ls -lda /usr/local/pnp4nagios/var/perfdata
Did you walk through the full configuration at:
http://docs.pnp4nagios.org/pnp-0.6/config
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
serouja
Posts: 3
Joined: Mon Jun 23, 2014 5:01 am

Re: pnp4nagios on Oracle linux6.5

Post by serouja »

i'm not sure why the sync mode doesn't work, but i got it working perfectly with bulk mode + npcd.

thanks
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: pnp4nagios on Oracle linux6.5

Post by slansing »

Do you actually have those directories? It would be great to see the permissions, is bulk mode fine? Or are you looking to use sync mode? We actually use bulk in nagios XI due to the processing volume.
Locked