How to setup notification to monitor OCI compute instance using Observability and management monitoring service

 


OCI Observability & Management (O&M) Platform consists of a several cloud services that we can enable to monitor, analyze, and manage applications and infrastructure environments with full-stack visibility, prebuilt analytics, and automation capabilities. 

In this blog I will create an alarm that is triggered when the service metrics reach a designated threshold And using OCI notification we will get notification alert.

Steps:

1. Confirm compute instance monitoring Plug-in is Enabled.

Navigate to Main Menu -> Compute -> Instances and select your instance

Click on Oracle Cloud Agent tab.


The compute instance monitoring plug-in should be running and enabled.


2. Create a Topic and Subscription Inside a Topic for Notification

To create an alarm, first I need to create a notification, so that the alarm has a way to notify the relevent parties. 

OCI Notification has two main elements: Topic (a communication channel for sending alarms) and Subscription (end points for receiving those messages)


Navigate to Main Menu --> Developer Services --> Application Integration, and select Notifications.

Click create Topic and give any topic name ( for eg. cpustress-topic) and description and click create.

After the topic state changes to Active, click the topic Name.


Now Click create subscription, Provide Protocol name and detail



Click create and you will see your subscription OCID.


The subscription details screen will be displayed with subscription status pending.



I should receive an email to confirm the subscription with Confirm subscription verification link in it. Like below..


Verify the subscription by click on Confirm subscription and then you will see subscription status changes to active in OCI console..



3. Now the final step is to create an alarm for CPU Utilization

Navigate to Main Menu -> Observability & Management -> Monitoring and click Alarm Definitions.

Click create Alarm.

a. Define Alarm



b. Define Metric description like compartment, metric namespace (oci_computeagent) , Metric name, interval and statistics like below..



I leave the metric dimensions area blank as I have only one compute instance but if you have like 5 or more instance then you can use dimensions to filter based on dimensions.

c. Define trigger rule: you can use any value as per requirement.



d. Define Alarm Notifications: Here you have to mention the Topic that we created in step 2.



e. We can also select the message format and repeat notification if an alarm continues. Or you can suppress the notification.


f. Check Enable this alarm and save it.



You should now be able to see the alarm's details when you click on Alarm like below.




And when threshold reach to >=70 as per the alarm setup , we will get an email notification like below..


Email provide details about Alarm OCID, number of metrics breaching threshold, and dimensions.


Stay Tuned for my next O&M Blog!













No comments:

Post a Comment

How To Disable Automatic Database Backups Using DBAASCLI on ExaCC

  In this blog post I will show you how to disable Automatic database backups on ExaCC using dbaascli.