Getting email Notifications in ExaCC for Operational Activities

It can be very helpful to get notifications from your Exadata Cloud at Customer operational activities.   Notifications can be sent when pre-defined "Events" occur in your ExaCC environment.   This blog will show you how to define rules which will send email based on the events which occur.  Note - these events are only triggered when using OCI tooling like the gui interface, OCI cli, or rest API's.

First - the basic process.    Step 1 - you create a OCI Topic.   This is a category or grouping for alerts.   For example, maybe you can create a topic for virtual cluster changes, database and pluggable database administration, and ExaCC infrastructure maintenance.   There are other Event types too.

Step 2 - individuals with access to the OCI tenancy can subscribe to these topics.   When subscribing to topic, the user will get an email to confirm the subscription.

Step 3 - you will create a rule.  The rule identifies the event which happens and which topic to populate.   For example, a rule may look for when a pluggable database is created and the action to take (for example email subscribed users).   

Lets get started.   First - lets create the Topic.

Log into your OCI tenancy.   From the tenancy home page, click on the navigation menu in the top left and then navigate to Observability and Management.  From here, you can choose Notifications from the Related Service category on the far right of the menu.

This will bring you to the Notifications Main Page.   From here you can create the Topics and Subscriptions.  Next lets create a Topic.  Click on the Create Topic button.  

Note - the Topic is specific to a compartment.   When you create a Rule later it will ask for the compartment where the Topic resides .    You could also use sub-compartments and specify the parent compartment for the Topic to cover multiple compartments.   This is mainly for people subscribing to Topics - they must have access to the compartment where the topic resides.


It is very easy to create the Topic.   Simply give it a name and a description and click Create button.   This will be notifications of DB and PDB actions, so I named it accordingly.

Once created you will be back at the topics main screen.  You will see the topic displayed.   


Now - users can subscribe to the topic if they have correct IAM policy to do so.   To do this click on the subscription link on the left hand side and then click Create Subscription button.  

Choose the topic you want to subscribe to and the notification profile.   There are many protocols, for this notification we will choose email.  You can see there is the ability to call a function, hit a URL through, send pager notice, send Slack message, and use SMS.

You will then need to enter the email for the subscription notification for all.  You will be sent email to accept the subscription.  Once you have entered this, then click on Create.

The email will look like this:


 To acknowledge the subscription you click on the Confirm Subscription link.   This will bring you to web page with the confirmation.

 

The last step is to create the Rule which will populate the Topics with event notifications.   Navigate back to the Observability & Management menu and under the Event Services category choose Rules.


You will notice that you can see the Rules and Metrics under the Event menu on the left.   Select the compartment for this Rule to work against.   If you want the Rule to span many compartments, you can create sub-compartments and specify the parent compartment.  Now, click on the Rules link to the left and then click Create Rule.


Give your rule a name and description, then you will then need to select condition, the service name, and event type.   



Here you will choose Event Type for the Condition, Database for the Service Name (Database covers  all ExaCC Events including Exa Infrastructure, Virtual Clusters/Machines, DB's, PDB's, DG, Backups...).
Then pick the Event Type from the List.   You can only choose one Event Type at a time, but you can add multiple events by just selecting another from the pull down list within the data entry field.   In this example we are looking at Pluggable Database Events.

Then, you need to add the Action for this Rule:

Choose Notification for the Action type, Choose the Compartment where the Topic resides, and then choose the Topic you created earlier.   You can add multiple actions if you want to have this Rule do multiple actions.     
 
Once the Rule is created, there will be the Rule detail page.   This has the Rule information.   From here you can Edit, Validate, Disable, and Delete the Rule.     You can move the Rule to another compartment.   You can also view Metrics for this Rule.   When viewing Metrics, you can choose to look at a graph or look at the details in table format.   In table format, you can see the actual Event which triggered the notification.



Above is the Rule definition page.
 
Below is an example of clicking on the Event Matching Resource which allows you to add more Event Types.  Similarly, you could add or remove more Actions too by selecting that Resource.   If you choose Edit Rule - it will allow you to modify Events and Actions at the same time.
 


Finally - below is an example of the email which is generated by an Event.  


















 

 

Comments

Popular posts from this blog

Using dbaascli to Manage Oracle CDB and PDB's with Exadata Cloud at Customer (ExaC@C)