The Portal purges metrics data on a daily basis. The schedule is controlled by the Portal's Scheduler plugin.
Hourly metric data older than X days is removed and quarter hourly metric data older than 1 day is removed each time that the purger task is run. X is configurable using the PURGER_NUM_DAYS configuration property in the following file:
/opt/Deployments/lrs/server/webapps/ROOT/plugins/lrsgateway-conf.xmlIf a property named
PURGER_NUM_DAYS is not present in the file, the default value of 60 is used which means the Portal will hold 60 days of metrics data.
If the metrics purge functionality is successful, the following log entries should be seen (as an example) at approximately 00:15 of every day:
05/15 00:15:00.007 INFO (SimpleThreadPoolWorker-8:) - Purging data with resolution=1 that is 60 day(s) older than Tue May 15 00:15:00 JST 2018 (period start less than or equal to 1521126900001) in batches of 100. 05/15 00:15:00.008 INFO (SimpleThreadPoolWorker-8:) - Finished purging data If the PURGER_NUM_DAYS is missing in the file noted above, it can be added like so:
- The following should be added in the <Properties> node of the lrsgateway-conf.xml file: <Property name="PURGER_NUM_DAYS">X</Property>
- Change X to represent the number of days desired for keeping metrics data in the environment ("60" by default)
- Restart the API Portal node. The restart is required for the new property to be recognized by the application.