Below are the steps to create disk alerts for Ubuntu instance on AWS CloudWatch:
Create CloudWatch Alarm:
Click Select metric button
Select your agent:
CWAgent in the above case, following the following blog for how to create that agent: Monitor disk usage EC2 Ubuntu instance
Click “InstanceId, device, fstype, path” metric on the next screen:
Select the instance you want to create the alarm for and click Select metric button:
On the next screen set the value to 80 or whatever value you want choose for the condition to get alert when the disk_used_percent exceeds that value:
In the notification section on the next screen, select the “Create new topic” as SNS topic:
Enter the email ids of the users to where you want to send the notifications. Click Create topic button and choose Next button at the bottom to move on to next screen.
Your users will get a nbotification by now that they are been choosen for the subscription.
On the next screen enter a valid name for your alarm and hit Next button
Hit Create Alarm on the next screen and you will be preseneted with the following message:
Successfully created alarm Server Disk Usage Alarm.
You can go to CloudWatch >> All Alarms to find the recenetly created Alarm.
When your server reaches the threshold you mentioned in the Alarm, it will send an email alert to the mentioned users in the alarm configuration.