Thursday, January 14, 2021

Notify OCI Compute state change using OCI Events

7:52 PM Posted by Dilli Raj Maharjan No comments

The Oracle Cloud Infrastructure Notifications service is used to broadcast message to subscribers. It can be used to notify when event rules are triggered or alarmed or breached. It uses topics and subscriptions for publishing messages. Topic need to created and should be subscribed by the user before OCI notification service works. Once Topic and subscription is created we will create Event Rule to filter out the events we are interested one.


Create Notification Topics and Subscription.


Click on Navigation menu. Click on Application Integration and then Notifications.



Click on Create Topic.


Provide the name of topic and Description. Click on Create.




Once topic is created, Click on Create Subscription to create subscriptions.


There is an option to create topic using 5 protocols. I am using my email to subscribe this topic.



Provide email address and click on Create.



The Subscription status will be in pending state until you open the confirmation email and click on Confirm Subscription.


Open email and click on Confirm Subscription to complete subscription.

Once you click on confirm subscription, the state will be changed to Active.

Create Event and action.

Click on Navigation menu, Application Integration and Events Service.



Click on Rules and Create Rule button.


Provide the Rule name, Description, Rule conditions and Actions. Click on Create Rule once done.



Now whenever your compute instance state changes, it will send notification email as below. 












0 comments:

Post a Comment