Hello,
we have enabled the backend cache feature to decrease the server load due to large amount of running checks.
Following the guide we also mounted the partition to the tmpfs --> https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Unfortunately we have seen that this folder grows without freeing up itself, it only grows and has to be monitored manually to delete those files (xml) manually. We know a reboot will empty this folder since it is mounted to tmpfs but for obvious reason we won't reboot this server so often.
Question: is it something not working or should we implement by our self a crontab to delete the oldest files?
Thanks for your suggestion..
Backend cache folder grows and grows
Re: Backend cache folder grows and grows
Did you make the cache 512MB as suggested on the screen? How many hosts and services are there on the system total? The cache is going to hold data from all the hosts and services and populated as it makes calls so you may need to increase it if you have a very large system.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Backend cache folder grows and grows
Thanks for your reply,
yes I have now expanded the size to 1024, we currently have 1300 hosts and 4500 services checks running.
In any case, it looks like the xml's generated have never been automatically deleted. As you can see by the img attached, the trend is only growing until I have deleted manually on 23rd of Jan. and after that day is going up again...
yes I have now expanded the size to 1024, we currently have 1300 hosts and 4500 services checks running.
In any case, it looks like the xml's generated have never been automatically deleted. As you can see by the img attached, the trend is only growing until I have deleted manually on 23rd of Jan. and after that day is going up again...
You do not have the required permissions to view the files attached to this post.
Re: Backend cache folder grows and grows
I confirmed with dev that it will not delete cached files. Periodically deleting the files may be necessary, but as it caches every unique call, it should eventually level off.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Backend cache folder grows and grows
Understood,
will you provide an official script or an update release to automatize the deletion process?
Thanks
will you provide an official script or an update release to automatize the deletion process?
Thanks
Re: Backend cache folder grows and grows
Unfortunately, we don't have such a script. However, you could set up a cron job to delete files, older than x days, e.g. a week.
This is just an example. Modify it to match your environment.
Let us know if you have any further questions.
This is just an example. Modify it to match your environment.
Code: Select all
0 0 * * 0 /usr/bin/find /usr/local/nagiosxi/tmp/backendcache -type f -mtime +7 -name '*.xml' -execdir rm -- '{}' \;Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Backend cache folder grows and grows
Thanks,
the example above does not go trough the subfolders where the xml resides.
I added this code which will delete the folders instead:
Thanks for your support.
the example above does not go trough the subfolders where the xml resides.
I added this code which will delete the folders instead:
Code: Select all
/usr/bin/find /usr/local/nagiosxi/tmp/backendcache/* -mtime +30 -type d -exec rm -rf {} \;
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Backend cache folder grows and grows
Looks good. Thanks for sharingsgargano wrote:Thanks,
the example above does not go trough the subfolders where the xml resides.
I added this code which will delete the folders instead:Thanks for your support.Code: Select all
/usr/bin/find /usr/local/nagiosxi/tmp/backendcache/* -mtime +30 -type d -exec rm -rf {} \;