Selecting a Topic as the Notification Destination for an Alarm

Select the topic to send alarm notifications to.

Note

If you expect more than 60 messages per minute, select a stream as notification destination (instead of a topic). For more information, see Alarm Message Limits.
    1. Open the navigation menu and click Observability & Management. Under Monitoring, click Alarm Definitions.
    2. Click the name of the alarm that you want to update.
    3. On the alarm details page, click Actions and then select Edit alarm.
    4. To select an existing topic, provide the following values in the Destination area under Define alarm notifications. Then, skip to step 7.
      • Destination service: Select Notifications.
      • Compartment: Select the compartment  that contains the topic that you want. This compartment can be a different compartment than the one specified for the alarm and metric. By default, the first accessible compartment is selected.
      • Topic: Select an existing topic that you want to send the notifications to.
    5. To create a topic and subscription, provide the following values in the Destination area under Define alarm notifications:
      • Destination service: Select Notifications.
      • Compartment: Select the compartment  that you want to store the new topic in. This compartment can be a different compartment than the one specified for the alarm and metric. By default, the first accessible compartment is selected.
      • Create a topic: Click this link to display fields under Create a new topic and subscription for a new topic and subscription.
      • Topic name: Enter a user-friendly name for the topic. For example, enter: "Operations Team" for a topic used to notify operations staff of firing alarms.
      • Topic description: Enter a description of the new topic.
      • Subscription protocol: See the next step.
    6. For Subscription protocol, select the type of subscription that you want to create, then enter values in the associated fields. For details about each subscription type, click the links.
      • Email: Enter an email address.
      • Function: Select the compartment and application that contain the function that you want, and then select the function.
      • HTTPS (Custom URL): Enter the URL that you want to use as the endpoint.
      • PagerDuty: Enter the integration key portion of the URL for the PagerDuty subscription. (The other portions of the URL are hard-coded.)
      • Slack: Enter the Slack endpoint, including the webhook token.
      • SMS: Select the country for the phone number, and then enter the phone number, using E.164 format. Example: +14255550100
    7. Update any other values for the alarm, as needed.
      For more information about the fields, see Creating a Basic Alarm.
    8. Click Save alarm.
  • Use the oci monitoring alarm update command and required parameters to update an alarm. Use the --destinations parameter to select a topic as the alarm's notifications destination.

    oci monitoring alarm update --destinations <topic_OCID> [...]

    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 destinations attribute to select a topic as the alarm's notifications destination.