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 alarm troubleshooting, see Troubleshooting Alarms.
For information about selecting the statistic from the Metrics Explorer page, see Selecting the Statistic for a Query.
- Create a basic alarm query.
- Select the Compartment that contains the metric that you want.
- Select the Metric namespace that contains the metric that you want.
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.
To select the statistic by updating the MQL expression, follow these steps:
- At the top of the Edit alarm page, click Switch to Advanced Mode.
In the Metric description, dimensions, and trigger rule area, edit the text in the Query code editor box.
For reference, see Querying Metric Data and Statistic (Monitoring Query Language (MQL) Reference).
Update any other values for the alarm, as needed.
For more information about the fields, see Creating a Basic Alarm.
- Click Save alarm.
Use the oci monitoring alarm update command and required parameters to update an alarm. Use the
--query-textparameter to select the statistic (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
queryattribute to select the statistic (part of the MQL expression).