我想设置一个在EMR集群无法引导时触发的AWS Cloudwatch规则。我尝试了很多不同的事件模式,包括以下我认为应该起作用的两种模式:
{
"source": [
"aws.emr"
],
"detail-type": [
"EMR Cluster State Change"
],
"detail": {
"stateChangeReason": {
"code": [
"BOOTSTRAP_FAILURE"
],
"message": [
"*"
]
},
"state": [
"TERMINATED_WITH_ERRORS"
]
}
}
和
{
"source": [
"aws.emr"
],
"detail-type": [
"EMR Cluster State Change"
],
"detail": {
"message": [
"*BOOTSTRAP_FAILURE*"
],
"state": [
"TERMINATED_WITH_ERRORS"
]
}
}
所有这些模式,或者我尝试过的任何其他模式,都没有因引导失败而成功触发。请注意,我希望仅在引导失败而不是其他失败时触发Cloudwatch规则。例如,以下事件模式是由引导程序故障触发的,但是它也由状态为“ TERMINATED_WITH_ERRORS”的其他任何故障触发(我还有很多其他处于此状态的集群):
{
"source": [
"aws.emr"
],
"detail-type": [
"EMR Cluster State Change"
],
"detail": {
"state": [
"TERMINATED_WITH_ERRORS"
]
}
}
我需要使用什么事件模式来捕获EMR引导程序故障,而仅捕获EMR引导程序故障?