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.

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

    1. Open the navigation menu and click Observability & Management. Under Monitoring, click Alarm Definitions.
    2. Click the name of the alarm that you want to update.
    3. On the alarm details page, click Actions and then select Edit alarm.
    4. In the Metric description area, verify that the metric namespace and the metric name for which you want to specify dimensions are selected.
    5. 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.
    6. To select dimensions by updating the MQL expression, follow these steps:
      1. At the top of the Edit alarm page, click Switch to Advanced Mode.
      2. In the Metric description, dimensions, and trigger rule area, edit the text in the Query code editor box.
    7. Update any other values for the alarm, as needed.
      For more information about the fields, see Creating a Basic Alarm.
    8. Click 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).