从AWS Cloudwatch自定义警报消息 [英] Customize alarm message from AWS Cloudwatch

查看:121
本文介绍了从AWS Cloudwatch自定义警报消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从AWS Cloudwatch收到一些警报通知,但通常以JSON格式发送,问题是我公司的非技术人员收到了其中一些电子邮件。我想知道是否可以自定义AWS SNS发送的电子邮件,因为我看不到任何自定义方式。

解决方案

如果您使用的是Cloudwatch / Event / Rules,则可以使用输入Transfomer来自定义电子邮件的内容,并然后SNS将发送该消息而不是JSON。



我正在使用此设置来在用户登录AWS控制台时得到通知。
在我的情况下,事件源是 AWS控制台登录,但是您可以尝试使用Cloudwatch,看看是否能满足您的需求。






I got some alarm notifications from AWS Cloudwatch to my email but they are usually sent in a JSON format and the problem is that some of those emails are getting received by non-technical people in my company. I was wondering if that is possible to customize the emails sent by AWS SNS because I don't see any option in how to customize it.

解决方案

If you are using Cloudwatch/Event/Rules then you can use "Input transfomer" to customize the contents of the email and then SNS will send that instead of JSON.

I am using this setup to get notified when user signs in AWS console. In my case "Event Source" is "AWS Console Sign-in" but you can try with Cloudwatch and see if that gets you what you need.

See the screenshot, hope it helps.

https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatch-Events-Input-Transformer-Tutorial.html

https://forums.aws.amazon.com/thread.jspa?messageID=820808

这篇关于从AWS Cloudwatch自定义警报消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆