Selecting Dimensions for an Alarm Query

Limit the metric data that's returned by selecting dimensions for an alarm in Monitoring. A dimension is a qualifier provided in a metric definition. In MQL, the dimension selection component specifies name-value pairs for dimensions, surrounded by curly brackets.

For alarm troubleshooting, see Troubleshooting Alarms. See also Creating a Basic Alarm.

  • For information about selecting dimensions from the Metrics Explorer page, see Selecting Dimensions for a Query.

    1. On the Alarm Definitions list page, select the alarm that you want to work with. If you need help finding the list page or the alarm, see Listing Alarms.
    2. Go to Actions and then select Edit alarm.
    3. In the Metric description area, verify that the metric namespace and the metric name for which you want to specify dimensions are selected.
    4. To select dimensions by using Basic mode (default), go to the Metric dimensions area and provide the following values:
      • Dimension name: Select a qualifier that's specified in the metric definition. For example, the dimension resourceId is specified in the metric definition for CpuUtilization.
      • Dimension value: Select the value to use for the specified dimension. For example, if you selected resourceId as the dimension, select the resource identifier for the instance that you're monitoring.
      • Additional dimension: Add another name-value pair for a dimension, as needed.
    5. To select dimensions by updating the MQL expression, follow these steps:
      1. At the top of the Edit alarm page, select Switch to Advanced Mode.
      2. In the Metric description, dimensions, and trigger rule area, edit the text in the Query code editor box.
    6. Update any other values for the alarm, as needed.
      For more information about the fields, see Creating a Basic Alarm.
    7. Select Save alarm.
  • Use the oci monitoring alarm update command and required parameters to update an alarm. Use the --query-text parameter to select dimensions (part of the MQL expression).

    oci monitoring alarm update --query-text <mql_expression> [...]

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

  • Run the UpdateAlarm operation to update an alarm. Use the query attribute to select dimensions (part of the MQL expression).