Details
-
Type:
Bug
-
Status: Resolved (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Component/s: monitoring-plugin
-
Labels:
-
Similar Issues:
Description
System.setProperty("javamelody.storage-directory", "/" + new File(Hudson.getInstance().getRootDir(), "monitoring").getAbsolutePath());
sets up this directory for storage, but apparently never trims old records. This is pretty bad since the directory can get quite large and consume a lot of disk space. Suggest creating an AsyncPeriodicWork to clean out old records (say, those over a month old) on a regular basis (say, daily).
I have just seen this issue.
In fact, old records (obsolete files) are already cleaned on a daily basis.
You can trigger manually a clean by calling http://<host>/monitoring?action=purge_obsolete_files and http://<host>/monitoring/nodes?action=purge_obsolete_files
(this is probably not necessary since this is done automatically every midnight, if the server is up at that time).
For information and storage planning:
The rrd files are considered obsolete if they are not updated since 3 months.
The zip files are considered obsolete after a year.
Note that v1.44 of the monitoring plugin has reduced the disk space by better aggregation of http requests like /adjuncts/... and /$stapler/bound/... (3 months are needed after installation of v1.44 for obsolete rrd files to be deleted).
Given the particular plugins and values in the http requests in your jenkins server, the http requests in the monitoring statistics may use better aggregation.