By using AWS re:Post, you agree to the Terms of Use

Storage Burst Balance - Cloudwatch Alarm - EBS, EFS, etc.

0

Hi,

I was thinking of writing code to do this, but basically I need an alarm to check all storage and alert our team when the burst credits/balance are low.   I read the cloudwatch alarms documentation and it seems it can be done but it appears you can only create an alarm per resource-id; is that correct?  If so, I was hoping that I can create a single cloudwatch alarm for all EBS volumes for example and then get a cloudwatch alert when any of them are low and the output would report that particular ebs volume id.

Thanks in advance,

  • Joe
asked 8 months ago29 views
1 Answers
0

To answer your question, unfortunately, there is no direct way or feature for applying the same CloudWatch alarm to all the EBS Volumes and then get a cloudwatch alert when any of them are low and the output would report that particular EBS volume id.

A CloudWatch alarm can be created on a specified metric or metric math expression. Thus, an ideal way would be to create an alarm for each EBS Volume.

Having said that there are couple of workaround that might help

1] I suggest you can write a custom script for creating alarms as you mentioned. You can use the ‘DescribeVolumes’ [1] API call to fetch all the Volume ids and then use the ‘PutMetricAlarm’ [2] API call for creating a metric alarm for each of those Volumes.

2] Another way is to create a metric that is the ‘Maximum’ of all the BurstBalance metric across your Volumes. It is important that we use the maximum statistic because we want to be notified when any of the instances cross a defined threshold. This documentation [3] shows you how you can add a metric math to your graph.

However, a few caveats using metric math expressions to monitor multiple metrics using CW alarms is:

1.) You can only monitor up to 10 metrics. [4]

2.) As the alarm is based on the metric math which takes all the metrics in consideration, used by the expression. Hence, it will not tell you which individual metric caused the alarm to go into ALARM state.

You can follow the steps below to create a CloudWatch alarm on metric math expression.

a) Navigate to the CloudWatch alarms console. b) Click on 'Create alarm' button. c) Click on 'Select metric'. d) Search for the “BurstBalance metric on the metric search box e) Click on the AWS/EBS namespace and select the “BurstBalance” metric f) Click on 'Graphed Metrics' and then from the 'Add math expression" dropdown choose AVG. g) Deselect all other metrics and select only newly created metric math expression. h) Click the 'Select metric' button and proceed with alarm configuration.

References

1] DescribeVolume - https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVolumes.html 2] PutMetricAlarm - https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricAlarm.html [3] Math Metric - https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#adding-metrics-expression-console [4] https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Create-alarm-on-metric-math-expression.html

SUPPORT ENGINEER
answered 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions