How to Modify the Retention Time for Metric Data in EM13c

Some Enterprise Manager customers, complain about the high volume of data stored in OMS repository. Enterprise Manager agents collect metric data of targets they monitor, and upload these “raw” metric data to OMS. Depending on your metric collection periods and number of targets, the volume required to keep these data can be very huge. Enterprise Manager has already a mechanism to minimize the size of the Management Repository. Once a day, the previous day’s metric data (which is stored in em_metric_values) is aggregated into a one-hour and a one-day table (em_metric_values_hourly, em_metric_values_daily). According to the retention settings, both raw metric data and aggregated data are purged.

The default retention time for raw metric data is set to 7 days. The default retention time for hourly aggregate metric data is set to 31 days, and the default retention time for daily aggregate data is set 12 months. You can check the current retention using get_retention function in the gc_interval_partition_mgr package:

You can also directly query the em_int_partitioned_tables but the table names can be slightly different depending on the version of Enterprise Manager. For example, for EM13c, you need to add “_E” to the table names.

If you have problem with the size of the Management Repository. you can modify the retention for metric tables using set_retention procedure of the gc_interval_partition_mgr package:

Although I share this information, I recommend you to not to modify the retention time of raw metric data. Maybe you can modify retention time for hourly and daily aggregated data. The best way to deal with high volume of metric data, is to modify monitoring templates and disable unnecessary metric collections and reduce “the collection frequency” for unimportant metrics.

Please share

AWS Big Data Specialist. Oracle Certified Professional (OCP) for EBS R12, Oracle 10g and 11g. Co-author of "Expert Oracle Enterprise Manager 12c" book published by Apress. Awarded as Oracle ACE (in 2011) and Oracle ACE Director (in 2016) for the continuous contributions to the Oracle users community. Founding member, and vice president of Turkish Oracle User Group (TROUG). Presented at various international conferences including Oracle Open World.

Leave Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.