Are you tired of juggling between multiple tools and losing precious time in context switching? Introducing the Slack-ADB Power Couple!
In this article you will learn how to send an alert message, triggered by an Autonomous Database event, into a slack channel using a webhook link. We'll assume that you already have a webhook link for slack (you can find more details here).
OCI Notifications service enables you to set up communication channels for publishing messages using topics and subscriptions. In Step 1 through 7, you'll learn how to create a notification topic, and then create a rule that triggers a message when a database is stopped.
First, create a Notification topic. From OCI Services menu, click Developer Services -> Notifications
Fill in the dialog box:
Now that you have created a notification topic, create a subscription to that topic so that you can receive alerts when a condition changes (you will create a rule with conditions in a following task.)
Fill in the dialog box:
PROTOCOL: Slack
URL: Provide your WebHook URL
Click Create
The Subscription Details screen will be displayed with subscription status showing Pending confirmation.
Your verification will change the subscription status from pending to active.
Let's define an event that triggers a Slack notification when an Autonomous Database is stopped.
Fill out the dialog box:
Under Rule Conditions
Under Actions
Click Create Rule
You have configured a Notification service and tied an event to it with a specific compartment. When a database is shut down, a notification will be sent to the Slack channel associated to the webhook.
Now, shut down the Autonomous Database to trigger the notification.
In the confirmation dialog box, click Stop.
Wait until the database status changes to STOPPED.
Check the slack channel you specified to verify that a notification was sent.
This is just one of many ways that you can integrate managing Autonomous Database into your existing workflows. The service lets you manage the database "by exception"; your Autonomous Database happily does its work and simply notifies you when you need to act. Learn more about how to be successful with Autonomous Database by going to the Getting Started page. You'll find links to demos, documentation, workshops and more.
I am part of the Autonomous Database Specialist Team.