9.6.2.3 Using Metric History

The metric history is a collection of past metric observations.

The retention period for most metric history files is specified by the metricHistoryDays attribute associated with the storage server (CELL) or database server (DBSERVER). The default retention period is seven days. On each storage server, you can modify this setting with the CellCLI ALTER CELL. Likewise, you can change the default retention period on each database server with the DBMCLI ALTER DBSERVER command.

In addition to the metrics governed by the metricHistoryDays attribute, a subset of metric observations are retained for up to one year to support longer-term analysis and planning.

Starting with Oracle Exadata System Software 24.1.0, you can view and control which metrics to maintain for up to one year using the retentionPolicy attribute associated with each metric definition. When the retentionPolicy is Default, the retention period for the associated metric is governed by the metricHistoryDays attribute. If the retentionPolicy is Annual, the associated metric has a one-year retention period.

To view all metrics that may have up to one year of observation history maintained in the server, you can use the following command in CellCLI or DBMCLI:

LIST METRICDEFINITION WHERE retentionPolicy='Annual'

To modify the retention policy for a specific metric, you can use the ALTER METRICDEFINITION command and set the retentionPolicy attribute to Annual or Default. For example:

ALTER METRICDEFINITION CD_IO_BY_R_LG retentionPolicy='Annual'

To restore a metric to the original retentionPolicy setting defined in Oracle Exadata System Software, set the retentionPolicy attribute to an empty string (''). For example:

ALTER METRICDEFINITION CD_IO_BY_R_LG retentionPolicy=''

In all cases, regardless of the retentionPolicy and metricHistoryDays settings, historical metric observations are purged automatically if the server detects a shortage of storage space for the metric history repository.

To display the metric history, you can use the LIST METRICHISTORY command. Following are some examples:

Example 9-3 Displaying Metric History Values

DBMCLI> LIST METRICHISTORY DS_TEMP WHERE alertState='critical' DETAIL

DBMCLI> LIST METRICHISTORY WHERE objectType = 'DBSERVER' AND metricValue != 0   -
         AND collectionTime > '2014-08-12T09:10:51-07:00' -ATTRIBUTES name,      -
         metricObjectName, metricValue, collectionTime