Page 1 of 1

service-perfdata file

Posted: Tue May 24, 2016 4:29 pm
by paul.jobb
the /var/nagiosramdisk/service-perfdata appears to have filled my ramdisk, I have checked and the npcd service is running and the permissions on the folder look fine. Any suggestions on how to recover that?

Re: service-perfdata file

Posted: Tue May 24, 2016 4:45 pm
by rkennedy
How large of a ram disk do you have currently, and how many host / service checks are you running? It may be worth increasing the size of it.

Re: service-perfdata file

Posted: Tue May 24, 2016 4:47 pm
by paul.jobb
its 500 megabytes , generally on my other servers those files are quite small, so something seems to have working for me on this particular server. I tried restart npcd but that didnt seem to help

Re: service-perfdata file

Posted: Tue May 24, 2016 4:48 pm
by paul.jobb
the directory looks like this

drwxrwxrwt 4 nagios nagios 140 May 24 15:48 .
drwxr-xr-x. 20 root root 4096 Oct 21 2015 ..
-rw-r--r-- 1 nagios nagios 83304448 May 24 15:48 host-perfdata
-rw-r--r-- 1 nagios nagios 4954790 May 12 14:20 objects.cache
-rw-r--r-- 1 nagios nagios 435941376 May 24 15:48 service-perfdata
drwxrwxr-x 5 nagios nagios 100 Apr 25 13:40 spool
drwxrwxr-x 2 nagios nagios 40 May 24 13:52 tmp

Re: service-perfdata file

Posted: Tue May 24, 2016 5:07 pm
by rkennedy
How many hosts / services are you running on the server? Can you PM over a profile for us to look at? (Admin -> System Profile -> Download Profile)

Re: service-perfdata file

Posted: Tue May 24, 2016 5:14 pm
by paul.jobb
Thanks, I emailed you the profile.

I ended up stopping npcd and nagios removing /var/nagiosramdisk/host-perfdata and /var/nagiosramdisk/service-perfdata and restarting the services.

It appears to be behaving more normally now, i.e. the file will be written to and then zeroed out.

Re: service-perfdata file

Posted: Wed May 25, 2016 9:17 am
by rkennedy
Looking at your NPCD log, I noticed a lot of this -

Code: Select all

[05-24-2016 16:08:25] NPCD: ERROR: Executed command exits with return code '7'
[05-24-2016 16:08:25] NPCD: ERROR: Command line was '/usr/local/nagios/libexec/process_perfdata.pl -n -b /var/nagiosramdisk/spool/perfdata//1464127685.perfdata.service'
[05-24-2016 16:09:03] NPCD: ERROR: Executed command exits with return code '7'
[05-24-2016 16:09:03] NPCD: ERROR: Command line was '/usr/local/nagios/libexec/process_perfdata.pl -n -b /var/nagiosramdisk/spool/perfdata//1464127715.perfdata.service'
[05-24-2016 16:09:24] NPCD: ERROR: Executed command exits with return code '7'
[05-24-2016 16:09:24] NPCD: ERROR: Command line was '/usr/local/nagios/libexec/process_perfdata.pl -n -b /var/nagiosramdisk/spool/perfdata//1464127745.perfdata.service'
This thread goes over a similar issue, and leads me to believe that increasing your timeout for performance data processing will help. https://support.nagios.com/forum/viewto ... =6&t=21742

In /usr/local/nagios/etc/pnp/process_perfdata.cfg

Change:

Code: Select all

TIMEOUT = 20
To:

Code: Select all

TIMEOUT = 40
Restart npcd:

Code: Select all

service npcd restart

Re: service-perfdata file

Posted: Wed May 25, 2016 3:09 pm
by paul.jobb
Thank you I will look at that then, Everything is operating fine now so I suspect that restarting removing those files and restarting nagios was enough(possibly the restart was all it needed I don't know). I did notice the memory and swap was higher than typical before the restart so maybe a process was stuck...

Anyways I will keep and eye on it and I will try your change if it crops up again. Thankyou for your help, your welcome to close this thread.

Re: service-perfdata file

Posted: Wed May 25, 2016 3:13 pm
by rkennedy
Sometimes all it takes is the magical reboot! Sounds good - should you see an issue in the future feel free to open a new one.