Customizing the Absence Detection Period for an Alarm Query
Specify a custom value for the absence detection period to use when querying metric data in an alarm in Monitoring.
The default absence detection period is two hours. An alarm query containing absent()
uses the default.
Valid values range from one minute (1m
) to three days (3d
or 72h
). Specify the amount of time in the absence detection period using a number and unit (m
, h
, or d
for minute, hour, or day).
Example alarm query for a custom absence detection period of 20 hours:
CpuUtilization[1m]{resourceId = "<resource_identifier>"}.absent(20h)
For more information about the absence detection period, see Absence Alarm Example. For alarm troubleshooting, see Troubleshooting Alarms. See also Creating a Basic Alarm.
Use the oci monitoring alarm update command and required parameters to update an alarm. Use the
--query-text
parameter to specify the custom absence detection period (part of the MQL expression, such asabsent(20h)
).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 specify the custom absence detection period (part of the MQL expression, such asabsent(20h)
).