Create a Metric Extension

You can create Metric Extensions from a published Metric Extension Template to collect metrics from selected Managed Databases or a Database Group on a specified schedule.

Before you begin, ensure that the template’s SQL query is applicable to the selected databases, the selected database users have the privileges required to run it, and the required permissions are configured to publish metrics to the Monitoring service.

To create a Metric Extension:

  1. Go to the Metric Extension Templates page.
  2. Ensure that the correct compartment is selected in the Compartment applied filter.
  3. Click the Actions icon (Actions) for a published template and click Create Metric Extension.
  4. In the Create Metric Extension panel:
    1. Select the resource type:
      • Managed databases: Create Metric Extensions for one or more selected databases. You can select up to ten databases.
      • Database group: Create a Metric Extension that uses shared settings to collect metrics from the databases in the group.
    2. Select the Managed Databases or Database Group.

      For Managed Databases, select the Managed database compartment and Managed database, and choose one of the following Customization options. To select additional databases, click Add managed database.

      • Use common settings: Use the same collection schedule, Monitoring namespace, resource group, bind values, and credential option for all selected databases.
      • Customize each database: Configure the collection settings separately for each selected database.

      For Database group, select the compartment and Database Group.

    3. Provide the Metric Extension information in Common customizations if you selected Use common settings, or separately for each database if you selected Customize each database. For a Database Group, provide the shared settings for the group.
      • Metric extension name: Enter a name for the Metric Extension.
      • Monitoring namespace: Specify the namespace in which the collected metrics will be published. You can retain the namespace provided by the template or specify a custom namespace. For new Metric Extensions, use a custom namespace. Namespaces beginning with oracle_ or oci_ are not supported, except oracle_metric_extensions_appmgmt, which is retained for compatibility with legacy Metric Extensions.

        If a warning indicates that a policy is required to publish metrics to the Monitoring service, click Add policy and follow the instructions to configure the required permissions. The policy allows the selected Managed Database or Database Group to publish metrics to the Monitoring namespace configured for the Metric Extension.

      • Monitoring resource group: Optionally, specify a resource group to organize the collected metrics within the Monitoring namespace. You can retain the resource group provided by the template or specify a different resource group.
    4. Specify the collection schedule. You can retain the template’s recommended interval or specify a different interval.
      1. Schedule unit: Select the unit for the collection interval.
      2. Schedule value: Select the collection interval value.
      3. Start date and Start time: Specify when metric collection should begin. The start time is in UTC.
    5. If the template’s SQL query uses bind variables, enter the values to use for metric collection. Default values are prefilled when available and can be changed. Provide a value for each required variable.
    6. Select one of the available credential options:
      • Preferred credentials: Use the Advanced diagnostics preferred credential configured for the selected Managed Databases. This option is available only when that preferred credential is configured and accessible for every selected Managed Database. Preferred credentials are not supported for Database Groups.
      • Default monitoring credentials: Use the monitoring credential used by Database Management for the selected database.
      • Named credentials: Select the credential scope, compartment, and named credential to use for metric collection.
        • For one Managed Database, or when using Customize each database, select Resource credentials or Global credentials.
        • When using Use common settings for multiple Managed Databases, select Global credentials.
        • For a Database Group, select Global credentials.
      Note

      If you select a named credential directly, or configure the Advanced diagnostics preferred credential using a named credential, set that named credential’s Password secret access mode to Resource. This applies to named credentials with either Resource credentials or Global credentials scope.

      If a warning indicates that a policy is required to access the named credential’s secret, click Add policy and follow the instructions to configure the required permissions. The policy must grant the selected Managed Database or Database Group access to the secret in the compartment containing it. This policy is separate from the policy required to publish metrics to the Monitoring service.

  5. Click Create Metric Extension.

    The creation progress is displayed. For the Managed Databases, a separate Metric Extension is created for each selected database, whether you use common settings or customize the settings for each database. After the Metric Extensions are created, click Close.

To view Metric Extensions created from a template, click the template name on the Metric Extension Templates page, and then click the Metric Extensions tab. The tab lists the Metric Extensions in the selected compartment, including their names, resource types, associated Managed Databases or Database Groups, statuses, and creation times. Click the link in the Target column to open the Metric extensions (New) section on the details page of the associated Managed Database or Database Group.

The Metric extensions (New) section displays Metric Extensions created for the Managed Database or for a Database Group that contains the database. You can search and filter the list by creation mode, and review collection health, recent collections, schedules, and other details. Hover over an indicator in Recent collections to view its collection status and, when available, execution time.

In the Metric extensions (New) section, you can:

  • Click the link in the Metric Extension column to view its template details, SQL query, collection configuration, and recent collection runs.
  • Click the Actions icon (Actions) for a Metric Extension and click Edit to update its display name, Monitoring namespace, resource group, start and end times, collection schedule, credentials, or bind values. After making the changes, click Save.