6.4.1.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 6-17 Displaying Metric History Values
The following command displays observations in the metric
history for the CD_IO_RQ_R_LG
cell metric when
the metric was in a critical
alert state. The
output contains all of the metric attributes.
CellCLI> LIST METRICHISTORY CD_IO_RQ_R_LG WHERE alertState='critical' DETAIL
The following command displays a subset of metric attributes for all metric observations that are associated with cell disks. The output is limited to observations with non-zero metric values that were observed after the specified time.
CellCLI> LIST METRICHISTORY WHERE objectType = 'CELLDISK' AND metricValue != 0 -
AND collectionTime > '2009-08-12T09:10:51-07:00' ATTRIBUTES name, -
metricObjectName, metricValue, collectionTime
The following command displays all cell metric observations within a specified time period that are associated with the specified object types.
CellCLI> LIST METRICHISTORY WHERE objectType LIKE 'CELLDISK|FLASHCACHE|FLASHLOG|SMARTIO|IORM_DATABASE' -
AND collectionTime > '2020-07-15T08:00:00-07:00' -
AND collectionTime < '2020-07-15T09:00:00-07:00'
Related Topics
Parent topic: Using Metrics