Cloudwatch 'number' widget that displays number of active alarms

0

Hi , I am trying to configure a simple cloudwatch 'number' widget that displays the total number of alarms currently in 'in-alarm' status ...and likewise another one that displays the total number of alarms in 'ok' status. (i will colour the widgets red and green accordingly) ...our OPs team need this very simple view as they are running out of screen real estate to display much else

My question is, how can i get the widget to display this count of alarms? it seems widgets can only be based on metrics ...would i need to create a custom metric that somehow counts the alarms based on a query? (such as alarm status or a string match in the alarm name etc) ....is this even possible?...or would i have to have some type of lambda to do this?

Any guidance would be greatly appreciated thanks

已提问 2 年前960 查看次数
2 回答
1

Hi, emitting a metric is one possibility. You would need though to create this metric in a custom way, e.g. call a lambda on a regular schedule (using eventbridge) to count your alarms and emit the number to a metric.

You can also create a custom widget on your dashboard? You can write the same lambda that counts your alarms, the difference is the lambda would output the number in HTML to feed the custom widget, and you don't need to call your lambda on a schedule. As an optimization you can save the count from the lambda to not run the query every time a dashboard is displayed or refreshed but only at whatever refresh rate you want.

profile pictureAWS
Jsc
已回答 2 年前
0

Thanks ...I found this really good article to help with the above https://medium.com/@anatoliydadashev/aws-cloudwatch-alarms-count-in-grafana-53932f5bc901

已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容