Selecting the Statistic for an Alarm Query

Select the statistic for an alarm query. The statistic is the aggregation function applied to the set of raw data points at the specified interval.

For valid statistic options in MQL expressions, see Statistic. For alarm instructions, see Creating an Alarm.

For alarm troubleshooting, see Troubleshooting Alarms.

  • For information about selecting the statistic from the Metrics Explorer page, see Selecting the Statistic 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 statistic using Basic mode (default), use Statistic:
      • Mean - The value of Sum divided by Count during the specified time period.
      • Rate - The per-interval average rate of change.
      • Sum - All values added together.
      • Max - The highest value observed during the specified time period.
      • Min - The lowest value observed during the specified time period.
      • Count - The number of observations received in the specified time period.
      • P50 - The value of the 50th percentile.
      • P90 - The value of the 90th percentile.
      • P95 - The value of the 95th percentile.
      • P99 - The value of the 99th percentile.
    5. To select the statistic 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 statistic (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 statistic (part of the MQL expression).