How to Remove Obsolete Metric Trend Values
For each metric (afm_metric_definitions. metric_name) , Archibus collects metric values and records them in the afm_metric_trend_values table.
Over time, the data in the afm_metric_trend_values table will increase, while some of the older metric_values will become obsolete for decision makers. For example, metrics that are tracked daily have daily trends that result in operational decisions for that day, week, or month. They tend not to have long-term impact. Alerts are similar. They tend to point out items that need immediate action that day, week, or month. Alerts for past months aren't relevant anymore - for example. you either renewed that lease or you didn't.
Therefore, you can remove obsolete metric_values from the afm_metric_trend_values table by either deleting them or moving them to an archive table (the afm_hmetric_trend_values table). This is done by setting values for the following two fields for the metric in the Define Metrics view:
- Remove Values Older Than (Days) field
- Remove Method field
By default, the Remove Method is set to Do Not Delete, so if you leave the value at its default setting , that metric is never removed.
To remove obsolete metric trend values:
- From the Define Metrics task, in the Metric Definition view, in the Remove Values Older Than (Days) field, enter the number of days after which you want the application to remove values for the metric from the afm_metric_trend_values table. The default value is 365 days.
- From the Remove Method field, select one of the following:
- 'Delete' to delete the obsolete metrics
- 'Archive' to move them to an archive table. Archiving is useful if you want to keep historical data for audit purposes.
- Click Save.
When the Metric Values Removal Routine runs, it will delete or archive metric values that are older than the selected number of days for that metric, and that have a Remove Method of either Archive or Delete.