Getting Event-Based Notifications for an Alarm

Get notified every time your event-based metric is emitted.

An event-based metric indicates a point-in-time event, such as a user login or shutdown of a database. For example, consider an alarm for user logins. Let's say that Sandy logs in at 9:00 and Alex logs in at 9:05. Event-based notifications ensures that you get a notification for the 9:00 login, and another notification for the 9:05 login.

Configuring an alarm for event-based notifications consists of enabling repeat notifications with a frequency of zero minutes. Compare to Repeating Notifications for an Alarm. That notification configuration is based on the alarm's firing status instead of events. If the previous example alarm was configured for repeated notifications every minute, then you'd receive a notification every minute until the alarm resets.

For alarm troubleshooting, see Troubleshooting Alarms.

    1. On the Alarm Definitions list page, select Create Alarm. If you need help finding the list page, see Listing Alarms.
    2. In the Metric description section of the Create Alarm page, select a metric namespace and metric name.
    3. Select Repeat notification?.
    4. For Notification frequency, specify 0 minutes.
    5. Update any other values for the alarm, as needed.
      For more information about the fields, see Creating a Basic Alarm.
    6. Select Save alarm.
  • Use the oci monitoring alarm create command and required parameters to create an event-based alarm. Set --repeat-notification-duration to PT0M (zero minutes).

    oci monitoring alarm create --repeat-notification-duration  PT0M [...]

    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 event-based alarm.

    When defining details for CreateAlarmDetails, set repeatNotificationDuration to PT0M (zero minutes).