service-perfdata file

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

service-perfdata file

Post 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?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: service-perfdata file

Post 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.
Former Nagios Employee
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

Re: service-perfdata file

Post 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
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

Re: service-perfdata file

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: service-perfdata file

Post 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)
Former Nagios Employee
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

Re: service-perfdata file

Post 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.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: service-perfdata file

Post 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
Former Nagios Employee
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

Re: service-perfdata file

Post 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.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: service-perfdata file

Post 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.
Former Nagios Employee
Locked