pnp4nagios installed correctly but isn't populating rrd data

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
majed
Posts: 98
Joined: Mon Mar 17, 2014 5:29 am

pnp4nagios installed correctly but isn't populating rrd data

Post by majed »

pnp version: pnp4nagios-0.6.24
nagios 4.0.8
system 3.14.16-gentoo

error message:

Code: Select all

perfdata directory "/usr/local/pnp4nagios/var/perfdata/terminal" for host "terminal" does not exist. <a href="http://docs.pnp4nagios.org/faq/5">Read FAQ online</a>
in apache error log :

Code: Select all

File does not exist: /usr/local/nagios/share/images/logos/base, referer: http://10.33.0.7/nagios/cgi-bin/status.cgi?host=all
in nagios.log:

Code: Select all

Warning: File '/var/nagios/perfdata.log' could not be opened - service performance data will not be written to file!
Why isn't pnp4nagios creating rrd files?
i have cacti installed and it is using rrd and graphs show so why does it work for cacti but not for nagios on the same system? i also have ndo2db installed.
Seek and you shall find, knock and it shall be opened, cry and you shall find comfort
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: pnp4nagios installed correctly but isn't populating rrd

Post by abrist »

Did you read the FAQ entry linked in the error message?
perfdata-dir-for-host

PNP was called with a host in the URL.

Example:

http://<nagios-server>/pnp4nagios/graph?host=<this-host>

The resulting path to the perfdata directory could not be found.

The path is shown in the error message.

var/perfdata/<this-host> will be created by process_perfdata.pl when it processes performance data for this host.

If this directory does not exist there are several possible causes:

Passing an incorrect host name in the URL
The host has no valid performance data
None of the services has valid performance data
Is the host returning valid performance data?
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.
majed
Posts: 98
Joined: Mon Mar 17, 2014 5:29 am

Re: pnp4nagios installed correctly but isn't populating rrd

Post by majed »

well the path is

Code: Select all

/usr/local/pnp4nagios/var/perfdata/terminal
and the perfdata directory is empty.
the service or host is for ping which has valid perfdata.

Code: Select all

Performance Data:	rta=23.295000ms;5000.000000;5000.000000;0.000000 pl=0%;100;100;0
mrtg is not displaying graphs either, no rrd files in it's directory either. i suspect rrdtool is just generating rrds for cacti and not working for nagios and mrtg and ndo.
Seek and you shall find, knock and it shall be opened, cry and you shall find comfort
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: pnp4nagios installed correctly but isn't populating rrd

Post by abrist »

It could be permissions related:

Code: Select all

ls -la /usr/local/pnp4nagios/var/perfdata/terminal
ls -lad /usr/local/pnp4nagios/var/perfdata/
ls -lad /usr/local/pnp4nagios/var/
grep nag /etc/group
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.
majed
Posts: 98
Joined: Mon Mar 17, 2014 5:29 am

Re: pnp4nagios installed correctly but isn't populating rrd

Post by majed »

Code: Select all

 ls -la /usr/local/pnp4nagios/var/perfdata/terminal
ls: cannot access /usr/local/pnp4nagios/var/perfdata/terminal: No such file or directory

Code: Select all

gentoo ~ # ls -lad /usr/local/pnp4nagios/var/perfdata/
drwxr-xr-x 2 nagios nagios 4096 Aug 21 03:11 /usr/local/pnp4nagios/var/perfdata/

Code: Select all

gentoo ~ # ls -lad /usr/local/pnp4nagios/var/
drwxr-xr-x 6 nagios nagios 4096 Aug 21 03:11 /usr/local/pnp4nagios/var/

Code: Select all

gentoo ~ # grep nag /etc/group
nagios:x:1000:apache
nagcmd:x:1001:nagios,apache,cacti
i haven't changed the default owner, group.
Seek and you shall find, knock and it shall be opened, cry and you shall find comfort
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: pnp4nagios installed correctly but isn't populating rrd

Post by abrist »

Could you post your nagios.cfg? At this point, it may be an issue with the performance commands as the permissions and groups look fine.
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.
majed
Posts: 98
Joined: Mon Mar 17, 2014 5:29 am

Re: pnp4nagios installed correctly but isn't populating rrd

Post by majed »

apparently nagios 4 and pnp4nagios don't work in sync mode. Who has the same problem or would like to see the solution visit
http://www.monitoring-portal.org/wbb/in ... post208014
Seek and you shall find, knock and it shall be opened, cry and you shall find comfort
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: pnp4nagios installed correctly but isn't populating rrd

Post by abrist »

Thanks for the heads up. Most often, I see people use bulk mode with npcd.
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.
Locked