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.

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

    1. Create a basic alarm query.
    2. Select the Compartment that contains the metric that you want.
    3. Select the Metric namespace that contains the metric that you want.
    4. 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)
    5. To select the interval 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.
    6. Update any other values 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 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).