Tuesday, 15 January 2013

Increase/Modify/Purging Retention for Metric Data in OEM


We are using OEM Grid control 10.2.0.3 & 11g  in our environment and we'd like to take advantage of its feature of providing Charts, monitoring and performance statistics. However we found it hard to analyze the data since it is quickly aggregated and the retention time of data is limited to the default: Raw metric=7 days,1 hour data= 31days, One day Data= 365 days.

We are planning to increase or modify the retention time especially in the Raw Metrics to provide better data for analysis. Anyone who have done this before? What would be the consequences in doing this and what are the preparations I need to take?

So we are planing to keep metric data for 3 years  in grid control so it will be useful for capacity planning .

In  OEM  there is 3 Tables that hold paramter data (also historic values):


  Table Name                    Retention Parameter            Retention Days
    -----------------------------------------------------------------------
    MGMT_METRICS_RAW            mgmt_raw_keep_window        7
    MGMT_METRICS_1HOUR            mgmt_hour_keep_window        31
    MGMT_METRICS_1DAY            mgmt_day_keep_window        365



* The tables are in SYSMAN schema.
* To query the data in the 3 tables above, you'll need to know the values for "TARGET_GUID" &  "METRIC_GUID".
* To make things easier, instead of querying the tabels, use the below 3 views (created over those tables). This views include the columns "target_name" and "metric_name", so it will be easier to search for the params you want.

    MGMT$METRIC_DETAILS
    MGMT$METRIC_HOURLY
    MGMT$METRIC_DAILY


According to my requirement If I want to keep 3 years data in OEM  I need to update mgmt_day_keep_window = 1095 days in MGMT_METRICS_1DAY  table as below


# To change the retention for a given parameter, you can use:
# -----------------------------------------------------------

    INSERT INTO SYSMAN.MGMT_PARAMETERS
        (PARAMETER_NAME, PARAMETER_VALUE,PARAMETER_COMMENT)
    VALUES
        (mgmt_day_keep_window,’1095',’Keep daily agg data for 1095 days’);


References: -

http://howtodba.com/how-to-get-storage-usage-for-datafiles-from-oracle-grid-database/

Oracle Note ID's:  430830.1, 604978.1, 360212.1.

 Above modifications will only applicable from 10.2.0.3 or above below 10.2.0.3 version grid control its wont applicable.

Disclaimer: If you feel this content related to your content  please feel to contact me to remove this information.  I am sharing the knowledge with people whoever in the need which is learning daily basis


No comments:

Post a Comment