Selecting the Interval for an Alarm Query

Select the interval, or time window, for querying metric data in an alarm in Monitoring.

For valid interval options in MQL expressions, see Interval (Monitoring Query Language (MQL) Reference).

Illustration

The timestamp of the aggregated data point corresponds to the end of the time window during which raw data points are assessed. For example, for a five-minute interval, the timestamp "2:05" corresponds to the five-minute time window from 2:00:n to 2:05:00.

This image shows how the timestamp of an aggregated data point corresponds to the interval.

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

  • For information about selecting the interval from the Metrics Explorer page, see Selecting the Interval 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. Select the Compartment that contains the metric that you want.
    4. Select the Metric namespace that contains the metric that you want.
    5. To select the interval using Basic mode (default), use Interval:
      • 1 minute
      • 5 minutes
      • 15 minutes
      • 30 minutes
      • 1 hour
      • 2 hours
      • 6 hours
      • 12 hours
      • 1 day
      • Custom - specify a Custom value and select a Unit (Minutes or Hours)
    6. To select the interval 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.
    7. Update any other values for the alarm, as needed.
      For more information about the fields, see Creating a Basic Alarm.
    8. Select Save alarm.
  • Use the oci monitoring alarm update command and required parameters to update an alarm. Use the --query-text parameter to select the interval (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 the interval (part of the MQL expression).