Listing Metric Definitions

List metric definitions in Monitoring.

Before You Begin

IAM policies: To list metric definitions, you must be given the required type of access in a policy  written by an administrator. This requirement applies whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you get a message that you don’t have permission or are unauthorized, check with the administrator. You might not have the required type of access in the current compartment .

Administrators: For an example policy, see List Metric Definitions.

    1. Create a basic query on the Metrics Explorer page.
    2. If the query isn't open, open it by clicking Edit queries.
    3. To list the metric information that you want, select the required configuration fields:
      • To list metric namespaces, select Compartment.
      • To list metric names, select Compartment and Metric namespace.
      • To list dimensions, select Compartment, Metric namespace, and Metric name.
  • Use the oci monitoring metric list command and required parameters to list metric definitions:

    oci monitoring metric list --compartment-id <compartment_OCID>

    For a complete list of parameters and values for CLI commands, see the Command Line Reference for Monitoring.

  • Run the ListMetrics operation to list metric definitions.