Creating a Threshold Alarm
Create a threshold alarm in Monitoring to send notifications when a metric meets a specified threshold value.
- The following metric query has a threshold alarm set to greater than 80%:
CpuUtilization[1m].mean() > 80
- In the metric chart on the Create Alarm page, a dashed red line indicates the threshold. The following example shows the threshold at 80% and a single value that exceeds the threshold: 85% value at 1:30. That value triggers the alarm. See also Example Query and Metric Chart.
For alarm troubleshooting, see Troubleshooting Alarms.
- Open the navigation menu and click Observability & Management. Under Monitoring, click Alarm Definitions.
- Click Create Alarm.
In the Trigger rule section in the Create Alarm page, configure the absence trigger:
- Operator: The operator used in the condition threshold. For example: between.
- Value: The value to use for the condition threshold. For example: 60 and 80 (the number of values depends on the operator).
- Trigger delay minutes: The number of minutes that the condition must be maintained before the alarm is in the firing state.
Provide values for the remaining fields.
For reference, see Creating a Basic Alarm.
- Click Save alarm.
Use the oci monitoring alarm create command and required parameters to create a threshold alarm. For the required parameter
--query-text, use an MQL expression that specifies a threshold trigger rule:
oci monitoring alarm create --query-text
For a complete list of flags and variable options for CLI commands, see the Command Line Reference for Monitoring.