我想设置警报,当任何EMR群集终止时(由内部错误引起),我知道有一个“ IsIdle”选项,但是我的EMR群集被设计为持久性的,因此“ IsIdle”并不适合我的情况。我可以使用健康检查指标吗?
答案 0 :(得分:0)
您可以配置Amazon CloudWatch来将“状态更改”事件发送到另一个服务,例如AWS Lambda函数或Amazon SNS主题。
要实现此目的,请打开CloudWatch console,在导航窗格中,单击“规则”>“创建规则”。
这是此类事件的一个示例:
{
"version": "0",
"id": "8535abb0-f87e-4640-b7b6-8de000dfc30a",
"detail-type": "EMR Cluster State Change",
"source": "aws.emr",
"account": "123456789012",
"time": "2016-12-16T21:00:23Z",
"region": "us-east-1",
"resources": [],
"detail": {
"severity": "INFO",
"stateChangeReason": "{\"code\":\"USER_REQUEST\",\"message\":\"Terminated by user request\"}",
"name": "Development Cluster",
"clusterId": "j-1YONHTCP3YZKC",
"state": "TERMINATED",
"message": "Amazon EMR Cluster j-1YONHTCP3YZKC (Development Cluster) has terminated at 2016-12-16 21:00 UTC with a reason of USER_REQUEST."
}
}