Last active
December 5, 2020 02:45
-
-
Save tripleonard/eb718ba7b3214adba6e92548b895238a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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