Skip to main content

alarm_histories

Creates, updates, deletes, gets or lists an alarm_histories resource.

Overview​

Namealarm_histories
TypeResource
Idoci.monitoring.alarm_histories

Fields​

The following fields are returned by SELECT queries:

Successfully retrieved alarm history.

NameDatatypeDescription
alarmIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the alarm to retrieve history for.
entriesarrayThe set of history entries retrieved for the alarm.
isEnabledbooleanWhether the alarm is enabled. Example: true

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectalarmId, regionopc-request-id, alarmHistorytype, page, limit, timestampGreaterThanOrEqualTo, timestampLessThanGet the history of the specified alarm.<br />For more information, see<br />[Getting History of an Alarm](/iaas/Content/Monitoring/Tasks/get-alarm-history.htm).<br />For important limits information, see<br />[Limits on Monitoring](/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits).<br /><br />This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.<br />Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,<br />or transactions, per second (TPS) for a given tenancy.<br />

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
alarmIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of an alarm.
regionstringOCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION)
alarmHistorytypestringThe type of history entries to retrieve. State history (STATE_HISTORY), state transition history (STATE_TRANSITION_HISTORY), rule history (RULE_HISTORY) or rule transition history (RULE_TRANSITION_HISTORY). If not specified, entries of all types are retrieved. Example: STATE_HISTORY
limitintegerFor list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). Default: 1000 Example: 500
opc-request-idstringCustomer part of the request identifier token. If you need to contact Oracle about a particular request, please provide the complete request ID.
pagestringFor list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine).
timestampGreaterThanOrEqualTostring (date-time)A filter to return only alarm history entries with timestamps occurring on or after the specified date and time. Format defined by RFC3339. Example: 2023-01-01T01:00:00.789Z
timestampLessThanstring (date-time)A filter to return only alarm history entries with timestamps occurring before the specified date and time. Format defined by RFC3339. Example: 2023-01-02T01:00:00.789Z

SELECT examples​

Get the history of the specified alarm.<br />For more information, see<br />[Getting History of an Alarm](/iaas/Content/Monitoring/Tasks/get-alarm-history.htm).<br />For important limits information, see<br />[Limits on Monitoring](/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits).<br /><br />This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.<br />Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,<br />or transactions, per second (TPS) for a given tenancy.<br />

SELECT
alarmId,
entries,
isEnabled
FROM oci.monitoring.alarm_histories
WHERE alarmId = '{{ alarmId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
AND alarmHistorytype = '{{ alarmHistorytype }}'
AND page = '{{ page }}'
AND limit = '{{ limit }}'
AND timestampGreaterThanOrEqualTo = '{{ timestampGreaterThanOrEqualTo }}'
AND timestampLessThan = '{{ timestampLessThan }}'
;