Skip to content

Monitor OCI Compute Instance Using Observability and Management Monitoring Service

Manoj Kumar Jan 28, 2023 11:30:00 AM
Monitor OCI Compute Instance Using Observability and Management Monitoring Service – Eclipsys
3:00

OCI Observability and Management (O&M) Platform consists of 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 a notification alert.

 

Steps:

1. Confirm compute instance monitoring Plug-in is Enabled

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

Click on the Oracle Cloud Agent tab.

oci

 

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

oci2

 

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 relevant parties. 

OCI Notification has two main elements: Topic (a communication channel for sending alarms) and Subscription (endpoints 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. CPU stress-topic) and description and click create.

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

oci3

 

Now Click Create Subscription, Provide the Protocol name and detail

 

oci4

 

Click create and you will see your subscription OCID.

 

oci5

 

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

 

oci6

 

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

 

oci7

 

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

 

oci8

 

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

 

oci9

 

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

 

oci10

 

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

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

 

oci11

 

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

 

oci12

 

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

 

oci13

 

f. Check Enable this alarm and save it.

 

oci14

 

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

 

oci15

 

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

 

oci16

 

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

 

oci17

 

Stay Tuned for my next O&M Blog!

Leave a Comment