Getting the History of an Alarm

Get the history of an alarm in Monitoring. Alarm history is retained for 90 days.

For history of alarm suppressions, see Getting Suppression History for an Alarm. For alarm troubleshooting, see Troubleshooting Alarms.

Before You Begin

IAM policies: To get alarm history, you must be given the required type of access in a policy  written by an administrator. This requirement applies whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you get a message that you don't have permission or are unauthorized, check with the administrator. You might not have the required type of access in the current compartment .

Administrators: For an example policy, see Get Alarm Details and History.

    1. Open the navigation menu and click Observability & Management. Under Monitoring, click Alarm Definitions.
    2. Click the name of the alarm that you want.
      The alarm details page opens.
    3. (Optional) Select a period of time from Quick Selects.

      Under Alarm data, the chart shows data for the indicated time range.

      Example metric chart for an alarm query

      Following the chart is a list of timestamped transitions, such as Firing to OK. The list includes trigger rules.

    4. To view resources evaluated by the alarm, click the down-arrow for Query.
    5. To view timestamps for alarm transitions, such as the time that a trigger rule last transitioned to Firing, click the Alarm transition history tab.

      The name of each trigger rule indicates its severity, query, and rule number. The query indicator depends on which mode was used to save the alarm query. If the query was saved in Basic mode, then the query indicator includes the metric namespace, operator, and value (example: oci_computeagent-greater-than-90). If the query was saved in Advanced mode, then the name includes the phrase advanced.

      Example names of trigger rules:

      • Basic mode: Critical-oci_computeagent-greater-than-90-Rule2
      • Advanced mode: Critical-advanced-Rule2
  • Use the oci monitoring alarm-history-collection get-alarm-history command and required parameters to get history for an alarm:

    oci monitoring alarm-history-collection get-alarm-history --alarm-id <alarm_OCID>

    For a complete list of parameters and values for CLI commands, see the Command Line Reference for Monitoring.

  • Run the GetAlarmHistory operation to get history for an alarm.