Control: 3.3 Create at least one notification topic and subscription to receive monitoring alerts
Description
Notifications provide a multi-channel messaging service that allow users and applications to be notified of events of interest occurring within OCI. Messages can be sent via eMail, HTTPs, PagerDuty, Slack or the OCI Function service. Some channels, such as eMail require confirmation of the subscription before it becomes active.
Remediation
From Console
- Go to the Notifications Service page.
- Select the
Compartment
that hosts the notifications. - Click
Create Topic
. - Set the
name
to something relevant. - Set the
description
to describe the purpose of the topic. - Click
Create
. - Click the newly created topic.
- Click
Create Subscription
. - Choose the correct
protocol
. - Complete the correct parameter, for instance
email
address. - Click
Create
.
From Command Line
- Create a topic in a compartment
oci ons topic create --name <topic name> --description <topic description> -- compartment-id <compartment OCID>
- Note the
OCID
of thetopic
using thetopic-id
field of the returned JSON and use it to create new subscriptions
oci ons subscription create --compartment-id <compartment OCID> --topic-id <topic OCID> --protocol <protocol> --subscription-endpoint <subscription endpoint>
- The returned JSON includes the id of the
subscription
.
Usage
Run the control in your terminal:
powerpipe control run oci_compliance.control.cis_v120_3_3
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run oci_compliance.control.cis_v120_3_3 --share
SQL
This control uses a named query:
notification_topic_with_subscription