27. Performance Monitoring and Alerting for CPU,Memory and Storage - Ayushi-srivastav/OCI GitHub Wiki

Steps to Monitoring and Alerting for CPU, Memory and Storage

1. Problem

As shown in the screen below, we are unable to run and install Telnet on the instance.

This issue might be related to CPU or memory performance of the instance.

image

2. Analysis

Let’s Move down on the instance page to examine the metrics. As we can see, the CPU and memory utilization have reached up to 90%. This high usage is likely the main reason we are unable to install Telnet

image

As shown here, the OCPU count and memory available in this instance are quite low

image

3. Solution

To resolve this issue, we need to increase the OCPU and memory for this instance

Note: This option is only available for instances using the Flex shape.

Open Instance and click on stop. After stopping the instance click on more action and select edit

image

Click on edit shape

image

Drop – down shape and increase the number of OCPU & memory and save changes

image

To apply the changes, we **reboot **the instance

image

As we can see, OCPU & memory increased for this instance

image

4. Pre-Event Reminder

To prevent this issue in the future, we will set an alarm to notify us when the instance's CPU and memory utilization approaches 90%

To open Metrics, scroll down on the instance’s page,

click on the CPU utilization option, and then select Create an alarm on this query

image

Fill in all the details and select the compartment where the instance is created

image

In the Trigger Rule section,

fill in all the details regarding when to send an alarm and the alarm severity.

image

In Define Alarm Comapartment Select Root compartment (because we have created Topic in root compartment)

image

Now, select Topic

image

Select enable this alarm and click on save alarm

image

Alarm is created

(We can check the alarm in Monitoring under Observability & Management)

image

Select Alarm definitions and and select the compartment in which alarm is created

image

image

image

As shown below, this is how we will receive notifications for the alarm via email

image

image

image

We follow the same procedure for the storage as well.