Editing the MQL Expression When Updating an Alarm

Directly edit an alarm's MQL expression when you update the alarm.

For an example MQL expression, see Example Query and Metric Chart. For information about components of MQL expressions, see the tasks listed under Querying Metric Data. For information about all query elements, including compartment and metric namespace, see Creating a Query.

For alarm troubleshooting, see Troubleshooting Alarms.

  • On the Edit alarm page in the Console, the MQL expression is available in Advanced mode only.
    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. On the Edit alarm page, click Switch to Advanced Mode.
    5. Edit the text in the Query code editor box.
    6. Update any other vallues for the alarm, as needed.
      For more information about the fields, see Creating a Basic Alarm.
    7. Click Save alarm.
  • Use the oci monitoring alarm update command and required parameters to update an alarm. Use the --query-text parameter to specify 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 specify the MQL expression.