Skip to content

Commit

Permalink
construct for alarms based on anomaly detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelos Gkolemis committed Mar 25, 2024
1 parent 1c527a3 commit b2fbb31
Show file tree
Hide file tree
Showing 26 changed files with 1,405 additions and 111 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"Resources": {
"Alarm7103F465": {
"Type": "AWS::CloudWatch::Alarm",
"Properties": {
"ComparisonOperator": "LessThanLowerOrGreaterThanUpperThreshold",
"EvaluationPeriods": 5,
"Metrics": [
{
"Expression": "ANOMALY_DETECTION_BAND(m1, 2)",
"Id": "anomaly_detector_expr",
"ReturnData": true
},
{
"Id": "m1",
"MetricStat": {
"Metric": {
"MetricName": "Metric",
"Namespace": "CDK/Test"
},
"Period": 300,
"Stat": "Average"
},
"ReturnData": true
}
],
"ThresholdMetricId": "anomaly_detector_expr"
}
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
"CheckBootstrapVersion": {
"Assertions": [
{
"Assert": {
"Fn::Not": [
{
"Fn::Contains": [
[
"1",
"2",
"3",
"4",
"5"
],
{
"Ref": "BootstrapVersion"
}
]
}
]
},
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
}
]
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"Resources": {
"Alarm7103F465": {
"Type": "AWS::CloudWatch::Alarm",
"Properties": {
"ComparisonOperator": "LessThanLowerOrGreaterThanUpperThreshold",
"EvaluationPeriods": 5,
"Metrics": [
{
"Expression": "ANOMALY_DETECTION_BAND(target_metric, 1)",
"Id": "anomaly_detector_expr",
"ReturnData": true
},
{
"Expression": "m1/2",
"Id": "target_metric",
"ReturnData": true
},
{
"Id": "m1",
"MetricStat": {
"Metric": {
"MetricName": "Metric",
"Namespace": "CDK/Test"
},
"Period": 300,
"Stat": "Average"
},
"ReturnData": false
}
],
"ThresholdMetricId": "anomaly_detector_expr"
}
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
"CheckBootstrapVersion": {
"Assertions": [
{
"Assert": {
"Fn::Not": [
{
"Fn::Contains": [
[
"1",
"2",
"3",
"4",
"5"
],
{
"Ref": "BootstrapVersion"
}
]
}
]
},
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
}
]
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b2fbb31

Please sign in to comment.