Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
"ActiveFlowConnectionAlarm": {
"Type": "AWS::CloudWatch::Alarm",
"Properties": {
"Metrics": [
{
"Expression": "m2/m1",
"Id": "e1",
"Label": "ActiveFlow/ActiveInstances",
"ReturnData": true
},
{
"Id": "m1",
"Label": "AsgInServiceInstances",
"MetricStat": {
"Metric": {
"Dimensions": [
{
"Name": "AutoScalingGroupName",
"Value": {
"Ref": "AsgResource"
}
}
],
"MetricName": "GroupInServiceInstances",
"Namespace": "AWS/AutoScaling"
},
"Period": 300,
"Stat": "Minimum"
},
"ReturnData": false
},
{
"Id": "m2",
"Label": "ActiveFlowCount_UDP",
"MetricStat": {
"Metric": {
"Dimensions": [
{
"Name": "LoadBalancer",
"Value": {
"Fn::GetAtt": [
"NlbResource",
"LoadBalancerFullName"
]
}
}
],
"MetricName": "ActiveFlowCount_UDP",
"Namespace": "AWS/NetworkELB"
},
"Period": 300,
"Stat": "Maximum"
},
"ReturnData": false
}
],
"EvaluationPeriods": 1,
"Threshold": {
"Ref": "ParameterThresholdValue"
},
"AlarmDescription": "Measures connection count",
"AlarmActions": [
{
"Ref": "ScaleUpPolicyResource"
}
],
"ComparisonOperator": "GreaterThanThreshold"
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment