zalando-stups / senza

Deploy immutable application stacks and create and execute AWS CloudFormation templates in a sane way
https://pypi.python.org/pypi/stups-senza
Other
96 stars 72 forks source link

Option to listen on CloudWatch Alarms #104

Open ytanruengsri opened 9 years ago

ytanruengsri commented 9 years ago

Right now you can listen all cloudformation events and autoscaling events using the field

OperatorTopicId: "arn:aws:sns:topic-name"

But you can't listen on cloudwatch alarms.

It would be great if these alarms could be linked to SNS

hjacobs commented 9 years ago

Could you elaborate a bit more how this is supposed to work?

ytanruengsri commented 9 years ago

If you define a cloudwatch alarm in cloudfomation. You can normally define what actions (in AlarmActions ) are taken when the alarms changes state. And I would like to be able to send notification to a SNS Topic (see AlarmActions)

Example:

"CPUAlarm" : {
  "Type" : "AWS::CloudWatch::Alarm",
  "Properties" : {
    "AlarmDescription" : "CPU alarm for my instance",
    "AlarmActions" : [ { "Ref" : "logical name of an AWS::SNS::Topic resource" }, { "Ref" : "logical name of an AWS::AutoScaling::ScalingPolicy" } ],
    "MetricName" : "CPUUtilization",
    "Namespace" : "AWS/EC2",
    "Statistic" : "Average",
    "Period" : "60",
    "EvaluationPeriods" : "3",
    "Threshold" : "90",
    "ComparisonOperator" : "GreaterThanThreshold",
    "Dimensions" : [ {
      "Name" : "InstanceId",
      "Value" : { "Ref" : "logical name of an AWS::EC2::Instance resource" }
    } ]
  }
}