Work with Metric Extensions

Metric Extensions allow you to collect custom metrics from databases monitored using Database Management Diagnostics & Management. You can use these metrics to monitor database health and performance and create alarms in the Oracle Cloud Infrastructure Monitoring service.

The template-based Metric Extensions experience is available for all database types supported by Database Management, whether the databases are monitored through a Management Agent or a Database Management private endpoint. For Oracle Cloud Databases, the Full management option must be enabled. Metric Extension Templates can be applied to CDBs, PDBs, and non-CDBs; the database must have compatible credentials.

Metric Extension Templates and Metric Extensions serve the following purposes:

  • Metric Extension Template: A reusable resource that contains the SQL query, bind variable definitions, metric and dimension names, Monitoring namespace, optional Monitoring resource group, and recommended collection schedule.
  • Metric Extension: A resource that uses a published Metric Extension Template to collect metrics from a Managed Database or the member databases of a Database Group. It specifies the target, credentials, runtime bind values, Monitoring namespace, optional Monitoring resource group, and collection schedule.
Note

The template-based experience replaces the legacy Metric Extensions experience, which supports only External Databases and retires on December 31, 2026. Existing legacy Metric Extensions are not automatically converted to the template-based experience. When the template-based experience is enabled, creating new Metric Extensions from the legacy page is disabled.

If you created Metric Extensions for your External Databases using the legacy experience, you can view them on the Metric Extensions page under Administration, or in the Associated Metric Extensions section on the Managed database details page.

This section describes how to create and use template-based Metric Extensions. For information on how to migrate existing legacy Metric Extensions, see OCI Database Management: Migrate Existing Metric Extensions to the New Template-based Metric Extension Experience (KB931147) in My Oracle Support.

Working with Metric Extensions involves the following tasks:

  1. Create a Metric Extension Template: Define the query, metrics, dimensions, bind variables, namespace, and recommended schedule.
  2. Test and publish the template: Run the query against a test database and verify the returned values. Edit and test the template as required. Testing previews the results without publishing metrics to the Monitoring service. Publish the template to make it available for creating Metric Extensions. A normal publish requires the latest retained test execution to have succeeded and the template to remain unchanged since that test.
  3. Create a Metric Extension: Create a scheduled collection from the published template for the Managed Database or Database Group.
  4. View metrics and create alarms: Verify the collected metrics in the Monitoring service and optionally create alarms based on metric thresholds.

Before you use Metric Extension Templates and Metric Extensions, ensure that you have the required permissions to create and manage these resources, test templates against Managed Databases, and publish the collected metrics to the Monitoring service. You can use the guided policy setup on the Database Management Overview page to automatically generate and add user policies. For information, see: