Page 1 of 1

reduce the size of the perfdata folder?

Posted: Tue Jul 30, 2019 7:26 am
by jenstar13
Hi,
our perfdata folder has grown quite large. Is there a way to reduce the size of the perfdata kept?
is there a "flush everything after xx days" ?

or some other way to reduce the size?
I'm upgrading the XI interface and saw our sidk space was at 79%, and we alert at 80%

Thank you in advance
Jen

Re: reduce the size of the perfdata folder?

Posted: Tue Jul 30, 2019 8:47 am
by tgriep
If you want to clean out the old performance data files left over from system that are no longer on the server, you can run the following 2 commands to remove any file older than 60 days.

Code: Select all

find /usr/local/nagios/share/perfdata/ -type f -mtime +60 -name '*.rrd' -execdir rm -- {} \;
find /usr/local/nagios/share/perfdata/ -type f -mtime +60 -name '*.xml' -execdir rm -- {} \;
You can adjust the numbers of days to what you want.

Make sure you have a full backup of that folder in case you need to go back and restore the files.

Re: reduce the size of the perfdata folder?

Posted: Tue Jul 30, 2019 9:58 am
by jenstar13
but in other cases, you are saying that I'm going to have to extend the size of my disk? What size disk do you recommend for a nagios that is used heavily. We started out with 50 gig

Re: reduce the size of the perfdata folder?

Posted: Tue Jul 30, 2019 10:04 am
by tgriep
The files are pretty much a fixed size depending on the number of datapoints the check is running.
Typically they are 500K to 1.5Meg in size.
You can use that to calculate how much more space to add.

They do not grow as they are a round robin database to old data gets removed as new is put in.

Now if you add more and more checks, that will add additional files to the perfdata folder and increase the size.
If you are not planing to add a lot more checks to the system, you would have to increase it much if at all.

Re: reduce the size of the perfdata folder?

Posted: Tue Jul 30, 2019 10:09 am
by jenstar13
ok thank you, you can close the ticket