Creating an Absence Alarm
Create an absence alarm in Monitoring to send notifications when a metric doesn't emit data for a specified interval.
The absent() statistic in an absence alarm returns 1 (true) when the metric is absent for the entire interval. After continuous 1 values for the duration of the absence detection period, the statistic stops returning values. When the metric is present during the interval, the statistic returns 0 (false).
The default absence detection period is two hours. For more information about the absence detection period, see Absence Alarm Example.
- Example
- The following metric query has an absence alarm for a compute instance that's set on an interval of 1 minute (with the default absence detection period):
For alarm troubleshooting, see Troubleshooting Alarms.
- 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 an absence trigger rule:- oci monitoring alarm create --query-text- <mql_expression_specifying_absence_trigger_rule>[...]- For a complete list of parameters and values for CLI commands, see the Command Line Reference for Monitoring. 
- Run the CreateAlarm operation to create an absence alarm. - When defining details for CreateAlarmDetails, set - queryto an MQL expression that specifies an absence trigger rule.