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.
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
As shown here, the OCPU count and memory available in this instance are quite low
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
Click on edit shape
Drop – down shape and increase the number of OCPU & memory and save changes
To apply the changes, we **reboot **the instance
As we can see, OCPU & memory increased for this instance
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
Fill in all the details and select the compartment where the instance is created
In the Trigger Rule section,
fill in all the details regarding when to send an alarm and the alarm severity.
In Define Alarm Comapartment Select Root compartment (because we have created Topic in root compartment)
Now, select Topic
Select enable this alarm and click on save alarm
Alarm is created
(We can check the alarm in Monitoring under Observability & Management)
Select Alarm definitions and and select the compartment in which alarm is created
As shown below, this is how we will receive notifications for the alarm via email
We follow the same procedure for the storage as well.