Defining the Predicate for an Alarm Query

Define the trigger rule, or predicate, for an alarm query. A trigger rule is the condition that must be satisfied for the alarm to be in the firing state. The condition can specify a threshold, such as 90% for CPU utilization, or an absence.

For valid predicate operators in MQL expressions, see Predicate Operators.

Average CPU utilization is greater than 90% over the past 5 minutes (quickstart contextual notification)
CpuUtilization[5m].Mean() > 90

For alarm troubleshooting, see Troubleshooting Alarms.

    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 define the trigger rule (predicate) by using Basic mode (default), go to the Trigger rule area and provide the following values:
      • Operator: Select the operator to use in the condition threshold. See Predicate Operators.
      • Value: Enter the value to use for the condition threshold. For the between and outside operators, enter both values for the range.
      • Trigger delay minutes: Enter the number of minutes that the condition must be maintained before the alarm is in the firing state. See Defining the Trigger Delay for an Alarm.
    6. To define the trigger rule (predicate) by updating the MQL expression, perform the following 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 define the trigger rule (part of the MQL expression).

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

    For a complete list of flags and variable options for CLI commands, see the Command Line Reference for Monitoring.

  • Run the UpdateAlarm operation to update an alarm. Use the query attribute to define the trigger rule (part of the MQL expression).