From 8aabf356fed05b0975dc592d8ea1bba923c9afaa Mon Sep 17 00:00:00 2001 From: Cris Daniluk Date: Tue, 12 Mar 2024 13:50:29 -0400 Subject: [PATCH 01/77] remove lockfiles --- aws/{apigateway => alb}/.terraform.lock.hcl | 0 aws/beanstalk/.terraform.lock.hcl | 44 --------------------- aws/ec2/.terraform.lock.hcl | 44 --------------------- aws/ecs-cluster/.terraform.lock.hcl | 44 --------------------- aws/ecs-fargate/.terraform.lock.hcl | 44 --------------------- aws/ecs-service/.terraform.lock.hcl | 44 --------------------- aws/elasticache/.terraform.lock.hcl | 44 --------------------- aws/elasticsearch/.terraform.lock.hcl | 44 --------------------- aws/elb/.terraform.lock.hcl | 44 --------------------- aws/lambda/.terraform.lock.hcl | 44 --------------------- aws/rds/.terraform.lock.hcl | 44 --------------------- aws/sqs/.terraform.lock.hcl | 44 --------------------- aws/vpn/.terraform.lock.hcl | 44 --------------------- 13 files changed, 528 deletions(-) rename aws/{apigateway => alb}/.terraform.lock.hcl (100%) delete mode 100644 aws/beanstalk/.terraform.lock.hcl delete mode 100644 aws/ec2/.terraform.lock.hcl delete mode 100644 aws/ecs-cluster/.terraform.lock.hcl delete mode 100644 aws/ecs-fargate/.terraform.lock.hcl delete mode 100644 aws/ecs-service/.terraform.lock.hcl delete mode 100644 aws/elasticache/.terraform.lock.hcl delete mode 100644 aws/elasticsearch/.terraform.lock.hcl delete mode 100644 aws/elb/.terraform.lock.hcl delete mode 100644 aws/lambda/.terraform.lock.hcl delete mode 100644 aws/rds/.terraform.lock.hcl delete mode 100644 aws/sqs/.terraform.lock.hcl delete mode 100644 aws/vpn/.terraform.lock.hcl diff --git a/aws/apigateway/.terraform.lock.hcl b/aws/alb/.terraform.lock.hcl similarity index 100% rename from aws/apigateway/.terraform.lock.hcl rename to aws/alb/.terraform.lock.hcl diff --git a/aws/beanstalk/.terraform.lock.hcl b/aws/beanstalk/.terraform.lock.hcl deleted file mode 100644 index d53197d..0000000 --- a/aws/beanstalk/.terraform.lock.hcl +++ /dev/null @@ -1,44 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/datadog/datadog" { - version = "3.37.0" - constraints = ">= 3.37.0" - hashes = [ - "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", - "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", - "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", - "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", - "zh:47e9008c9aa0e58e0c7eb71cac0408a74399180961cd9f23807fedb3a52b4df9", - "zh:620f32bfcdfbc0ce2316d5e3b5587cdbace901706d08be70f591ef22f0cda40b", - "zh:760fc52ff88ff34f2e7ed9f2d78dc2f7509c06faa133b811bd74fdb92032ae19", - "zh:805ae94bbec4a213859bbb0f3d98a013792f55b782996fecc40b39933b83afed", - "zh:88b040e6cd964e9bef62b5eaeed8330377a40fc197de43df842741fea241bc78", - "zh:8dee6c95f23479bb7469c2648351a8f42f696deeab59287385f2ac32868e444f", - "zh:bb0c18c9e85d19cf176999e0e636a5461c2a041ed7cfe560632b9bba3eb3085b", - "zh:d4f133a24d0881c772d73ab4b4b5e7f28a02a26eca1674c5c77a9bd983151ad7", - "zh:dc488ef450760162f3d4306497a065649fe65967eadd2a7a9a2239f4ba751a9c", - "zh:dcd88c3747c9a348c317b4a1ecadb7756de879085c6014cf368d63ce60526176", - "zh:f0b1eb479c13fd0a4f724e7ada1bd08fc69032ecc866619800e2742e23882730", - ] -} - -provider "registry.terraform.io/hashicorp/null" { - version = "3.2.2" - constraints = ">= 3.1.0" - hashes = [ - "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", - "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", - "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", - "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", - "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", - "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", - "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", - "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", - "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", - "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", - "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", - ] -} diff --git a/aws/ec2/.terraform.lock.hcl b/aws/ec2/.terraform.lock.hcl deleted file mode 100644 index d53197d..0000000 --- a/aws/ec2/.terraform.lock.hcl +++ /dev/null @@ -1,44 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/datadog/datadog" { - version = "3.37.0" - constraints = ">= 3.37.0" - hashes = [ - "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", - "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", - "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", - "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", - "zh:47e9008c9aa0e58e0c7eb71cac0408a74399180961cd9f23807fedb3a52b4df9", - "zh:620f32bfcdfbc0ce2316d5e3b5587cdbace901706d08be70f591ef22f0cda40b", - "zh:760fc52ff88ff34f2e7ed9f2d78dc2f7509c06faa133b811bd74fdb92032ae19", - "zh:805ae94bbec4a213859bbb0f3d98a013792f55b782996fecc40b39933b83afed", - "zh:88b040e6cd964e9bef62b5eaeed8330377a40fc197de43df842741fea241bc78", - "zh:8dee6c95f23479bb7469c2648351a8f42f696deeab59287385f2ac32868e444f", - "zh:bb0c18c9e85d19cf176999e0e636a5461c2a041ed7cfe560632b9bba3eb3085b", - "zh:d4f133a24d0881c772d73ab4b4b5e7f28a02a26eca1674c5c77a9bd983151ad7", - "zh:dc488ef450760162f3d4306497a065649fe65967eadd2a7a9a2239f4ba751a9c", - "zh:dcd88c3747c9a348c317b4a1ecadb7756de879085c6014cf368d63ce60526176", - "zh:f0b1eb479c13fd0a4f724e7ada1bd08fc69032ecc866619800e2742e23882730", - ] -} - -provider "registry.terraform.io/hashicorp/null" { - version = "3.2.2" - constraints = ">= 3.1.0" - hashes = [ - "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", - "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", - "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", - "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", - "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", - "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", - "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", - "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", - "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", - "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", - "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", - ] -} diff --git a/aws/ecs-cluster/.terraform.lock.hcl b/aws/ecs-cluster/.terraform.lock.hcl deleted file mode 100644 index d53197d..0000000 --- a/aws/ecs-cluster/.terraform.lock.hcl +++ /dev/null @@ -1,44 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/datadog/datadog" { - version = "3.37.0" - constraints = ">= 3.37.0" - hashes = [ - "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", - "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", - "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", - "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", - "zh:47e9008c9aa0e58e0c7eb71cac0408a74399180961cd9f23807fedb3a52b4df9", - "zh:620f32bfcdfbc0ce2316d5e3b5587cdbace901706d08be70f591ef22f0cda40b", - "zh:760fc52ff88ff34f2e7ed9f2d78dc2f7509c06faa133b811bd74fdb92032ae19", - "zh:805ae94bbec4a213859bbb0f3d98a013792f55b782996fecc40b39933b83afed", - "zh:88b040e6cd964e9bef62b5eaeed8330377a40fc197de43df842741fea241bc78", - "zh:8dee6c95f23479bb7469c2648351a8f42f696deeab59287385f2ac32868e444f", - "zh:bb0c18c9e85d19cf176999e0e636a5461c2a041ed7cfe560632b9bba3eb3085b", - "zh:d4f133a24d0881c772d73ab4b4b5e7f28a02a26eca1674c5c77a9bd983151ad7", - "zh:dc488ef450760162f3d4306497a065649fe65967eadd2a7a9a2239f4ba751a9c", - "zh:dcd88c3747c9a348c317b4a1ecadb7756de879085c6014cf368d63ce60526176", - "zh:f0b1eb479c13fd0a4f724e7ada1bd08fc69032ecc866619800e2742e23882730", - ] -} - -provider "registry.terraform.io/hashicorp/null" { - version = "3.2.2" - constraints = ">= 3.1.0" - hashes = [ - "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", - "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", - "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", - "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", - "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", - "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", - "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", - "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", - "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", - "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", - "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", - ] -} diff --git a/aws/ecs-fargate/.terraform.lock.hcl b/aws/ecs-fargate/.terraform.lock.hcl deleted file mode 100644 index d53197d..0000000 --- a/aws/ecs-fargate/.terraform.lock.hcl +++ /dev/null @@ -1,44 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/datadog/datadog" { - version = "3.37.0" - constraints = ">= 3.37.0" - hashes = [ - "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", - "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", - "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", - "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", - "zh:47e9008c9aa0e58e0c7eb71cac0408a74399180961cd9f23807fedb3a52b4df9", - "zh:620f32bfcdfbc0ce2316d5e3b5587cdbace901706d08be70f591ef22f0cda40b", - "zh:760fc52ff88ff34f2e7ed9f2d78dc2f7509c06faa133b811bd74fdb92032ae19", - "zh:805ae94bbec4a213859bbb0f3d98a013792f55b782996fecc40b39933b83afed", - "zh:88b040e6cd964e9bef62b5eaeed8330377a40fc197de43df842741fea241bc78", - "zh:8dee6c95f23479bb7469c2648351a8f42f696deeab59287385f2ac32868e444f", - "zh:bb0c18c9e85d19cf176999e0e636a5461c2a041ed7cfe560632b9bba3eb3085b", - "zh:d4f133a24d0881c772d73ab4b4b5e7f28a02a26eca1674c5c77a9bd983151ad7", - "zh:dc488ef450760162f3d4306497a065649fe65967eadd2a7a9a2239f4ba751a9c", - "zh:dcd88c3747c9a348c317b4a1ecadb7756de879085c6014cf368d63ce60526176", - "zh:f0b1eb479c13fd0a4f724e7ada1bd08fc69032ecc866619800e2742e23882730", - ] -} - -provider "registry.terraform.io/hashicorp/null" { - version = "3.2.2" - constraints = ">= 3.1.0" - hashes = [ - "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", - "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", - "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", - "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", - "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", - "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", - "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", - "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", - "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", - "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", - "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", - ] -} diff --git a/aws/ecs-service/.terraform.lock.hcl b/aws/ecs-service/.terraform.lock.hcl deleted file mode 100644 index d53197d..0000000 --- a/aws/ecs-service/.terraform.lock.hcl +++ /dev/null @@ -1,44 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/datadog/datadog" { - version = "3.37.0" - constraints = ">= 3.37.0" - hashes = [ - "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", - "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", - "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", - "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", - "zh:47e9008c9aa0e58e0c7eb71cac0408a74399180961cd9f23807fedb3a52b4df9", - "zh:620f32bfcdfbc0ce2316d5e3b5587cdbace901706d08be70f591ef22f0cda40b", - "zh:760fc52ff88ff34f2e7ed9f2d78dc2f7509c06faa133b811bd74fdb92032ae19", - "zh:805ae94bbec4a213859bbb0f3d98a013792f55b782996fecc40b39933b83afed", - "zh:88b040e6cd964e9bef62b5eaeed8330377a40fc197de43df842741fea241bc78", - "zh:8dee6c95f23479bb7469c2648351a8f42f696deeab59287385f2ac32868e444f", - "zh:bb0c18c9e85d19cf176999e0e636a5461c2a041ed7cfe560632b9bba3eb3085b", - "zh:d4f133a24d0881c772d73ab4b4b5e7f28a02a26eca1674c5c77a9bd983151ad7", - "zh:dc488ef450760162f3d4306497a065649fe65967eadd2a7a9a2239f4ba751a9c", - "zh:dcd88c3747c9a348c317b4a1ecadb7756de879085c6014cf368d63ce60526176", - "zh:f0b1eb479c13fd0a4f724e7ada1bd08fc69032ecc866619800e2742e23882730", - ] -} - -provider "registry.terraform.io/hashicorp/null" { - version = "3.2.2" - constraints = ">= 3.1.0" - hashes = [ - "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", - "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", - "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", - "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", - "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", - "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", - "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", - "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", - "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", - "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", - "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", - ] -} diff --git a/aws/elasticache/.terraform.lock.hcl b/aws/elasticache/.terraform.lock.hcl deleted file mode 100644 index d53197d..0000000 --- a/aws/elasticache/.terraform.lock.hcl +++ /dev/null @@ -1,44 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/datadog/datadog" { - version = "3.37.0" - constraints = ">= 3.37.0" - hashes = [ - "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", - "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", - "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", - "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", - "zh:47e9008c9aa0e58e0c7eb71cac0408a74399180961cd9f23807fedb3a52b4df9", - "zh:620f32bfcdfbc0ce2316d5e3b5587cdbace901706d08be70f591ef22f0cda40b", - "zh:760fc52ff88ff34f2e7ed9f2d78dc2f7509c06faa133b811bd74fdb92032ae19", - "zh:805ae94bbec4a213859bbb0f3d98a013792f55b782996fecc40b39933b83afed", - "zh:88b040e6cd964e9bef62b5eaeed8330377a40fc197de43df842741fea241bc78", - "zh:8dee6c95f23479bb7469c2648351a8f42f696deeab59287385f2ac32868e444f", - "zh:bb0c18c9e85d19cf176999e0e636a5461c2a041ed7cfe560632b9bba3eb3085b", - "zh:d4f133a24d0881c772d73ab4b4b5e7f28a02a26eca1674c5c77a9bd983151ad7", - "zh:dc488ef450760162f3d4306497a065649fe65967eadd2a7a9a2239f4ba751a9c", - "zh:dcd88c3747c9a348c317b4a1ecadb7756de879085c6014cf368d63ce60526176", - "zh:f0b1eb479c13fd0a4f724e7ada1bd08fc69032ecc866619800e2742e23882730", - ] -} - -provider "registry.terraform.io/hashicorp/null" { - version = "3.2.2" - constraints = ">= 3.1.0" - hashes = [ - "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", - "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", - "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", - "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", - "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", - "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", - "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", - "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", - "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", - "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", - "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", - ] -} diff --git a/aws/elasticsearch/.terraform.lock.hcl b/aws/elasticsearch/.terraform.lock.hcl deleted file mode 100644 index d53197d..0000000 --- a/aws/elasticsearch/.terraform.lock.hcl +++ /dev/null @@ -1,44 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/datadog/datadog" { - version = "3.37.0" - constraints = ">= 3.37.0" - hashes = [ - "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", - "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", - "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", - "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", - "zh:47e9008c9aa0e58e0c7eb71cac0408a74399180961cd9f23807fedb3a52b4df9", - "zh:620f32bfcdfbc0ce2316d5e3b5587cdbace901706d08be70f591ef22f0cda40b", - "zh:760fc52ff88ff34f2e7ed9f2d78dc2f7509c06faa133b811bd74fdb92032ae19", - "zh:805ae94bbec4a213859bbb0f3d98a013792f55b782996fecc40b39933b83afed", - "zh:88b040e6cd964e9bef62b5eaeed8330377a40fc197de43df842741fea241bc78", - "zh:8dee6c95f23479bb7469c2648351a8f42f696deeab59287385f2ac32868e444f", - "zh:bb0c18c9e85d19cf176999e0e636a5461c2a041ed7cfe560632b9bba3eb3085b", - "zh:d4f133a24d0881c772d73ab4b4b5e7f28a02a26eca1674c5c77a9bd983151ad7", - "zh:dc488ef450760162f3d4306497a065649fe65967eadd2a7a9a2239f4ba751a9c", - "zh:dcd88c3747c9a348c317b4a1ecadb7756de879085c6014cf368d63ce60526176", - "zh:f0b1eb479c13fd0a4f724e7ada1bd08fc69032ecc866619800e2742e23882730", - ] -} - -provider "registry.terraform.io/hashicorp/null" { - version = "3.2.2" - constraints = ">= 3.1.0" - hashes = [ - "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", - "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", - "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", - "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", - "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", - "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", - "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", - "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", - "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", - "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", - "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", - ] -} diff --git a/aws/elb/.terraform.lock.hcl b/aws/elb/.terraform.lock.hcl deleted file mode 100644 index d53197d..0000000 --- a/aws/elb/.terraform.lock.hcl +++ /dev/null @@ -1,44 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/datadog/datadog" { - version = "3.37.0" - constraints = ">= 3.37.0" - hashes = [ - "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", - "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", - "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", - "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", - "zh:47e9008c9aa0e58e0c7eb71cac0408a74399180961cd9f23807fedb3a52b4df9", - "zh:620f32bfcdfbc0ce2316d5e3b5587cdbace901706d08be70f591ef22f0cda40b", - "zh:760fc52ff88ff34f2e7ed9f2d78dc2f7509c06faa133b811bd74fdb92032ae19", - "zh:805ae94bbec4a213859bbb0f3d98a013792f55b782996fecc40b39933b83afed", - "zh:88b040e6cd964e9bef62b5eaeed8330377a40fc197de43df842741fea241bc78", - "zh:8dee6c95f23479bb7469c2648351a8f42f696deeab59287385f2ac32868e444f", - "zh:bb0c18c9e85d19cf176999e0e636a5461c2a041ed7cfe560632b9bba3eb3085b", - "zh:d4f133a24d0881c772d73ab4b4b5e7f28a02a26eca1674c5c77a9bd983151ad7", - "zh:dc488ef450760162f3d4306497a065649fe65967eadd2a7a9a2239f4ba751a9c", - "zh:dcd88c3747c9a348c317b4a1ecadb7756de879085c6014cf368d63ce60526176", - "zh:f0b1eb479c13fd0a4f724e7ada1bd08fc69032ecc866619800e2742e23882730", - ] -} - -provider "registry.terraform.io/hashicorp/null" { - version = "3.2.2" - constraints = ">= 3.1.0" - hashes = [ - "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", - "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", - "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", - "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", - "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", - "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", - "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", - "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", - "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", - "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", - "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", - ] -} diff --git a/aws/lambda/.terraform.lock.hcl b/aws/lambda/.terraform.lock.hcl deleted file mode 100644 index d53197d..0000000 --- a/aws/lambda/.terraform.lock.hcl +++ /dev/null @@ -1,44 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/datadog/datadog" { - version = "3.37.0" - constraints = ">= 3.37.0" - hashes = [ - "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", - "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", - "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", - "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", - "zh:47e9008c9aa0e58e0c7eb71cac0408a74399180961cd9f23807fedb3a52b4df9", - "zh:620f32bfcdfbc0ce2316d5e3b5587cdbace901706d08be70f591ef22f0cda40b", - "zh:760fc52ff88ff34f2e7ed9f2d78dc2f7509c06faa133b811bd74fdb92032ae19", - "zh:805ae94bbec4a213859bbb0f3d98a013792f55b782996fecc40b39933b83afed", - "zh:88b040e6cd964e9bef62b5eaeed8330377a40fc197de43df842741fea241bc78", - "zh:8dee6c95f23479bb7469c2648351a8f42f696deeab59287385f2ac32868e444f", - "zh:bb0c18c9e85d19cf176999e0e636a5461c2a041ed7cfe560632b9bba3eb3085b", - "zh:d4f133a24d0881c772d73ab4b4b5e7f28a02a26eca1674c5c77a9bd983151ad7", - "zh:dc488ef450760162f3d4306497a065649fe65967eadd2a7a9a2239f4ba751a9c", - "zh:dcd88c3747c9a348c317b4a1ecadb7756de879085c6014cf368d63ce60526176", - "zh:f0b1eb479c13fd0a4f724e7ada1bd08fc69032ecc866619800e2742e23882730", - ] -} - -provider "registry.terraform.io/hashicorp/null" { - version = "3.2.2" - constraints = ">= 3.1.0" - hashes = [ - "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", - "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", - "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", - "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", - "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", - "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", - "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", - "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", - "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", - "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", - "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", - ] -} diff --git a/aws/rds/.terraform.lock.hcl b/aws/rds/.terraform.lock.hcl deleted file mode 100644 index d53197d..0000000 --- a/aws/rds/.terraform.lock.hcl +++ /dev/null @@ -1,44 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/datadog/datadog" { - version = "3.37.0" - constraints = ">= 3.37.0" - hashes = [ - "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", - "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", - "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", - "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", - "zh:47e9008c9aa0e58e0c7eb71cac0408a74399180961cd9f23807fedb3a52b4df9", - "zh:620f32bfcdfbc0ce2316d5e3b5587cdbace901706d08be70f591ef22f0cda40b", - "zh:760fc52ff88ff34f2e7ed9f2d78dc2f7509c06faa133b811bd74fdb92032ae19", - "zh:805ae94bbec4a213859bbb0f3d98a013792f55b782996fecc40b39933b83afed", - "zh:88b040e6cd964e9bef62b5eaeed8330377a40fc197de43df842741fea241bc78", - "zh:8dee6c95f23479bb7469c2648351a8f42f696deeab59287385f2ac32868e444f", - "zh:bb0c18c9e85d19cf176999e0e636a5461c2a041ed7cfe560632b9bba3eb3085b", - "zh:d4f133a24d0881c772d73ab4b4b5e7f28a02a26eca1674c5c77a9bd983151ad7", - "zh:dc488ef450760162f3d4306497a065649fe65967eadd2a7a9a2239f4ba751a9c", - "zh:dcd88c3747c9a348c317b4a1ecadb7756de879085c6014cf368d63ce60526176", - "zh:f0b1eb479c13fd0a4f724e7ada1bd08fc69032ecc866619800e2742e23882730", - ] -} - -provider "registry.terraform.io/hashicorp/null" { - version = "3.2.2" - constraints = ">= 3.1.0" - hashes = [ - "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", - "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", - "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", - "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", - "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", - "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", - "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", - "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", - "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", - "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", - "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", - ] -} diff --git a/aws/sqs/.terraform.lock.hcl b/aws/sqs/.terraform.lock.hcl deleted file mode 100644 index d53197d..0000000 --- a/aws/sqs/.terraform.lock.hcl +++ /dev/null @@ -1,44 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/datadog/datadog" { - version = "3.37.0" - constraints = ">= 3.37.0" - hashes = [ - "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", - "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", - "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", - "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", - "zh:47e9008c9aa0e58e0c7eb71cac0408a74399180961cd9f23807fedb3a52b4df9", - "zh:620f32bfcdfbc0ce2316d5e3b5587cdbace901706d08be70f591ef22f0cda40b", - "zh:760fc52ff88ff34f2e7ed9f2d78dc2f7509c06faa133b811bd74fdb92032ae19", - "zh:805ae94bbec4a213859bbb0f3d98a013792f55b782996fecc40b39933b83afed", - "zh:88b040e6cd964e9bef62b5eaeed8330377a40fc197de43df842741fea241bc78", - "zh:8dee6c95f23479bb7469c2648351a8f42f696deeab59287385f2ac32868e444f", - "zh:bb0c18c9e85d19cf176999e0e636a5461c2a041ed7cfe560632b9bba3eb3085b", - "zh:d4f133a24d0881c772d73ab4b4b5e7f28a02a26eca1674c5c77a9bd983151ad7", - "zh:dc488ef450760162f3d4306497a065649fe65967eadd2a7a9a2239f4ba751a9c", - "zh:dcd88c3747c9a348c317b4a1ecadb7756de879085c6014cf368d63ce60526176", - "zh:f0b1eb479c13fd0a4f724e7ada1bd08fc69032ecc866619800e2742e23882730", - ] -} - -provider "registry.terraform.io/hashicorp/null" { - version = "3.2.2" - constraints = ">= 3.1.0" - hashes = [ - "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", - "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", - "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", - "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", - "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", - "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", - "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", - "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", - "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", - "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", - "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", - ] -} diff --git a/aws/vpn/.terraform.lock.hcl b/aws/vpn/.terraform.lock.hcl deleted file mode 100644 index d53197d..0000000 --- a/aws/vpn/.terraform.lock.hcl +++ /dev/null @@ -1,44 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/datadog/datadog" { - version = "3.37.0" - constraints = ">= 3.37.0" - hashes = [ - "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", - "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", - "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", - "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", - "zh:47e9008c9aa0e58e0c7eb71cac0408a74399180961cd9f23807fedb3a52b4df9", - "zh:620f32bfcdfbc0ce2316d5e3b5587cdbace901706d08be70f591ef22f0cda40b", - "zh:760fc52ff88ff34f2e7ed9f2d78dc2f7509c06faa133b811bd74fdb92032ae19", - "zh:805ae94bbec4a213859bbb0f3d98a013792f55b782996fecc40b39933b83afed", - "zh:88b040e6cd964e9bef62b5eaeed8330377a40fc197de43df842741fea241bc78", - "zh:8dee6c95f23479bb7469c2648351a8f42f696deeab59287385f2ac32868e444f", - "zh:bb0c18c9e85d19cf176999e0e636a5461c2a041ed7cfe560632b9bba3eb3085b", - "zh:d4f133a24d0881c772d73ab4b4b5e7f28a02a26eca1674c5c77a9bd983151ad7", - "zh:dc488ef450760162f3d4306497a065649fe65967eadd2a7a9a2239f4ba751a9c", - "zh:dcd88c3747c9a348c317b4a1ecadb7756de879085c6014cf368d63ce60526176", - "zh:f0b1eb479c13fd0a4f724e7ada1bd08fc69032ecc866619800e2742e23882730", - ] -} - -provider "registry.terraform.io/hashicorp/null" { - version = "3.2.2" - constraints = ">= 3.1.0" - hashes = [ - "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", - "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", - "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", - "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", - "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", - "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", - "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", - "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", - "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", - "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", - "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", - ] -} From 7a610bf1f2fa99e01aa35cfe4fbaeeb90774dcb9 Mon Sep 17 00:00:00 2001 From: Cris Daniluk Date: Tue, 12 Mar 2024 13:50:45 -0400 Subject: [PATCH 02/77] remove lockfiles --- aws/alb/.terraform.lock.hcl | 44 ------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 aws/alb/.terraform.lock.hcl diff --git a/aws/alb/.terraform.lock.hcl b/aws/alb/.terraform.lock.hcl deleted file mode 100644 index d53197d..0000000 --- a/aws/alb/.terraform.lock.hcl +++ /dev/null @@ -1,44 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/datadog/datadog" { - version = "3.37.0" - constraints = ">= 3.37.0" - hashes = [ - "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", - "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", - "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", - "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", - "zh:47e9008c9aa0e58e0c7eb71cac0408a74399180961cd9f23807fedb3a52b4df9", - "zh:620f32bfcdfbc0ce2316d5e3b5587cdbace901706d08be70f591ef22f0cda40b", - "zh:760fc52ff88ff34f2e7ed9f2d78dc2f7509c06faa133b811bd74fdb92032ae19", - "zh:805ae94bbec4a213859bbb0f3d98a013792f55b782996fecc40b39933b83afed", - "zh:88b040e6cd964e9bef62b5eaeed8330377a40fc197de43df842741fea241bc78", - "zh:8dee6c95f23479bb7469c2648351a8f42f696deeab59287385f2ac32868e444f", - "zh:bb0c18c9e85d19cf176999e0e636a5461c2a041ed7cfe560632b9bba3eb3085b", - "zh:d4f133a24d0881c772d73ab4b4b5e7f28a02a26eca1674c5c77a9bd983151ad7", - "zh:dc488ef450760162f3d4306497a065649fe65967eadd2a7a9a2239f4ba751a9c", - "zh:dcd88c3747c9a348c317b4a1ecadb7756de879085c6014cf368d63ce60526176", - "zh:f0b1eb479c13fd0a4f724e7ada1bd08fc69032ecc866619800e2742e23882730", - ] -} - -provider "registry.terraform.io/hashicorp/null" { - version = "3.2.2" - constraints = ">= 3.1.0" - hashes = [ - "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", - "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", - "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", - "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", - "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", - "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", - "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", - "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", - "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", - "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", - "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", - ] -} From 3fe573c10a41f68d211f6c85f8eeb71046ba8109 Mon Sep 17 00:00:00 2001 From: Cris Daniluk Date: Tue, 12 Mar 2024 13:54:44 -0400 Subject: [PATCH 03/77] remove cruft --- README.md | 150 ------------------------------------------------------ 1 file changed, 150 deletions(-) diff --git a/README.md b/README.md index 2864cc9..537c22d 100644 --- a/README.md +++ b/README.md @@ -25,153 +25,3 @@ module "monitor" { ``` ## About - -``` - - -## Requirements - -| Name | Version | -|------|---------| -| [terraform](#requirement\_terraform) | ~> 1.5 | -| [archive](#requirement\_archive) | >= 2.2.0 | -| [aws](#requirement\_aws) | >= 4.62 | -| [datadog](#requirement\_datadog) | >= 3.37 | -| [null](#requirement\_null) | >= 3.1.0 | - -## Providers - -| Name | Version | -|------|---------| -| [archive](#provider\_archive) | >= 2.2.0 | -| [aws](#provider\_aws) | 5.37.0 | -| [datadog](#provider\_datadog) | 3.36.1 | -| [null](#provider\_null) | >= 3.1.0 | - -## Modules - -| Name | Source | Version | -|------|--------|---------| -| [tags](#module\_tags) | rhythmictech/tags/terraform | ~> 1.1 | - -## Resources - -| Name | Type | -|------|------| -| [aws_cloudformation_stack.datadog_forwarder](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudformation_stack) | resource | -| [aws_cloudwatch_event_rule.awshealth](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_rule) | resource | -| [aws_cloudwatch_event_rule.guardduty](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_rule) | resource | -| [aws_cloudwatch_event_target.awshealth](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_target) | resource | -| [aws_cloudwatch_event_target.guardduty](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_target) | resource | -| [aws_cloudwatch_log_subscription_filter.rds_enhanced_monitoring](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_subscription_filter) | resource | -| [aws_cur_report_definition.cur](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cur_report_definition) | resource | -| [aws_iam_policy.datadog](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource | -| [aws_iam_policy.datadog_cost_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource | -| [aws_iam_policy.rds_enhanced_monitoring](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource | -| [aws_iam_role.datadog](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource | -| [aws_iam_role.rds_enhanced_monitoring](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource | -| [aws_iam_role_policy_attachment.cspm](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource | -| [aws_iam_role_policy_attachment.datadog](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource | -| [aws_iam_role_policy_attachment.datadog_cost_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource | -| [aws_iam_role_policy_attachment.rds_enhanced_monitoring](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource | -| [aws_lambda_function.rds_enhanced_monitoring](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_function) | resource | -| [aws_lambda_permission.awshealth_trigger](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_permission) | resource | -| [aws_lambda_permission.cloudtrail_trigger](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_permission) | resource | -| [aws_lambda_permission.guardduty_trigger](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_permission) | resource | -| [aws_s3_bucket.local_cur](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | resource | -| [aws_s3_bucket_lifecycle_configuration.local_cur](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_lifecycle_configuration) | resource | -| [aws_s3_bucket_notification.cloudtrail_notification](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_notification) | resource | -| [aws_s3_bucket_policy.local_cur](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_policy) | resource | -| [aws_s3_bucket_public_access_block.local_cur](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_public_access_block) | resource | -| [aws_s3_bucket_server_side_encryption_configuration.local_cur](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_server_side_encryption_configuration) | resource | -| [aws_s3_bucket_versioning.local_cur](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_versioning) | resource | -| [aws_secretsmanager_secret.datadog](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/secretsmanager_secret) | resource | -| [aws_secretsmanager_secret_version.datadog](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/secretsmanager_secret_version) | resource | -| [datadog_api_key.datadog](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/api_key) | resource | -| [datadog_integration_aws.datadog](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/integration_aws) | resource | -| [datadog_integration_aws_lambda_arn.datadog_forwarder](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/integration_aws_lambda_arn) | resource | -| [datadog_integration_aws_log_collection.datadog_forwarder](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/integration_aws_log_collection) | resource | -| [datadog_logs_custom_pipeline.health](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/logs_custom_pipeline) | resource | -| [datadog_logs_index.main](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/logs_index) | resource | -| [datadog_monitor.anomaly_usage](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | -| [datadog_monitor.forecast_usage](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | -| [null_resource.rds_enhanced_monitoring](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource | -| [archive_file.rds_enhanced_monitoring](https://registry.terraform.io/providers/hashicorp/archive/latest/docs/data-sources/file) | data source | -| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source | -| [aws_iam_policy_document.assume](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | -| [aws_iam_policy_document.datadog_cost_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | -| [aws_iam_policy_document.local_cur](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | -| [aws_iam_policy_document.rds_enhanced_monitoring](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | -| [aws_iam_policy_document.rds_enhanced_monitoring_assume](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | -| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source | - -## Inputs - -| Name | Description | Type | Default | Required | -|------|-------------|------|---------|:--------:| -| [cloudtrail\_buckets](#input\_cloudtrail\_buckets) | Bucket(s) to collect CloudTrail logs from | `list(string)` | `[]` | no | -| [cur\_bucket\_suffix](#input\_cur\_bucket\_suffix) | Suffix to append to the CUR bucket name ([ACCOUNT\_ID]-[REGION]-[cur\_bucket\_suffix]) | `string` | `"datadog-cur-data"` | no | -| [datadog\_account\_id](#input\_datadog\_account\_id) | DataDog AWS account ID (should not need changed) | `string` | `"464622532012"` | no | -| [datadog\_site\_name](#input\_datadog\_site\_name) | DataDog site (e.g., datadoghq.com) | `string` | `"datadoghq.com"` | no | -| [enable\_cspm\_resource\_collection](#input\_enable\_cspm\_resource\_collection) | Whether Datadog collects cloud security posture management resources from your AWS account. This includes additional resources not covered under the general resource\_collection. | `bool` | `false` | no | -| [enable\_cur\_collection](#input\_enable\_cur\_collection) | Configure a Cost and Usage Reporting export (uses legacy CUR) suitable for ingestion by Datadog. This does not fully configure Datadog due to lack of Terraform support but does do everything on the AWS side to prepare for enabling cost monitoring in Datadog. | `bool` | `false` | no | -| [enable\_estimated\_usage\_detection](#input\_enable\_estimated\_usage\_detection) | Enable estimated usage anomaly and forecast monitoring | `bool` | `false` | no | -| [enable\_guardduty\_notifications](#input\_enable\_guardduty\_notifications) | Send GuardDuty notifications to Datadog (`install_log_forwarder` must be true). This routes GuardDuty events to the log forwarder. GuardDuty events can also be received as a Datadog Event through Cloud Security Monitoring. | `bool` | `true` | no | -| [enable\_health\_notifications](#input\_enable\_health\_notifications) | Send AWS health notifications to Datadog (`install_log_forwarder` must be true). This routes AWS Health events to the log forwarder. Health events can also be received as a Datadog Event through the AWS Health integration. | `bool` | `true` | no | -| [enable\_rds\_enhanced\_monitoring\_lambda](#input\_enable\_rds\_enhanced\_monitoring\_lambda) | Install the RDS Enhanced Monitoring Lambda | `bool` | `false` | no | -| [enable\_resource\_collection](#input\_enable\_resource\_collection) | Enable or disable resource collection | `bool` | `true` | no | -| [estimated\_usage\_anomaly\_message](#input\_estimated\_usage\_anomaly\_message) | Message for usage anomaly alerts | `string` | `"Datadog usage anomaly detected"` | no | -| [estimated\_usage\_detection\_config](#input\_estimated\_usage\_detection\_config) | Map of usage types to monitor. | `map(any)` | `{}` | no | -| [estimated\_usage\_detection\_default\_config](#input\_estimated\_usage\_detection\_default\_config) | Map of default usage monitoring settings for each metric type. All are disabled by default. Use `usage_anomaly_services` to enable services and alternately override default settings |
map(object({
anomaly_enabled = bool
anomaly_span = string
anomaly_threshold = number
anomaly_window = string
anomaly_deviations = number
anomaly_seasonality = string
anomaly_rollup = number
forecast_enabled = bool
forecast_deviations = number
forecast_rollup_type = string
forecast_rollup_value = number
forecast_threshold = number
}))
|
{
"hosts": {
"anomaly_deviations": 1,
"anomaly_enabled": false,
"anomaly_rollup": 600,
"anomaly_seasonality": "daily",
"anomaly_span": "last_1d",
"anomaly_threshold": 0.15,
"anomaly_window": "last_1h",
"forecast_deviations": 1,
"forecast_enabled": false,
"forecast_rollup_type": "avg",
"forecast_rollup_value": 300,
"forecast_threshold": 1000
},
"logs_indexed": {
"anomaly_deviations": 2,
"anomaly_enabled": false,
"anomaly_rollup": 60,
"anomaly_seasonality": "hourly",
"anomaly_span": "last_1d",
"anomaly_threshold": 0.15,
"anomaly_window": "last_1h",
"forecast_deviations": 1,
"forecast_enabled": false,
"forecast_rollup_type": "sum",
"forecast_rollup_value": 86400,
"forecast_threshold": 1000
},
"logs_ingested": {
"anomaly_deviations": 2,
"anomaly_enabled": false,
"anomaly_rollup": 60,
"anomaly_seasonality": "hourly",
"anomaly_span": "last_1d",
"anomaly_threshold": 0.15,
"anomaly_window": "last_1h",
"forecast_deviations": 1,
"forecast_enabled": false,
"forecast_rollup_type": "sum",
"forecast_rollup_value": 86400,
"forecast_threshold": 1000
}
}
| no | -| [install\_log\_forwarder](#input\_install\_log\_forwarder) | controls whether log forwarder lambda should be installed | `bool` | `true` | no | -| [integration\_default\_namespace\_rules](#input\_integration\_default\_namespace\_rules) | Set all services to disabled by default. | `map(bool)` |
{
"api_gateway": false,
"application_elb": false,
"apprunner": false,
"appstream": false,
"appsync": false,
"athena": false,
"auto_scaling": false,
"backup": false,
"bedrock": false,
"billing": false,
"budgeting": false,
"certificatemanager": false,
"cloudfront": false,
"cloudhsm": false,
"cloudsearch": false,
"cloudwatch_events": false,
"cloudwatch_logs": false,
"codebuild": false,
"codewhisperer": false,
"cognito": false,
"collect_custom_metrics": false,
"connect": false,
"crawl_alarms": false,
"directconnect": false,
"dms": false,
"documentdb": false,
"dynamodb": false,
"dynamodbaccelerator": false,
"ebs": false,
"ec2": false,
"ec2api": false,
"ec2spot": false,
"ecr": false,
"ecs": false,
"efs": false,
"elasticache": false,
"elasticbeanstalk": false,
"elasticinference": false,
"elastictranscoder": false,
"elb": false,
"emr": false,
"es": false,
"firehose": false,
"fsx": false,
"gamelift": false,
"globalaccelerator": false,
"glue": false,
"inspector": false,
"iot": false,
"keyspaces": false,
"kinesis": false,
"kinesis_analytics": false,
"kms": false,
"lambda": false,
"lex": false,
"mediaconnect": false,
"mediaconvert": false,
"medialive": false,
"mediapackage": false,
"mediastore": false,
"mediatailor": false,
"memorydb": false,
"ml": false,
"mq": false,
"msk": false,
"mwaa": false,
"nat_gateway": false,
"neptune": false,
"network_elb": false,
"networkfirewall": false,
"networkmonitor": false,
"opsworks": false,
"polly": false,
"privatelinkendpoints": false,
"privatelinkservices": false,
"rds": false,
"rdsproxy": false,
"redshift": false,
"rekognition": false,
"route53": false,
"route53resolver": false,
"s3": false,
"s3storagelens": false,
"sagemaker": false,
"sagemakerendpoints": false,
"sagemakerlabelingjobs": false,
"sagemakermodelbuildingpipeline": false,
"sagemakerprocessingjobs": false,
"sagemakertrainingjobs": false,
"sagemakertransformjobs": false,
"sagemakerworkteam": false,
"service_quotas": false,
"ses": false,
"shield": false,
"sns": false,
"sqs": false,
"step_functions": false,
"storage_gateway": false,
"swf": false,
"textract": false,
"transitgateway": false,
"translate": false,
"trusted_advisor": false,
"usage": false,
"vpn": false,
"waf": false,
"wafv2": false,
"workspaces": false,
"xray": false
}
| no | -| [integration\_excluded\_regions](#input\_integration\_excluded\_regions) | Regions to exclude from DataDog monitoring | `list(string)` | `[]` | no | -| [integration\_filter\_tags](#input\_integration\_filter\_tags) | Tags to filter EC2 instances on (see https://registry.terraform.io/providers/DataDog/datadog/latest/docs/resources/integration_aws) | `list(string)` | `[]` | no | -| [integration\_host\_tags](#input\_integration\_host\_tags) | Tags to apply to instances (see https://registry.terraform.io/providers/DataDog/datadog/latest/docs/resources/integration_aws) | `list(string)` | `[]` | no | -| [integration\_namespace\_rules](#input\_integration\_namespace\_rules) | Map of AWS services to allow in the integration. Defaults to none. | `map(bool)` | `{}` | no | -| [log\_forwarder\_sources](#input\_log\_forwarder\_sources) | List of services to automatically ingest all logs from (see https://docs.datadoghq.com/api/latest/aws-logs-integration/#get-list-of-aws-log-ready-services) | `list(string)` | `[]` | no | -| [logs\_main\_index\_daily\_limit](#input\_logs\_main\_index\_daily\_limit) | Daily log limit for the main index (only used if `logs_manage_main_index == true`) | `number` | `null` | no | -| [logs\_main\_index\_daily\_limit\_reset\_offset](#input\_logs\_main\_index\_daily\_limit\_reset\_offset) | The reset time timezone offset for the daily limit of the main logs index (specify as +HH:MM or -HH:MM) | `string` | `"+00:00"` | no | -| [logs\_main\_index\_daily\_limit\_reset\_time](#input\_logs\_main\_index\_daily\_limit\_reset\_time) | The reset time for the daily limit of the main logs index (specify as HH:MM) | `string` | `"00:00"` | no | -| [logs\_main\_index\_daily\_limit\_warn\_threshold](#input\_logs\_main\_index\_daily\_limit\_warn\_threshold) | Warning threshold for daily log volume for the main index (only used if `logs_manage_main_index == true`) | `number` | `0.9` | no | -| [logs\_main\_index\_exclusion\_filters](#input\_logs\_main\_index\_exclusion\_filters) | A list of maps defining exclusion filters for the main index |
list(object({
name = string
is_enabled = bool
filter = object({
query = string
sample_rate = number
})
}))
| `[]` | no | -| [logs\_main\_index\_retention\_days](#input\_logs\_main\_index\_retention\_days) | The number of days to retain logs in the main index (only used if `logs_manage_main_index == true`) | `number` | `15` | no | -| [logs\_manage\_main\_index](#input\_logs\_manage\_main\_index) | A boolean flag to manage the main Datadog logs index | `bool` | `false` | no | -| [name](#input\_name) | Moniker to apply to all resources in the module | `string` | n/a | yes | -| [rds\_enhanced\_monitoring\_forwarder\_version](#input\_rds\_enhanced\_monitoring\_forwarder\_version) | Version of the Datadog RDS enhanced monitoring lambda to use (module is only tested against the default version) | `string` | `"3.103.0"` | no | -| [tags](#input\_tags) | User-Defined tags | `map(string)` | `{}` | no | -| [use\_full\_permissions](#input\_use\_full\_permissions) | Controls whether DataDog is given full permissions or core permissions. Generally you want full. | `bool` | `true` | no | - -## Outputs - -| Name | Description | -|------|-------------| -| [iam\_role\_datadog](#output\_iam\_role\_datadog) | IAM role assumed by Datadog resources | -| [lambda\_arn\_forwarder](#output\_lambda\_arn\_forwarder) | DataDog Lambda Forwarder ARN | - - - -## Requirements - -No requirements. - -## Providers - -No providers. - -## Modules - -No modules. - -## Resources - -No resources. - -## Inputs - -No inputs. - -## Outputs - -No outputs. - From 1d730431c56f805d5131b5d66a4f2157fb858faa Mon Sep 17 00:00:00 2001 From: Cris Daniluk Date: Tue, 12 Mar 2024 21:09:05 -0400 Subject: [PATCH 04/77] bug fixes and tuning --- .github/workflows/tfsec.yaml | 26 ------------- README.md | 16 ++++---- aws/alb/.terraform.lock.hcl | 44 +++++++++++++++++++++ aws/alb/main.tf | 16 ++++---- aws/apigateway/.terraform.lock.hcl | 44 +++++++++++++++++++++ aws/apigateway/main.tf | 6 +-- aws/beanstalk/.terraform.lock.hcl | 44 +++++++++++++++++++++ aws/beanstalk/main.tf | 10 ++--- aws/ec2/.terraform.lock.hcl | 44 +++++++++++++++++++++ aws/ec2/README.md | 2 + aws/ec2/main.tf | 28 ++++++-------- aws/ec2/variables.tf | 56 ++------------------------- aws/ecs-cluster/.terraform.lock.hcl | 44 +++++++++++++++++++++ aws/ecs-cluster/main.tf | 6 +-- aws/ecs-fargate/.terraform.lock.hcl | 44 +++++++++++++++++++++ aws/ecs-fargate/main.tf | 8 ++-- aws/ecs-service/.terraform.lock.hcl | 44 +++++++++++++++++++++ aws/ecs-service/main.tf | 10 ++--- aws/elasticache/.terraform.lock.hcl | 44 +++++++++++++++++++++ aws/elasticache/main.tf | 14 +++---- aws/elasticsearch/.terraform.lock.hcl | 44 +++++++++++++++++++++ aws/elasticsearch/README.md | 4 +- aws/elasticsearch/main.tf | 11 +++--- aws/elasticsearch/variables.tf | 2 +- aws/elb/.terraform.lock.hcl | 44 +++++++++++++++++++++ aws/elb/main.tf | 16 ++++---- aws/lambda/.terraform.lock.hcl | 44 +++++++++++++++++++++ aws/lambda/README.md | 6 +-- aws/lambda/main.tf | 30 +++++++------- aws/rds/.terraform.lock.hcl | 44 +++++++++++++++++++++ aws/rds/README.md | 2 +- aws/rds/main.tf | 12 +++--- 32 files changed, 632 insertions(+), 177 deletions(-) delete mode 100644 .github/workflows/tfsec.yaml create mode 100644 aws/alb/.terraform.lock.hcl create mode 100644 aws/apigateway/.terraform.lock.hcl create mode 100644 aws/beanstalk/.terraform.lock.hcl create mode 100644 aws/ec2/.terraform.lock.hcl create mode 100644 aws/ecs-cluster/.terraform.lock.hcl create mode 100644 aws/ecs-fargate/.terraform.lock.hcl create mode 100644 aws/ecs-service/.terraform.lock.hcl create mode 100644 aws/elasticache/.terraform.lock.hcl create mode 100644 aws/elasticsearch/.terraform.lock.hcl create mode 100644 aws/elb/.terraform.lock.hcl create mode 100644 aws/lambda/.terraform.lock.hcl create mode 100644 aws/rds/.terraform.lock.hcl diff --git a/.github/workflows/tfsec.yaml b/.github/workflows/tfsec.yaml deleted file mode 100644 index 2f75a3e..0000000 --- a/.github/workflows/tfsec.yaml +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: tfsec -on: - push: - branches: - - main - - master - - prod - - develop - -jobs: - tfsec: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Install prerequisites - run: ./bin/install-ubuntu.sh - - name: Terraform init - run: terraform init --backend=false - - name: tfsec - uses: reviewdog/action-tfsec@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - reporter: github-check - filter_mode: nofilter - level: error diff --git a/README.md b/README.md index 537c22d..62593d8 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,12 @@ -# terraform-datadog-monitors +# terraform-datadog-monitor -[![tflint](https://github.com/rhythmictech/terraform-datadog-monitors/workflows/tflint/badge.svg?branch=master&event=push)](https://github.com/rhythmictech/terraform-datadog-monitors/actions?query=workflow%3Atflint+event%3Apush+branch%3Amaster) -[![tfsec](https://github.com/rhythmictech/terraform-datadog-monitors/workflows/tfsec/badge.svg?branch=master&event=push)](https://github.com/rhythmictech/terraform-datadog-monitors/actions?query=workflow%3Atfsec+event%3Apush+branch%3Amaster) -[![yamllint](https://github.com/rhythmictech/terraform-datadog-monitors/workflows/yamllint/badge.svg?branch=master&event=push)](https://github.com/rhythmictech/terraform-datadog-monitors/actions?query=workflow%3Ayamllint+event%3Apush+branch%3Amaster) -[![misspell](https://github.com/rhythmictech/terraform-datadog-monitors/workflows/misspell/badge.svg?branch=master&event=push)](https://github.com/rhythmictech/terraform-datadog-monitors/actions?query=workflow%3Amisspell+event%3Apush+branch%3Amaster) -[![pre-commit-check](https://github.com/rhythmictech/terraform-datadog-monitors/workflows/pre-commit-check/badge.svg?branch=master&event=push)](https://github.com/rhythmictech/terraform-datadog-monitors/actions?query=workflow%3Apre-commit-check+event%3Apush+branch%3Amaster) +A collection of semi-opinionated Datadog monitors for a variety of use cases. + +[![tflint](https://github.com/rhythmictech/terraform-datadog-monitor/workflows/tflint/badge.svg?branch=master&event=push)](https://github.com/rhythmictech/terraform-datadog-monitor/actions?query=workflow%3Atflint+event%3Apush+branch%3Amaster) +[![tfsec](https://github.com/rhythmictech/terraform-datadog-monitor/workflows/tfsec/badge.svg?branch=master&event=push)](https://github.com/rhythmictech/terraform-datadog-monitor/actions?query=workflow%3Atfsec+event%3Apush+branch%3Amaster) +[![yamllint](https://github.com/rhythmictech/terraform-datadog-monitor/workflows/yamllint/badge.svg?branch=master&event=push)](https://github.com/rhythmictech/terraform-datadog-monitor/actions?query=workflow%3Ayamllint+event%3Apush+branch%3Amaster) +[![misspell](https://github.com/rhythmictech/terraform-datadog-monitor/workflows/misspell/badge.svg?branch=master&event=push)](https://github.com/rhythmictech/terraform-datadog-monitor/actions?query=workflow%3Amisspell+event%3Apush+branch%3Amaster) +[![pre-commit-check](https://github.com/rhythmictech/terraform-datadog-monitor/workflows/pre-commit-check/badge.svg?branch=master&event=push)](https://github.com/rhythmictech/terraform-datadog-monitor/actions?query=workflow%3Apre-commit-check+event%3Apush+branch%3Amaster) follow on Twitter ## Requirements @@ -19,7 +21,7 @@ provider "datadog" { } module "monitor" { - source = "rhythmictech/monitors/datadog/module" + source = "rhythmictech/monitors/datadog/aws/ec2" } ``` diff --git a/aws/alb/.terraform.lock.hcl b/aws/alb/.terraform.lock.hcl new file mode 100644 index 0000000..d53197d --- /dev/null +++ b/aws/alb/.terraform.lock.hcl @@ -0,0 +1,44 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/datadog/datadog" { + version = "3.37.0" + constraints = ">= 3.37.0" + hashes = [ + "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", + "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", + "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", + "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", + "zh:47e9008c9aa0e58e0c7eb71cac0408a74399180961cd9f23807fedb3a52b4df9", + "zh:620f32bfcdfbc0ce2316d5e3b5587cdbace901706d08be70f591ef22f0cda40b", + "zh:760fc52ff88ff34f2e7ed9f2d78dc2f7509c06faa133b811bd74fdb92032ae19", + "zh:805ae94bbec4a213859bbb0f3d98a013792f55b782996fecc40b39933b83afed", + "zh:88b040e6cd964e9bef62b5eaeed8330377a40fc197de43df842741fea241bc78", + "zh:8dee6c95f23479bb7469c2648351a8f42f696deeab59287385f2ac32868e444f", + "zh:bb0c18c9e85d19cf176999e0e636a5461c2a041ed7cfe560632b9bba3eb3085b", + "zh:d4f133a24d0881c772d73ab4b4b5e7f28a02a26eca1674c5c77a9bd983151ad7", + "zh:dc488ef450760162f3d4306497a065649fe65967eadd2a7a9a2239f4ba751a9c", + "zh:dcd88c3747c9a348c317b4a1ecadb7756de879085c6014cf368d63ce60526176", + "zh:f0b1eb479c13fd0a4f724e7ada1bd08fc69032ecc866619800e2742e23882730", + ] +} + +provider "registry.terraform.io/hashicorp/null" { + version = "3.2.2" + constraints = ">= 3.1.0" + hashes = [ + "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", + "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", + "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", + "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", + "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", + "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", + "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", + "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", + "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", + "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", + ] +} diff --git a/aws/alb/main.tf b/aws/alb/main.tf index 928c5a5..7e24d32 100644 --- a/aws/alb/main.tf +++ b/aws/alb/main.tf @@ -27,8 +27,8 @@ resource "datadog_monitor" "http_5xx_responses" { query = < ${var.http_5xx_responses_threshold_critical} END @@ -57,8 +57,8 @@ resource "datadog_monitor" "http_5xx_tg_responses" { query = < ${var.http_5xx_tg_responses_threshold_critical} END @@ -88,7 +88,7 @@ resource "datadog_monitor" "latency" { query = < ${var.latency_threshold_critical} END @@ -117,9 +117,9 @@ resource "datadog_monitor" "no_healthy_instances" { query = < ${var.http_5xx_responses_threshold_critical} END @@ -57,7 +57,7 @@ resource "datadog_monitor" "latency" { query = < ${var.latency_threshold_critical} END diff --git a/aws/beanstalk/.terraform.lock.hcl b/aws/beanstalk/.terraform.lock.hcl new file mode 100644 index 0000000..d53197d --- /dev/null +++ b/aws/beanstalk/.terraform.lock.hcl @@ -0,0 +1,44 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/datadog/datadog" { + version = "3.37.0" + constraints = ">= 3.37.0" + hashes = [ + "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", + "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", + "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", + "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", + "zh:47e9008c9aa0e58e0c7eb71cac0408a74399180961cd9f23807fedb3a52b4df9", + "zh:620f32bfcdfbc0ce2316d5e3b5587cdbace901706d08be70f591ef22f0cda40b", + "zh:760fc52ff88ff34f2e7ed9f2d78dc2f7509c06faa133b811bd74fdb92032ae19", + "zh:805ae94bbec4a213859bbb0f3d98a013792f55b782996fecc40b39933b83afed", + "zh:88b040e6cd964e9bef62b5eaeed8330377a40fc197de43df842741fea241bc78", + "zh:8dee6c95f23479bb7469c2648351a8f42f696deeab59287385f2ac32868e444f", + "zh:bb0c18c9e85d19cf176999e0e636a5461c2a041ed7cfe560632b9bba3eb3085b", + "zh:d4f133a24d0881c772d73ab4b4b5e7f28a02a26eca1674c5c77a9bd983151ad7", + "zh:dc488ef450760162f3d4306497a065649fe65967eadd2a7a9a2239f4ba751a9c", + "zh:dcd88c3747c9a348c317b4a1ecadb7756de879085c6014cf368d63ce60526176", + "zh:f0b1eb479c13fd0a4f724e7ada1bd08fc69032ecc866619800e2742e23882730", + ] +} + +provider "registry.terraform.io/hashicorp/null" { + version = "3.2.2" + constraints = ">= 3.1.0" + hashes = [ + "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", + "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", + "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", + "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", + "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", + "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", + "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", + "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", + "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", + "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", + ] +} diff --git a/aws/beanstalk/main.tf b/aws/beanstalk/main.tf index 28aa322..0f4fe29 100644 --- a/aws/beanstalk/main.tf +++ b/aws/beanstalk/main.tf @@ -40,7 +40,7 @@ resource "datadog_monitor" "health" { query = <= ${var.health_threshold_critical} END @@ -69,8 +69,8 @@ resource "datadog_monitor" "http_5xx_responses" { query = < ${var.http_5xx_responses_threshold_critical} END @@ -98,7 +98,7 @@ resource "datadog_monitor" "latency" { timeout_h = var.timeout_h query = <= ${var.latency_threshold_critical} END @@ -127,7 +127,7 @@ resource "datadog_monitor" "root_disk_usage" { query = <= ${var.root_disk_usage_threshold_critical} END diff --git a/aws/ec2/.terraform.lock.hcl b/aws/ec2/.terraform.lock.hcl new file mode 100644 index 0000000..d53197d --- /dev/null +++ b/aws/ec2/.terraform.lock.hcl @@ -0,0 +1,44 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/datadog/datadog" { + version = "3.37.0" + constraints = ">= 3.37.0" + hashes = [ + "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", + "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", + "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", + "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", + "zh:47e9008c9aa0e58e0c7eb71cac0408a74399180961cd9f23807fedb3a52b4df9", + "zh:620f32bfcdfbc0ce2316d5e3b5587cdbace901706d08be70f591ef22f0cda40b", + "zh:760fc52ff88ff34f2e7ed9f2d78dc2f7509c06faa133b811bd74fdb92032ae19", + "zh:805ae94bbec4a213859bbb0f3d98a013792f55b782996fecc40b39933b83afed", + "zh:88b040e6cd964e9bef62b5eaeed8330377a40fc197de43df842741fea241bc78", + "zh:8dee6c95f23479bb7469c2648351a8f42f696deeab59287385f2ac32868e444f", + "zh:bb0c18c9e85d19cf176999e0e636a5461c2a041ed7cfe560632b9bba3eb3085b", + "zh:d4f133a24d0881c772d73ab4b4b5e7f28a02a26eca1674c5c77a9bd983151ad7", + "zh:dc488ef450760162f3d4306497a065649fe65967eadd2a7a9a2239f4ba751a9c", + "zh:dcd88c3747c9a348c317b4a1ecadb7756de879085c6014cf368d63ce60526176", + "zh:f0b1eb479c13fd0a4f724e7ada1bd08fc69032ecc866619800e2742e23882730", + ] +} + +provider "registry.terraform.io/hashicorp/null" { + version = "3.2.2" + constraints = ">= 3.1.0" + hashes = [ + "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", + "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", + "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", + "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", + "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", + "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", + "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", + "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", + "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", + "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", + ] +} diff --git a/aws/ec2/README.md b/aws/ec2/README.md index 578e4e0..9feda50 100644 --- a/aws/ec2/README.md +++ b/aws/ec2/README.md @@ -2,6 +2,8 @@ Configures monitors for EC2 instance health, including host issues, instance status check, ec2 status checks, and attached volume status check. +All checks are enabled by default. + ## Requirements diff --git a/aws/ec2/main.tf b/aws/ec2/main.tf index c75eefa..0b00a0b 100644 --- a/aws/ec2/main.tf +++ b/aws/ec2/main.tf @@ -19,16 +19,15 @@ resource "datadog_monitor" "status_failed_check" { evaluation_delay = var.evaluation_delay new_group_delay = var.new_group_delay - notify_no_data = var.notify_no_data - no_data_timeframe = var.status_failed_check_no_data_window + notify_no_data = false renotify_interval = var.renotify_interval require_full_window = true timeout_h = var.timeout_h query = <= 1 END monitor_thresholds { @@ -47,16 +46,15 @@ resource "datadog_monitor" "status_failed_instance" { evaluation_delay = var.evaluation_delay new_group_delay = var.new_group_delay - notify_no_data = var.notify_no_data - no_data_timeframe = var.status_failed_instance_no_data_window + notify_no_data = false renotify_interval = var.renotify_interval require_full_window = true timeout_h = var.timeout_h query = <= 1 END monitor_thresholds { @@ -75,16 +73,15 @@ resource "datadog_monitor" "status_failed_system" { evaluation_delay = var.evaluation_delay new_group_delay = var.new_group_delay - notify_no_data = var.notify_no_data - no_data_timeframe = var.status_failed_system_no_data_window + notify_no_data = false renotify_interval = var.renotify_interval require_full_window = true timeout_h = var.timeout_h query = <= 1 END monitor_thresholds { @@ -103,16 +100,15 @@ resource "datadog_monitor" "status_failed_volume" { evaluation_delay = var.evaluation_delay new_group_delay = var.new_group_delay - notify_no_data = var.notify_no_data - no_data_timeframe = var.status_failed_volume_no_data_window + notify_no_data = false renotify_interval = var.renotify_interval require_full_window = true timeout_h = var.timeout_h query = <= 1 END monitor_thresholds { diff --git a/aws/ec2/variables.tf b/aws/ec2/variables.tf index a6eaf80..b27bf0d 100644 --- a/aws/ec2/variables.tf +++ b/aws/ec2/variables.tf @@ -17,7 +17,7 @@ variable "base_tags" { # EC2 instance status checsk ######################################## variable "status_failed_check_enabled" { - default = false + default = true description = "Enable ec2 instance status check monitor" type = bool } @@ -34,23 +34,11 @@ variable "status_failed_check_no_data_window" { type = number } -variable "status_failed_check_threshold_critical" { - default = 75 - description = "Critical threshold (percentage, 0-100)" - type = number -} - -variable "status_failed_check_threshold_warning" { - default = 25 - description = "Warning threshold (percentage, 0-100)" - type = number -} - ######################################## # Instance status check ######################################## variable "status_failed_instance_enabled" { - default = false + default = true description = "Enable instance status check monitor" type = bool } @@ -67,23 +55,11 @@ variable "status_failed_instance_no_data_window" { type = number } -variable "status_failed_instance_threshold_critical" { - default = 75 - description = "Critical threshold (percentage, 0-100)" - type = number -} - -variable "status_failed_instance_threshold_warning" { - default = 25 - description = "Warning threshold (percentage, 0-100)" - type = number -} - ##################################### # system host status check ######################################## variable "status_failed_system_enabled" { - default = false + default = true description = "Enable instance system failure monitor" type = bool } @@ -100,23 +76,11 @@ variable "status_failed_system_no_data_window" { type = number } -variable "status_failed_system_threshold_critical" { - default = 75 - description = "Critical threshold (percentage, 0-100)" - type = number -} - -variable "status_failed_system_threshold_warning" { - default = 25 - description = "Warning threshold (percentage, 0-100)" - type = number -} - ##################################### # Attached volume status check ######################################## variable "status_failed_volume_enabled" { - default = false + default = true description = "Enable attached volume status monitor" type = bool } @@ -132,15 +96,3 @@ variable "status_failed_volume_no_data_window" { description = "No data threshold (in minutes, 0 to disable)" type = number } - -variable "status_failed_volume_threshold_critical" { - default = 75 - description = "Critical threshold (percentage, 0-100)" - type = number -} - -variable "status_failed_volume_threshold_warning" { - default = 25 - description = "Warning threshold (percentage, 0-100)" - type = number -} diff --git a/aws/ecs-cluster/.terraform.lock.hcl b/aws/ecs-cluster/.terraform.lock.hcl new file mode 100644 index 0000000..d53197d --- /dev/null +++ b/aws/ecs-cluster/.terraform.lock.hcl @@ -0,0 +1,44 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/datadog/datadog" { + version = "3.37.0" + constraints = ">= 3.37.0" + hashes = [ + "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", + "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", + "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", + "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", + "zh:47e9008c9aa0e58e0c7eb71cac0408a74399180961cd9f23807fedb3a52b4df9", + "zh:620f32bfcdfbc0ce2316d5e3b5587cdbace901706d08be70f591ef22f0cda40b", + "zh:760fc52ff88ff34f2e7ed9f2d78dc2f7509c06faa133b811bd74fdb92032ae19", + "zh:805ae94bbec4a213859bbb0f3d98a013792f55b782996fecc40b39933b83afed", + "zh:88b040e6cd964e9bef62b5eaeed8330377a40fc197de43df842741fea241bc78", + "zh:8dee6c95f23479bb7469c2648351a8f42f696deeab59287385f2ac32868e444f", + "zh:bb0c18c9e85d19cf176999e0e636a5461c2a041ed7cfe560632b9bba3eb3085b", + "zh:d4f133a24d0881c772d73ab4b4b5e7f28a02a26eca1674c5c77a9bd983151ad7", + "zh:dc488ef450760162f3d4306497a065649fe65967eadd2a7a9a2239f4ba751a9c", + "zh:dcd88c3747c9a348c317b4a1ecadb7756de879085c6014cf368d63ce60526176", + "zh:f0b1eb479c13fd0a4f724e7ada1bd08fc69032ecc866619800e2742e23882730", + ] +} + +provider "registry.terraform.io/hashicorp/null" { + version = "3.2.2" + constraints = ">= 3.1.0" + hashes = [ + "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", + "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", + "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", + "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", + "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", + "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", + "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", + "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", + "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", + "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", + ] +} diff --git a/aws/ecs-cluster/main.tf b/aws/ecs-cluster/main.tf index 6aa711c..7d8af51 100644 --- a/aws/ecs-cluster/main.tf +++ b/aws/ecs-cluster/main.tf @@ -57,7 +57,7 @@ resource "datadog_monitor" "cpu_utilization" { query = < ${var.cpu_utilization_threshold_critical} END @@ -86,7 +86,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { query = <= ${var.cpu_utilization_anomaly_threshold_critical} @@ -122,7 +122,7 @@ resource "datadog_monitor" "memory_reservation" { query = < ${var.memory_reservation_threshold_critical} END diff --git a/aws/ecs-fargate/.terraform.lock.hcl b/aws/ecs-fargate/.terraform.lock.hcl new file mode 100644 index 0000000..d53197d --- /dev/null +++ b/aws/ecs-fargate/.terraform.lock.hcl @@ -0,0 +1,44 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/datadog/datadog" { + version = "3.37.0" + constraints = ">= 3.37.0" + hashes = [ + "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", + "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", + "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", + "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", + "zh:47e9008c9aa0e58e0c7eb71cac0408a74399180961cd9f23807fedb3a52b4df9", + "zh:620f32bfcdfbc0ce2316d5e3b5587cdbace901706d08be70f591ef22f0cda40b", + "zh:760fc52ff88ff34f2e7ed9f2d78dc2f7509c06faa133b811bd74fdb92032ae19", + "zh:805ae94bbec4a213859bbb0f3d98a013792f55b782996fecc40b39933b83afed", + "zh:88b040e6cd964e9bef62b5eaeed8330377a40fc197de43df842741fea241bc78", + "zh:8dee6c95f23479bb7469c2648351a8f42f696deeab59287385f2ac32868e444f", + "zh:bb0c18c9e85d19cf176999e0e636a5461c2a041ed7cfe560632b9bba3eb3085b", + "zh:d4f133a24d0881c772d73ab4b4b5e7f28a02a26eca1674c5c77a9bd983151ad7", + "zh:dc488ef450760162f3d4306497a065649fe65967eadd2a7a9a2239f4ba751a9c", + "zh:dcd88c3747c9a348c317b4a1ecadb7756de879085c6014cf368d63ce60526176", + "zh:f0b1eb479c13fd0a4f724e7ada1bd08fc69032ecc866619800e2742e23882730", + ] +} + +provider "registry.terraform.io/hashicorp/null" { + version = "3.2.2" + constraints = ">= 3.1.0" + hashes = [ + "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", + "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", + "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", + "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", + "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", + "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", + "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", + "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", + "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", + "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", + ] +} diff --git a/aws/ecs-fargate/main.tf b/aws/ecs-fargate/main.tf index 9d2c461..12f8bcb 100644 --- a/aws/ecs-fargate/main.tf +++ b/aws/ecs-fargate/main.tf @@ -56,7 +56,7 @@ resource "datadog_monitor" "cpu_utilization" { query = < ${var.cpu_utilization_threshold_critical} END @@ -85,7 +85,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { query = <= ${var.cpu_utilization_anomaly_threshold_critical} @@ -121,8 +121,8 @@ resource "datadog_monitor" "memory_utilization" { query = <= ${var.memory_utilization_threshold_critical} END diff --git a/aws/ecs-service/.terraform.lock.hcl b/aws/ecs-service/.terraform.lock.hcl new file mode 100644 index 0000000..d53197d --- /dev/null +++ b/aws/ecs-service/.terraform.lock.hcl @@ -0,0 +1,44 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/datadog/datadog" { + version = "3.37.0" + constraints = ">= 3.37.0" + hashes = [ + "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", + "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", + "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", + "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", + "zh:47e9008c9aa0e58e0c7eb71cac0408a74399180961cd9f23807fedb3a52b4df9", + "zh:620f32bfcdfbc0ce2316d5e3b5587cdbace901706d08be70f591ef22f0cda40b", + "zh:760fc52ff88ff34f2e7ed9f2d78dc2f7509c06faa133b811bd74fdb92032ae19", + "zh:805ae94bbec4a213859bbb0f3d98a013792f55b782996fecc40b39933b83afed", + "zh:88b040e6cd964e9bef62b5eaeed8330377a40fc197de43df842741fea241bc78", + "zh:8dee6c95f23479bb7469c2648351a8f42f696deeab59287385f2ac32868e444f", + "zh:bb0c18c9e85d19cf176999e0e636a5461c2a041ed7cfe560632b9bba3eb3085b", + "zh:d4f133a24d0881c772d73ab4b4b5e7f28a02a26eca1674c5c77a9bd983151ad7", + "zh:dc488ef450760162f3d4306497a065649fe65967eadd2a7a9a2239f4ba751a9c", + "zh:dcd88c3747c9a348c317b4a1ecadb7756de879085c6014cf368d63ce60526176", + "zh:f0b1eb479c13fd0a4f724e7ada1bd08fc69032ecc866619800e2742e23882730", + ] +} + +provider "registry.terraform.io/hashicorp/null" { + version = "3.2.2" + constraints = ">= 3.1.0" + hashes = [ + "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", + "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", + "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", + "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", + "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", + "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", + "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", + "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", + "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", + "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", + ] +} diff --git a/aws/ecs-service/main.tf b/aws/ecs-service/main.tf index 29ecc7e..0e8c98f 100644 --- a/aws/ecs-service/main.tf +++ b/aws/ecs-service/main.tf @@ -28,8 +28,8 @@ resource "datadog_monitor" "running_tasks" { query = <= ${var.cpu_utilization_threshold_critical} END @@ -87,7 +87,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { query = <= ${var.cpu_utilization_anomaly_threshold_critical} @@ -123,7 +123,7 @@ resource "datadog_monitor" "memory_utilization" { query = <= ${var.memory_utilization_threshold_critical} END diff --git a/aws/elasticache/.terraform.lock.hcl b/aws/elasticache/.terraform.lock.hcl new file mode 100644 index 0000000..d53197d --- /dev/null +++ b/aws/elasticache/.terraform.lock.hcl @@ -0,0 +1,44 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/datadog/datadog" { + version = "3.37.0" + constraints = ">= 3.37.0" + hashes = [ + "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", + "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", + "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", + "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", + "zh:47e9008c9aa0e58e0c7eb71cac0408a74399180961cd9f23807fedb3a52b4df9", + "zh:620f32bfcdfbc0ce2316d5e3b5587cdbace901706d08be70f591ef22f0cda40b", + "zh:760fc52ff88ff34f2e7ed9f2d78dc2f7509c06faa133b811bd74fdb92032ae19", + "zh:805ae94bbec4a213859bbb0f3d98a013792f55b782996fecc40b39933b83afed", + "zh:88b040e6cd964e9bef62b5eaeed8330377a40fc197de43df842741fea241bc78", + "zh:8dee6c95f23479bb7469c2648351a8f42f696deeab59287385f2ac32868e444f", + "zh:bb0c18c9e85d19cf176999e0e636a5461c2a041ed7cfe560632b9bba3eb3085b", + "zh:d4f133a24d0881c772d73ab4b4b5e7f28a02a26eca1674c5c77a9bd983151ad7", + "zh:dc488ef450760162f3d4306497a065649fe65967eadd2a7a9a2239f4ba751a9c", + "zh:dcd88c3747c9a348c317b4a1ecadb7756de879085c6014cf368d63ce60526176", + "zh:f0b1eb479c13fd0a4f724e7ada1bd08fc69032ecc866619800e2742e23882730", + ] +} + +provider "registry.terraform.io/hashicorp/null" { + version = "3.2.2" + constraints = ">= 3.1.0" + hashes = [ + "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", + "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", + "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", + "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", + "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", + "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", + "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", + "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", + "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", + "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", + ] +} diff --git a/aws/elasticache/main.tf b/aws/elasticache/main.tf index 06730fa..1e62b3c 100644 --- a/aws/elasticache/main.tf +++ b/aws/elasticache/main.tf @@ -27,7 +27,7 @@ resource "datadog_monitor" "cpu_utilization" { query = <= ${var.cpu_utilization_threshold_critical} END @@ -56,7 +56,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { query = <= ${var.cpu_utilization_anomaly_threshold_critical} @@ -86,7 +86,7 @@ resource "datadog_monitor" "evictions" { query = <= ${var.evictions_threshold_critical} END @@ -115,7 +115,7 @@ resource "datadog_monitor" "hit_rate" { query = <= ${var.hit_rate_threshold_critical} END @@ -144,7 +144,7 @@ resource "datadog_monitor" "hit_rate_anomaly" { query = <= ${var.hit_rate_anomaly_threshold_critical} @@ -174,7 +174,7 @@ resource "datadog_monitor" "max_connections" { query = <= ${var.max_connections_threshold_critical} END @@ -203,7 +203,7 @@ resource "datadog_monitor" "swap_usage" { query = < ## Requirements diff --git a/aws/elasticsearch/main.tf b/aws/elasticsearch/main.tf index bd80c24..1a06e4c 100644 --- a/aws/elasticsearch/main.tf +++ b/aws/elasticsearch/main.tf @@ -27,7 +27,7 @@ resource "datadog_monitor" "cluster_health_red" { query = <= 1 END @@ -55,7 +55,7 @@ resource "datadog_monitor" "cluster_health_yellow" { query = <= 1 END @@ -83,7 +83,7 @@ resource "datadog_monitor" "cpu_utilization" { query = <= ${var.cpu_utilization_threshold_critical} END @@ -112,7 +112,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { query = <= ${var.cpu_utilization_anomaly_threshold_critical} @@ -148,9 +148,8 @@ resource "datadog_monitor" "free_storage" { query = <= 1 END monitor_thresholds { diff --git a/aws/elasticsearch/variables.tf b/aws/elasticsearch/variables.tf index 2050e03..971cdd4 100644 --- a/aws/elasticsearch/variables.tf +++ b/aws/elasticsearch/variables.tf @@ -155,7 +155,7 @@ variable "cpu_utilization_anomaly_threshold_warning" { # ElasticSearch cluster free storage ######################################## variable "free_storage_enabled" { - default = false + default = true description = "Enable free storage monitor" type = bool } diff --git a/aws/elb/.terraform.lock.hcl b/aws/elb/.terraform.lock.hcl new file mode 100644 index 0000000..d53197d --- /dev/null +++ b/aws/elb/.terraform.lock.hcl @@ -0,0 +1,44 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/datadog/datadog" { + version = "3.37.0" + constraints = ">= 3.37.0" + hashes = [ + "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", + "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", + "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", + "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", + "zh:47e9008c9aa0e58e0c7eb71cac0408a74399180961cd9f23807fedb3a52b4df9", + "zh:620f32bfcdfbc0ce2316d5e3b5587cdbace901706d08be70f591ef22f0cda40b", + "zh:760fc52ff88ff34f2e7ed9f2d78dc2f7509c06faa133b811bd74fdb92032ae19", + "zh:805ae94bbec4a213859bbb0f3d98a013792f55b782996fecc40b39933b83afed", + "zh:88b040e6cd964e9bef62b5eaeed8330377a40fc197de43df842741fea241bc78", + "zh:8dee6c95f23479bb7469c2648351a8f42f696deeab59287385f2ac32868e444f", + "zh:bb0c18c9e85d19cf176999e0e636a5461c2a041ed7cfe560632b9bba3eb3085b", + "zh:d4f133a24d0881c772d73ab4b4b5e7f28a02a26eca1674c5c77a9bd983151ad7", + "zh:dc488ef450760162f3d4306497a065649fe65967eadd2a7a9a2239f4ba751a9c", + "zh:dcd88c3747c9a348c317b4a1ecadb7756de879085c6014cf368d63ce60526176", + "zh:f0b1eb479c13fd0a4f724e7ada1bd08fc69032ecc866619800e2742e23882730", + ] +} + +provider "registry.terraform.io/hashicorp/null" { + version = "3.2.2" + constraints = ">= 3.1.0" + hashes = [ + "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", + "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", + "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", + "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", + "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", + "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", + "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", + "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", + "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", + "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", + ] +} diff --git a/aws/elb/main.tf b/aws/elb/main.tf index 9dbb696..b6a673d 100644 --- a/aws/elb/main.tf +++ b/aws/elb/main.tf @@ -27,8 +27,8 @@ resource "datadog_monitor" "http_5xx_responses" { query = < ${var.http_5xx_responses_threshold_critical} END @@ -57,8 +57,8 @@ resource "datadog_monitor" "http_5xx_backend_responses" { query = < ${var.http_5xx_backend_responses_threshold_critical} END @@ -88,7 +88,7 @@ resource "datadog_monitor" "latency" { query = < ${var.latency_threshold_critical} END @@ -117,9 +117,9 @@ resource "datadog_monitor" "no_healthy_instances" { query = < ${var.error_rate_threshold_critical} END @@ -59,8 +59,8 @@ resource "datadog_monitor" "timeouts" { query = < ${var.timeouts_threshold_critical} END @@ -89,8 +89,8 @@ resource "datadog_monitor" "cold_starts" { query = < ${var.cold_starts_threshold_critical} END @@ -119,8 +119,8 @@ resource "datadog_monitor" "out_of_memory" { query = < ${var.out_of_memory_threshold_critical} END @@ -149,7 +149,7 @@ resource "datadog_monitor" "iterator_age" { query = < ${var.iterator_age_threshold_critical} END @@ -160,6 +160,8 @@ END } resource "datadog_monitor" "iterator_age_forecast" { + count = var.iterator_age_forecast_enabled ? 1 : 0 + name = join("", [local.title_prefix, "Lambda stream data loss forecasted - {{host.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message @@ -176,7 +178,7 @@ resource "datadog_monitor" "iterator_age_forecast" { query = <= 86400000 END @@ -203,10 +205,10 @@ resource "datadog_monitor" "throttle_rate" { timeout_h = var.timeout_h query = < ${var.throttle_rate_threshold_critical} END diff --git a/aws/rds/.terraform.lock.hcl b/aws/rds/.terraform.lock.hcl new file mode 100644 index 0000000..d53197d --- /dev/null +++ b/aws/rds/.terraform.lock.hcl @@ -0,0 +1,44 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/datadog/datadog" { + version = "3.37.0" + constraints = ">= 3.37.0" + hashes = [ + "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", + "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", + "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", + "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", + "zh:47e9008c9aa0e58e0c7eb71cac0408a74399180961cd9f23807fedb3a52b4df9", + "zh:620f32bfcdfbc0ce2316d5e3b5587cdbace901706d08be70f591ef22f0cda40b", + "zh:760fc52ff88ff34f2e7ed9f2d78dc2f7509c06faa133b811bd74fdb92032ae19", + "zh:805ae94bbec4a213859bbb0f3d98a013792f55b782996fecc40b39933b83afed", + "zh:88b040e6cd964e9bef62b5eaeed8330377a40fc197de43df842741fea241bc78", + "zh:8dee6c95f23479bb7469c2648351a8f42f696deeab59287385f2ac32868e444f", + "zh:bb0c18c9e85d19cf176999e0e636a5461c2a041ed7cfe560632b9bba3eb3085b", + "zh:d4f133a24d0881c772d73ab4b4b5e7f28a02a26eca1674c5c77a9bd983151ad7", + "zh:dc488ef450760162f3d4306497a065649fe65967eadd2a7a9a2239f4ba751a9c", + "zh:dcd88c3747c9a348c317b4a1ecadb7756de879085c6014cf368d63ce60526176", + "zh:f0b1eb479c13fd0a4f724e7ada1bd08fc69032ecc866619800e2742e23882730", + ] +} + +provider "registry.terraform.io/hashicorp/null" { + version = "3.2.2" + constraints = ">= 3.1.0" + hashes = [ + "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", + "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", + "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", + "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", + "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", + "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", + "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", + "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", + "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", + "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", + ] +} diff --git a/aws/rds/README.md b/aws/rds/README.md index da15456..cc05203 100644 --- a/aws/rds/README.md +++ b/aws/rds/README.md @@ -5,7 +5,7 @@ Configures the following for RDS databases based on tag matches: * connection rate (anomaly) * cpu utilization * cpu utilization (anomaly) -* free space +* free space (enabled by default) * replica lag diff --git a/aws/rds/main.tf b/aws/rds/main.tf index bae6ab5..f08fb93 100644 --- a/aws/rds/main.tf +++ b/aws/rds/main.tf @@ -27,7 +27,7 @@ resource "datadog_monitor" "connection_count_anomaly" { query = <= ${var.connection_count_anomaly_threshold_critical} @@ -63,7 +63,7 @@ resource "datadog_monitor" "cpu_utilization" { query = <= ${var.cpu_utilization_threshold_critical} END @@ -92,7 +92,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { query = <= ${var.cpu_utilization_anomaly_threshold_critical} @@ -112,7 +112,7 @@ END resource "datadog_monitor" "used_storage" { count = var.used_storage_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ElasticSearch cluster free storage - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "RDS instance free storage - {{host.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -129,8 +129,8 @@ resource "datadog_monitor" "used_storage" { query = <= ${var.used_storage_threshold_critical} END From ca3ed5b9e11f64e8489838c8952f1271dae717bc Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Thu, 6 Jun 2024 13:48:57 -0600 Subject: [PATCH 05/77] add new generic host monitors --- common/common.tf | 2 + host/agent/.terraform.lock.hcl | 44 +++++++++ host/agent/README.md | 0 host/agent/common.tf | 1 + host/agent/main.tf | 35 ++++++++ host/agent/variables.tf | 23 +++++ host/agent/versions.tf | 1 + host/cpu/.terraform.lock.hcl | 44 +++++++++ host/cpu/README.md | 0 host/cpu/common.tf | 1 + host/cpu/main.tf | 37 ++++++++ host/cpu/variables.tf | 53 +++++++++++ host/cpu/versions.tf | 1 + host/disk/.terraform.lock.hcl | 44 +++++++++ host/disk/README.md | 0 host/disk/common.tf | 1 + host/disk/main.tf | 100 +++++++++++++++++++++ host/disk/variables.tf | 149 +++++++++++++++++++++++++++++++ host/disk/versions.tf | 1 + host/memory/.terraform.lock.hcl | 44 +++++++++ host/memory/README.md | 0 host/memory/common.tf | 1 + host/memory/main.tf | 39 ++++++++ host/memory/variables.tf | 47 ++++++++++ host/memory/versions.tf | 1 + host/process/.terraform.lock.hcl | 44 +++++++++ host/process/README.md | 0 host/process/common.tf | 1 + host/process/main.tf | 37 ++++++++ host/process/variables.tf | 53 +++++++++++ host/process/versions.tf | 1 + host/swap/.terraform.lock.hcl | 44 +++++++++ host/swap/README.md | 0 host/swap/common.tf | 1 + host/swap/main.tf | 38 ++++++++ host/swap/variables.tf | 47 ++++++++++ host/swap/versions.tf | 1 + 37 files changed, 936 insertions(+) create mode 100644 host/agent/.terraform.lock.hcl create mode 100644 host/agent/README.md create mode 120000 host/agent/common.tf create mode 100644 host/agent/main.tf create mode 100644 host/agent/variables.tf create mode 120000 host/agent/versions.tf create mode 100644 host/cpu/.terraform.lock.hcl create mode 100644 host/cpu/README.md create mode 120000 host/cpu/common.tf create mode 100644 host/cpu/main.tf create mode 100644 host/cpu/variables.tf create mode 120000 host/cpu/versions.tf create mode 100644 host/disk/.terraform.lock.hcl create mode 100644 host/disk/README.md create mode 120000 host/disk/common.tf create mode 100644 host/disk/main.tf create mode 100644 host/disk/variables.tf create mode 120000 host/disk/versions.tf create mode 100644 host/memory/.terraform.lock.hcl create mode 100644 host/memory/README.md create mode 120000 host/memory/common.tf create mode 100644 host/memory/main.tf create mode 100644 host/memory/variables.tf create mode 120000 host/memory/versions.tf create mode 100644 host/process/.terraform.lock.hcl create mode 100644 host/process/README.md create mode 120000 host/process/common.tf create mode 100644 host/process/main.tf create mode 100644 host/process/variables.tf create mode 120000 host/process/versions.tf create mode 100644 host/swap/.terraform.lock.hcl create mode 100644 host/swap/README.md create mode 120000 host/swap/common.tf create mode 100644 host/swap/main.tf create mode 100644 host/swap/variables.tf create mode 120000 host/swap/versions.tf diff --git a/common/common.tf b/common/common.tf index dab8e0b..a770728 100644 --- a/common/common.tf +++ b/common/common.tf @@ -1,3 +1,5 @@ +# tflint-ignore-file: terraform_unused_declarations + ######################################## # Tag Related Vars ######################################## diff --git a/host/agent/.terraform.lock.hcl b/host/agent/.terraform.lock.hcl new file mode 100644 index 0000000..0791549 --- /dev/null +++ b/host/agent/.terraform.lock.hcl @@ -0,0 +1,44 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/datadog/datadog" { + version = "3.39.0" + constraints = ">= 3.37.0" + hashes = [ + "h1:6rSVMI3RBWRHA70wH8eIGyzH1IZHu1hwdixT+UbD9S0=", + "zh:3389298e5116232edd1c6e64c7a83f696d5663f1a1c7da5bb32be3472faa4a9e", + "zh:39b5d91e58372716d9c7d4869e8391612d3799a936f7c94cc9b3efbe08f4a6d9", + "zh:4a077105269fd187fc751a390d3e894092a2dd1b44e7e76ff9923968d971dc6a", + "zh:4ddfc1d5839eb4b88bdf3c620bc7f3a94c850d5e5a21b8c818bba63c4f264d24", + "zh:65d076f03bbaa2782c7487411bda925c14ee4841aefd0eda5442c5e4e73856cd", + "zh:7e357a7fe969c7ccbcb755799b95612f9e0bd835cfd993b05b5303c6dde1ffbd", + "zh:a1f11d390762eddaeef701c9d2747c8a9e113afa7fe7284210d62a21d1113f6e", + "zh:a7a17b04e66d7b13dca6240dab393a3dffec4429fc685fdeabd7113064cd8331", + "zh:af60a0062adcf35d89b159a45f1ce77ad8ea196bccaea1d1e17ab8caffbe859a", + "zh:bf8e5836cb7cbc82fae10b874d137fd5e804c7308ce05c76eaebee6e5b26123e", + "zh:c1c4742ea3be506124a494bdc9d2f4ec777e98e0ad6add9b6e81d4703dc4ac1e", + "zh:d121a6fcb947c674026b35751f10ffe4941ab3c163d4c0f210d053e0984f11e6", + "zh:d99b1c20a343c4cf7c4a2117e9b29eb8056d9f481c52d19500c037c8b6e87878", + "zh:e1338c712edb4a87b7ebeb9bd4f7ae72dc3b7574fdac45bc8e2d0cef784e0597", + ] +} + +provider "registry.terraform.io/hashicorp/null" { + version = "3.2.2" + constraints = ">= 3.1.0" + hashes = [ + "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", + "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", + "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", + "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", + "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", + "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", + "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", + "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", + "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", + "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", + ] +} diff --git a/host/agent/README.md b/host/agent/README.md new file mode 100644 index 0000000..e69de29 diff --git a/host/agent/common.tf b/host/agent/common.tf new file mode 120000 index 0000000..47c0063 --- /dev/null +++ b/host/agent/common.tf @@ -0,0 +1 @@ +../../common/common.tf \ No newline at end of file diff --git a/host/agent/main.tf b/host/agent/main.tf new file mode 100644 index 0000000..0ee09ae --- /dev/null +++ b/host/agent/main.tf @@ -0,0 +1,35 @@ +locals { + # these must be defined but do not need to be overridden + monitor_alert_default_priority = null + monitor_warn_default_priority = null + monitor_nodata_default_priority = null + + title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}[${var.env}] " + title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" +} + +resource "datadog_monitor" "host_unreachable" { + count = var.host_unreachable_enabled ? 1 : 0 + + name = join("", [local.title_prefix, "Host Unreachable - {{host.name}}", local.title_suffix]) + message = local.query_alert_base_message + tags = concat(local.common_tags, var.base_tags, var.additional_tags) + type = "service check" + + evaluation_delay = var.evaluation_delay + new_group_delay = var.new_group_delay + notify_no_data = false + renotify_interval = var.renotify_interval + require_full_window = true + timeout_h = var.timeout_h + + query = < ${var.cpu_utilization_threshold_critical} + EOQ + + monitor_thresholds { + warning = var.cpu_utilization_threshold_warning + critical = var.cpu_utilization_threshold_critical + } +} diff --git a/host/cpu/variables.tf b/host/cpu/variables.tf new file mode 100644 index 0000000..76fcbd9 --- /dev/null +++ b/host/cpu/variables.tf @@ -0,0 +1,53 @@ +######################################## +# Global variables +######################################## +variable "additional_tags" { + default = [] + description = "Additional tags (key:value format) to add to this type of check (combined with `local.tags` and `var.base_tags`)" + type = list(string) +} + +variable "base_tags" { + default = ["resource:apigateway"] + description = "Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this)" + type = list(string) +} + +######################################## +# CPU Utilization +######################################## +variable "cpu_utilization_enabled" { + default = true + description = "Flag to enable CPU Utilitzation monitor" + type = bool +} + +variable "cpu_utilization_no_data_window" { + default = 10 + description = "No data threshold (in minutes, 0 to disable)" + type = number +} + +variable "cpu_utilization_time_aggregator" { + description = "Monitor aggregator for CPU high [available values: min, max or avg]" + type = string + default = "min" +} + +variable "cpu_utilization_timeframe" { + description = "Monitor timeframe for CPU high [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" + type = string + default = "last_1h" +} + +variable "cpu_utilization_threshold_critical" { + default = 90 + description = "Critical threshold (percent)" + type = number +} + +variable "cpu_utilization_threshold_warning" { + default = 80 + description = "Warning threshold (percent)" + type = number +} diff --git a/host/cpu/versions.tf b/host/cpu/versions.tf new file mode 120000 index 0000000..cbeda73 --- /dev/null +++ b/host/cpu/versions.tf @@ -0,0 +1 @@ +../../common/versions.tf \ No newline at end of file diff --git a/host/disk/.terraform.lock.hcl b/host/disk/.terraform.lock.hcl new file mode 100644 index 0000000..0791549 --- /dev/null +++ b/host/disk/.terraform.lock.hcl @@ -0,0 +1,44 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/datadog/datadog" { + version = "3.39.0" + constraints = ">= 3.37.0" + hashes = [ + "h1:6rSVMI3RBWRHA70wH8eIGyzH1IZHu1hwdixT+UbD9S0=", + "zh:3389298e5116232edd1c6e64c7a83f696d5663f1a1c7da5bb32be3472faa4a9e", + "zh:39b5d91e58372716d9c7d4869e8391612d3799a936f7c94cc9b3efbe08f4a6d9", + "zh:4a077105269fd187fc751a390d3e894092a2dd1b44e7e76ff9923968d971dc6a", + "zh:4ddfc1d5839eb4b88bdf3c620bc7f3a94c850d5e5a21b8c818bba63c4f264d24", + "zh:65d076f03bbaa2782c7487411bda925c14ee4841aefd0eda5442c5e4e73856cd", + "zh:7e357a7fe969c7ccbcb755799b95612f9e0bd835cfd993b05b5303c6dde1ffbd", + "zh:a1f11d390762eddaeef701c9d2747c8a9e113afa7fe7284210d62a21d1113f6e", + "zh:a7a17b04e66d7b13dca6240dab393a3dffec4429fc685fdeabd7113064cd8331", + "zh:af60a0062adcf35d89b159a45f1ce77ad8ea196bccaea1d1e17ab8caffbe859a", + "zh:bf8e5836cb7cbc82fae10b874d137fd5e804c7308ce05c76eaebee6e5b26123e", + "zh:c1c4742ea3be506124a494bdc9d2f4ec777e98e0ad6add9b6e81d4703dc4ac1e", + "zh:d121a6fcb947c674026b35751f10ffe4941ab3c163d4c0f210d053e0984f11e6", + "zh:d99b1c20a343c4cf7c4a2117e9b29eb8056d9f481c52d19500c037c8b6e87878", + "zh:e1338c712edb4a87b7ebeb9bd4f7ae72dc3b7574fdac45bc8e2d0cef784e0597", + ] +} + +provider "registry.terraform.io/hashicorp/null" { + version = "3.2.2" + constraints = ">= 3.1.0" + hashes = [ + "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", + "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", + "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", + "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", + "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", + "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", + "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", + "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", + "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", + "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", + ] +} diff --git a/host/disk/README.md b/host/disk/README.md new file mode 100644 index 0000000..e69de29 diff --git a/host/disk/common.tf b/host/disk/common.tf new file mode 120000 index 0000000..47c0063 --- /dev/null +++ b/host/disk/common.tf @@ -0,0 +1 @@ +../../common/common.tf \ No newline at end of file diff --git a/host/disk/main.tf b/host/disk/main.tf new file mode 100644 index 0000000..ca4ce0f --- /dev/null +++ b/host/disk/main.tf @@ -0,0 +1,100 @@ +locals { + # these must be defined but do not need to be overridden + monitor_alert_default_priority = null + monitor_warn_default_priority = null + monitor_nodata_default_priority = null + + title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}[${var.env}] " + title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" +} + +resource "datadog_monitor" "disk_space" { + count = var.disk_space_enabled ? 1 : 0 + + name = join("", [local.title_prefix, "Disk Space - {{host.name}}", local.title_suffix]) + message = local.query_alert_base_message + tags = concat(local.common_tags, var.base_tags, var.additional_tags) + type = "query alert" + + evaluation_delay = var.evaluation_delay + new_group_delay = var.new_group_delay + notify_no_data = false + notify_audit = false + timeout_h = var.timeout_h + include_tags = true + require_full_window = true + + query = < ${var.disk_space_threshold_critical} + EOQ + + monitor_thresholds { + warning = var.disk_space_threshold_warning + critical = var.disk_space_threshold_critical + } +} + +resource "datadog_monitor" "disk_space_forecast" { + count = var.disk_space_forecast_enabled ? 1 : 0 + + name = join("", [local.title_prefix, "Disk Space Forecast - {{host.name}}", local.title_suffix]) + message = local.query_alert_base_message + tags = concat(local.common_tags, var.base_tags, var.additional_tags) + type = "query alert" + + evaluation_delay = var.evaluation_delay + new_group_delay = var.new_group_delay + notify_audit = false + timeout_h = var.timeout_h + include_tags = true + require_full_window = true + notify_no_data = false + renotify_interval = 0 + + query = <= ${var.disk_space_forecast_threshold_critical} + EOQ + + monitor_thresholds { + critical_recovery = var.disk_space_forecast_threshold_critical_recovery + critical = var.disk_space_forecast_threshold_critical + } +} + +resource "datadog_monitor" "disk_inodes" { + count = var.disk_inodes_enabled ? 1 : 0 + + name = join("", [local.title_prefix, "Disk Inodes Usage - {{host.name}}", local.title_suffix]) + message = local.query_alert_base_message + tags = concat(local.common_tags, var.base_tags, var.additional_tags) + type = "query alert" + + query = < ${var.disk_inodes_threshold_critical} + EOQ + + evaluation_delay = var.evaluation_delay + new_group_delay = var.new_group_delay + notify_no_data = false + notify_audit = false + timeout_h = var.timeout_h + include_tags = true + require_full_window = true + + monitor_thresholds { + warning = var.disk_inodes_threshold_warning + critical = var.disk_inodes_threshold_critical + } +} diff --git a/host/disk/variables.tf b/host/disk/variables.tf new file mode 100644 index 0000000..1cd809d --- /dev/null +++ b/host/disk/variables.tf @@ -0,0 +1,149 @@ +######################################## +# Global variables +######################################## +variable "additional_tags" { + default = [] + description = "Additional tags (key:value format) to add to this type of check (combined with `local.tags` and `var.base_tags`)" + type = list(string) +} + +variable "base_tags" { + default = ["resource:apigateway"] + description = "Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this)" + type = list(string) +} + +######################################## +# Disk Space +######################################## +variable "disk_space_enabled" { + description = "Flag to enable Free diskspace monitor" + type = string + default = "true" +} + +variable "disk_space_time_aggregator" { + description = "Monitor aggregator for Free diskspace [available values: min, max or avg]" + type = string + default = "max" +} + +variable "disk_space_timeframe" { + description = "Monitor timeframe for Free diskspace [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" + type = string + default = "last_5m" +} + +variable "disk_space_threshold_warning" { + description = "Free disk space warning threshold" + type = number + default = 80 +} + +variable "disk_space_threshold_critical" { + description = "Free disk space critical threshold" + type = number + default = 90 +} + +######################################## +# Disk Space Forecast +######################################## +variable "disk_space_forecast_enabled" { + description = "Flag to enable Free diskspace forecast monitor" + type = string + default = "true" +} + +variable "disk_space_forecast_time_aggregator" { + description = "Monitor aggregator for Free diskspace forecast [available values: min, max or avg]" + type = string + default = "max" +} + +variable "disk_space_forecast_timeframe" { + description = "Monitor timeframe for Free diskspace forecast [available values: `next_12h`, `next_#d` (1, 2, or 3), `next_#w` (1 or 2) or `next_#mo` (1, 2 or 3)]" + type = string + default = "next_1w" +} + +variable "disk_space_forecast_algorithm" { + description = "Algorithm for the Free diskspace Forecast monitor [available values: `linear` or `seasonal`]" + type = string + default = "linear" +} + +variable "disk_space_forecast_deviations" { + description = "Deviations for the Free diskspace Forecast monitor [available values: `1`, `2`, `3`, `4` or `5`]" + type = string + default = 1 +} + +variable "disk_space_forecast_interval" { + description = "Interval for the Free diskspace Forecast monitor [available values: `30m`, `60m` or `120m`]" + type = string + default = "60m" +} + +variable "disk_space_forecast_linear_history" { + description = "History for the Free diskspace Forecast monitor [available values: `12h`, `#d` (1, 2, or 3), `#w` (1, or 2) or `#mo` (1, 2 or 3)]" + type = string + default = "1w" +} + +variable "disk_space_forecast_linear_model" { + description = "Model for the Free diskspace Forecast monitor [available values: `default`, `simple` or `reactive`]" + type = string + default = "default" +} + +variable "disk_space_forecast_seasonal_seasonality" { + description = "Seasonality for the Free diskspace Forecast monitor" + type = string + default = "weekly" +} + +variable "disk_space_forecast_threshold_critical_recovery" { + description = "Free disk space forecast recovery threshold" + type = number + default = 72 +} + +variable "disk_space_forecast_threshold_critical" { + description = "Free disk space forecast critical threshold" + type = number + default = 80 +} + +######################################## +# Disk Inodes +######################################## +variable "disk_inodes_enabled" { + description = "Flag to enable Free disk inodes monitor" + type = string + default = "true" +} + +variable "disk_inodes_time_aggregator" { + description = "Monitor aggregator for Free disk inodes [available values: min, max or avg]" + type = string + default = "min" +} + +variable "disk_inodes_timeframe" { + description = "Monitor timeframe for Free disk inodes [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" + type = string + default = "last_5m" +} + +variable "disk_inodes_threshold_warning" { + description = "Free disk space warning threshold" + type = number + default = 90 +} + +variable "disk_inodes_threshold_critical" { + description = "Free disk space critical threshold" + type = number + default = 95 +} diff --git a/host/disk/versions.tf b/host/disk/versions.tf new file mode 120000 index 0000000..cbeda73 --- /dev/null +++ b/host/disk/versions.tf @@ -0,0 +1 @@ +../../common/versions.tf \ No newline at end of file diff --git a/host/memory/.terraform.lock.hcl b/host/memory/.terraform.lock.hcl new file mode 100644 index 0000000..0791549 --- /dev/null +++ b/host/memory/.terraform.lock.hcl @@ -0,0 +1,44 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/datadog/datadog" { + version = "3.39.0" + constraints = ">= 3.37.0" + hashes = [ + "h1:6rSVMI3RBWRHA70wH8eIGyzH1IZHu1hwdixT+UbD9S0=", + "zh:3389298e5116232edd1c6e64c7a83f696d5663f1a1c7da5bb32be3472faa4a9e", + "zh:39b5d91e58372716d9c7d4869e8391612d3799a936f7c94cc9b3efbe08f4a6d9", + "zh:4a077105269fd187fc751a390d3e894092a2dd1b44e7e76ff9923968d971dc6a", + "zh:4ddfc1d5839eb4b88bdf3c620bc7f3a94c850d5e5a21b8c818bba63c4f264d24", + "zh:65d076f03bbaa2782c7487411bda925c14ee4841aefd0eda5442c5e4e73856cd", + "zh:7e357a7fe969c7ccbcb755799b95612f9e0bd835cfd993b05b5303c6dde1ffbd", + "zh:a1f11d390762eddaeef701c9d2747c8a9e113afa7fe7284210d62a21d1113f6e", + "zh:a7a17b04e66d7b13dca6240dab393a3dffec4429fc685fdeabd7113064cd8331", + "zh:af60a0062adcf35d89b159a45f1ce77ad8ea196bccaea1d1e17ab8caffbe859a", + "zh:bf8e5836cb7cbc82fae10b874d137fd5e804c7308ce05c76eaebee6e5b26123e", + "zh:c1c4742ea3be506124a494bdc9d2f4ec777e98e0ad6add9b6e81d4703dc4ac1e", + "zh:d121a6fcb947c674026b35751f10ffe4941ab3c163d4c0f210d053e0984f11e6", + "zh:d99b1c20a343c4cf7c4a2117e9b29eb8056d9f481c52d19500c037c8b6e87878", + "zh:e1338c712edb4a87b7ebeb9bd4f7ae72dc3b7574fdac45bc8e2d0cef784e0597", + ] +} + +provider "registry.terraform.io/hashicorp/null" { + version = "3.2.2" + constraints = ">= 3.1.0" + hashes = [ + "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", + "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", + "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", + "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", + "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", + "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", + "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", + "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", + "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", + "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", + ] +} diff --git a/host/memory/README.md b/host/memory/README.md new file mode 100644 index 0000000..e69de29 diff --git a/host/memory/common.tf b/host/memory/common.tf new file mode 120000 index 0000000..47c0063 --- /dev/null +++ b/host/memory/common.tf @@ -0,0 +1 @@ +../../common/common.tf \ No newline at end of file diff --git a/host/memory/main.tf b/host/memory/main.tf new file mode 100644 index 0000000..129bd45 --- /dev/null +++ b/host/memory/main.tf @@ -0,0 +1,39 @@ +locals { + # these must be defined but do not need to be overridden + monitor_alert_default_priority = null + monitor_warn_default_priority = null + monitor_nodata_default_priority = null + + title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}[${var.env}] " + title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" +} + +resource "datadog_monitor" "memory" { + count = var.memory_enabled ? 1 : 0 + + name = join("", [local.title_prefix, "Usable Memory - {{host.name}}", local.title_suffix]) + message = local.query_alert_base_message + tags = concat(local.common_tags, var.base_tags, var.additional_tags) + type = "query alert" + + query = < ${var.swap_threshold_critical} + EOQ + + evaluation_delay = var.evaluation_delay + new_group_delay = var.new_group_delay + notify_no_data = false + renotify_interval = 0 + notify_audit = false + timeout_h = var.timeout_h + include_tags = true + require_full_window = true + + monitor_thresholds { + warning = var.swap_threshold_warning + critical = var.swap_threshold_critical + } +} diff --git a/host/swap/variables.tf b/host/swap/variables.tf new file mode 100644 index 0000000..16e22b7 --- /dev/null +++ b/host/swap/variables.tf @@ -0,0 +1,47 @@ +######################################## +# Global variables +######################################## +variable "additional_tags" { + default = [] + description = "Additional tags (key:value format) to add to this type of check (combined with `local.tags` and `var.base_tags`)" + type = list(string) +} + +variable "base_tags" { + default = ["resource:apigateway"] + description = "Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this)" + type = list(string) +} + +######################################## +# Swap +######################################## +variable "swap_enabled" { + description = "Flag to enable Swap monitor" + type = string + default = "true" +} + +variable "swap_time_aggregator" { + description = "Monitor aggregator for Free Swap [available values: min, max or avg]" + type = string + default = "max" +} + +variable "swap_timeframe" { + description = "Monitor timeframe for Free Swap [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" + type = string + default = "last_5m" +} + +variable "swap_threshold_warning" { + description = "Free Swap warning threshold as percentage" + type = number + default = 0.3 +} + +variable "swap_threshold_critical" { + description = "Free Swap critical threshold as percentage" + type = number + default = 0.1 +} diff --git a/host/swap/versions.tf b/host/swap/versions.tf new file mode 120000 index 0000000..cbeda73 --- /dev/null +++ b/host/swap/versions.tf @@ -0,0 +1 @@ +../../common/versions.tf \ No newline at end of file From b301686eb741bc18f2b338f58b1042d32dc25d6a Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Thu, 6 Jun 2024 14:11:44 -0600 Subject: [PATCH 06/77] update tf docs --- host/agent/README.md | 65 +++++++++++++++++++++++++++++++ host/cpu/README.md | 70 +++++++++++++++++++++++++++++++++ host/disk/README.md | 87 ++++++++++++++++++++++++++++++++++++++++++ host/memory/README.md | 69 +++++++++++++++++++++++++++++++++ host/process/README.md | 70 +++++++++++++++++++++++++++++++++ host/swap/README.md | 69 +++++++++++++++++++++++++++++++++ 6 files changed, 430 insertions(+) diff --git a/host/agent/README.md b/host/agent/README.md index e69de29..b71562a 100644 --- a/host/agent/README.md +++ b/host/agent/README.md @@ -0,0 +1,65 @@ +# terraform-datadog-monitor/host/agent + +Configures monitor for Unreachable Host. + + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | ~> 1.5 | +| [datadog](#requirement\_datadog) | >= 3.37 | +| [null](#requirement\_null) | >= 3.1.0 | + +## Providers + +| Name | Version | +|------|---------| +| [datadog](#provider\_datadog) | 3.39.0 | + +## Modules + +No modules. + +## Resources + +| Name | Type | +|------|------| +| [datadog_monitor.host_unreachable](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [additional\_tags](#input\_additional\_tags) | Additional tags (key:value format) to add to this type of check (combined with `local.tags` and `var.base_tags`) | `list(string)` | `[]` | no | +| [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | +| [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:apigateway"
]
| no | +| [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | +| [host\_unreachable\_enabled](#input\_host\_unreachable\_enabled) | Flag to enable Host unreachable monitor | `bool` | `true` | no | +| [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | +| [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | +| [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | +| [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | +| [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [timeout\_h](#input\_timeout\_h) | Auto-resolve alert in specified hours if condition no longer matches | `number` | `0` | no | +| [title\_prefix](#input\_title\_prefix) | Prefix all alerts with specified value in brackets | `string` | `null` | no | +| [title\_suffix](#input\_title\_suffix) | Suffix all alerts with specified value in parenthesis | `string` | `null` | no | +| [warn\_priority](#input\_warn\_priority) | Priority for alerts with no data (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | + +## Outputs + +No outputs. + diff --git a/host/cpu/README.md b/host/cpu/README.md index e69de29..f52bd4b 100644 --- a/host/cpu/README.md +++ b/host/cpu/README.md @@ -0,0 +1,70 @@ +# terraform-datadog-monitor/host/cpu + +Configures monitor for CPU Utilization. + + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | ~> 1.5 | +| [datadog](#requirement\_datadog) | >= 3.37 | +| [null](#requirement\_null) | >= 3.1.0 | + +## Providers + +| Name | Version | +|------|---------| +| [datadog](#provider\_datadog) | 3.39.0 | + +## Modules + +No modules. + +## Resources + +| Name | Type | +|------|------| +| [datadog_monitor.cpu_utilization](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [additional\_tags](#input\_additional\_tags) | Additional tags (key:value format) to add to this type of check (combined with `local.tags` and `var.base_tags`) | `list(string)` | `[]` | no | +| [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | +| [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:apigateway"
]
| no | +| [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [cpu\_utilization\_enabled](#input\_cpu\_utilization\_enabled) | Flag to enable CPU Utilitzation monitor | `bool` | `true` | no | +| [cpu\_utilization\_no\_data\_window](#input\_cpu\_utilization\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | +| [cpu\_utilization\_threshold\_critical](#input\_cpu\_utilization\_threshold\_critical) | Critical threshold (percent) | `number` | `90` | no | +| [cpu\_utilization\_threshold\_warning](#input\_cpu\_utilization\_threshold\_warning) | Warning threshold (percent) | `number` | `80` | no | +| [cpu\_utilization\_time\_aggregator](#input\_cpu\_utilization\_time\_aggregator) | Monitor aggregator for CPU high [available values: min, max or avg] | `string` | `"min"` | no | +| [cpu\_utilization\_timeframe](#input\_cpu\_utilization\_timeframe) | Monitor timeframe for CPU high [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | `string` | `"last_1h"` | no | +| [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | +| [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | +| [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | +| [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | +| [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | +| [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [timeout\_h](#input\_timeout\_h) | Auto-resolve alert in specified hours if condition no longer matches | `number` | `0` | no | +| [title\_prefix](#input\_title\_prefix) | Prefix all alerts with specified value in brackets | `string` | `null` | no | +| [title\_suffix](#input\_title\_suffix) | Suffix all alerts with specified value in parenthesis | `string` | `null` | no | +| [warn\_priority](#input\_warn\_priority) | Priority for alerts with no data (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | + +## Outputs + +No outputs. + diff --git a/host/disk/README.md b/host/disk/README.md index e69de29..9f8c82a 100644 --- a/host/disk/README.md +++ b/host/disk/README.md @@ -0,0 +1,87 @@ +# terraform-datadog-monitor/host/disk + +Configures monitor for host disk space (forecast and actual) and disk inodes. + + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | ~> 1.5 | +| [datadog](#requirement\_datadog) | >= 3.37 | +| [null](#requirement\_null) | >= 3.1.0 | + +## Providers + +| Name | Version | +|------|---------| +| [datadog](#provider\_datadog) | 3.39.0 | + +## Modules + +No modules. + +## Resources + +| Name | Type | +|------|------| +| [datadog_monitor.disk_inodes](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | +| [datadog_monitor.disk_space](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | +| [datadog_monitor.disk_space_forecast](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [additional\_tags](#input\_additional\_tags) | Additional tags (key:value format) to add to this type of check (combined with `local.tags` and `var.base_tags`) | `list(string)` | `[]` | no | +| [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | +| [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:apigateway"
]
| no | +| [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | +| [disk\_inodes\_enabled](#input\_disk\_inodes\_enabled) | Flag to enable Free disk inodes monitor | `string` | `"true"` | no | +| [disk\_inodes\_threshold\_critical](#input\_disk\_inodes\_threshold\_critical) | Free disk space critical threshold | `number` | `95` | no | +| [disk\_inodes\_threshold\_warning](#input\_disk\_inodes\_threshold\_warning) | Free disk space warning threshold | `number` | `90` | no | +| [disk\_inodes\_time\_aggregator](#input\_disk\_inodes\_time\_aggregator) | Monitor aggregator for Free disk inodes [available values: min, max or avg] | `string` | `"min"` | no | +| [disk\_inodes\_timeframe](#input\_disk\_inodes\_timeframe) | Monitor timeframe for Free disk inodes [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | +| [disk\_space\_enabled](#input\_disk\_space\_enabled) | Flag to enable Free diskspace monitor | `string` | `"true"` | no | +| [disk\_space\_forecast\_algorithm](#input\_disk\_space\_forecast\_algorithm) | Algorithm for the Free diskspace Forecast monitor [available values: `linear` or `seasonal`] | `string` | `"linear"` | no | +| [disk\_space\_forecast\_deviations](#input\_disk\_space\_forecast\_deviations) | Deviations for the Free diskspace Forecast monitor [available values: `1`, `2`, `3`, `4` or `5`] | `string` | `1` | no | +| [disk\_space\_forecast\_enabled](#input\_disk\_space\_forecast\_enabled) | Flag to enable Free diskspace forecast monitor | `string` | `"true"` | no | +| [disk\_space\_forecast\_interval](#input\_disk\_space\_forecast\_interval) | Interval for the Free diskspace Forecast monitor [available values: `30m`, `60m` or `120m`] | `string` | `"60m"` | no | +| [disk\_space\_forecast\_linear\_history](#input\_disk\_space\_forecast\_linear\_history) | History for the Free diskspace Forecast monitor [available values: `12h`, `#d` (1, 2, or 3), `#w` (1, or 2) or `#mo` (1, 2 or 3)] | `string` | `"1w"` | no | +| [disk\_space\_forecast\_linear\_model](#input\_disk\_space\_forecast\_linear\_model) | Model for the Free diskspace Forecast monitor [available values: `default`, `simple` or `reactive`] | `string` | `"default"` | no | +| [disk\_space\_forecast\_seasonal\_seasonality](#input\_disk\_space\_forecast\_seasonal\_seasonality) | Seasonality for the Free diskspace Forecast monitor | `string` | `"weekly"` | no | +| [disk\_space\_forecast\_threshold\_critical](#input\_disk\_space\_forecast\_threshold\_critical) | Free disk space forecast critical threshold | `number` | `80` | no | +| [disk\_space\_forecast\_threshold\_critical\_recovery](#input\_disk\_space\_forecast\_threshold\_critical\_recovery) | Free disk space forecast recovery threshold | `number` | `72` | no | +| [disk\_space\_forecast\_time\_aggregator](#input\_disk\_space\_forecast\_time\_aggregator) | Monitor aggregator for Free diskspace forecast [available values: min, max or avg] | `string` | `"max"` | no | +| [disk\_space\_forecast\_timeframe](#input\_disk\_space\_forecast\_timeframe) | Monitor timeframe for Free diskspace forecast [available values: `next_12h`, `next_#d` (1, 2, or 3), `next_#w` (1 or 2) or `next_#mo` (1, 2 or 3)] | `string` | `"next_1w"` | no | +| [disk\_space\_threshold\_critical](#input\_disk\_space\_threshold\_critical) | Free disk space critical threshold | `number` | `90` | no | +| [disk\_space\_threshold\_warning](#input\_disk\_space\_threshold\_warning) | Free disk space warning threshold | `number` | `80` | no | +| [disk\_space\_time\_aggregator](#input\_disk\_space\_time\_aggregator) | Monitor aggregator for Free diskspace [available values: min, max or avg] | `string` | `"max"` | no | +| [disk\_space\_timeframe](#input\_disk\_space\_timeframe) | Monitor timeframe for Free diskspace [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | +| [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | +| [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | +| [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | +| [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | +| [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [timeout\_h](#input\_timeout\_h) | Auto-resolve alert in specified hours if condition no longer matches | `number` | `0` | no | +| [title\_prefix](#input\_title\_prefix) | Prefix all alerts with specified value in brackets | `string` | `null` | no | +| [title\_suffix](#input\_title\_suffix) | Suffix all alerts with specified value in parenthesis | `string` | `null` | no | +| [warn\_priority](#input\_warn\_priority) | Priority for alerts with no data (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | + +## Outputs + +No outputs. + diff --git a/host/memory/README.md b/host/memory/README.md index e69de29..c4cb6c6 100644 --- a/host/memory/README.md +++ b/host/memory/README.md @@ -0,0 +1,69 @@ +# terraform-datadog-monitor/host/memory + +Configures monitor for Host Memory Utilization. + + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | ~> 1.5 | +| [datadog](#requirement\_datadog) | >= 3.37 | +| [null](#requirement\_null) | >= 3.1.0 | + +## Providers + +| Name | Version | +|------|---------| +| [datadog](#provider\_datadog) | 3.39.0 | + +## Modules + +No modules. + +## Resources + +| Name | Type | +|------|------| +| [datadog_monitor.memory](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [additional\_tags](#input\_additional\_tags) | Additional tags (key:value format) to add to this type of check (combined with `local.tags` and `var.base_tags`) | `list(string)` | `[]` | no | +| [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | +| [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:apigateway"
]
| no | +| [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | +| [memory\_enabled](#input\_memory\_enabled) | Flag to enable Free memory monitor | `string` | `"true"` | no | +| [memory\_threshold\_critical](#input\_memory\_threshold\_critical) | Free disk space critical threshold | `number` | `5` | no | +| [memory\_threshold\_warning](#input\_memory\_threshold\_warning) | Free disk space warning threshold | `number` | `10` | no | +| [memory\_time\_aggregator](#input\_memory\_time\_aggregator) | Monitor aggregator for Free memory [available values: min, max or avg] | `string` | `"max"` | no | +| [memory\_timeframe](#input\_memory\_timeframe) | Monitor timeframe for Free memory [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | +| [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | +| [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | +| [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | +| [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | +| [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [timeout\_h](#input\_timeout\_h) | Auto-resolve alert in specified hours if condition no longer matches | `number` | `0` | no | +| [title\_prefix](#input\_title\_prefix) | Prefix all alerts with specified value in brackets | `string` | `null` | no | +| [title\_suffix](#input\_title\_suffix) | Suffix all alerts with specified value in parenthesis | `string` | `null` | no | +| [warn\_priority](#input\_warn\_priority) | Priority for alerts with no data (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | + +## Outputs + +No outputs. + diff --git a/host/process/README.md b/host/process/README.md index e69de29..93a1bb8 100644 --- a/host/process/README.md +++ b/host/process/README.md @@ -0,0 +1,70 @@ +# terraform-datadog-monitor/host/process + +Configures monitor for Processes on Host. + + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | ~> 1.5 | +| [datadog](#requirement\_datadog) | >= 3.37 | +| [null](#requirement\_null) | >= 3.1.0 | + +## Providers + +| Name | Version | +|------|---------| +| [datadog](#provider\_datadog) | 3.39.0 | + +## Modules + +No modules. + +## Resources + +| Name | Type | +|------|------| +| [datadog_monitor.process_check](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [additional\_tags](#input\_additional\_tags) | Additional tags (key:value format) to add to this type of check (combined with `local.tags` and `var.base_tags`) | `list(string)` | `[]` | no | +| [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | +| [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:apigateway"
]
| no | +| [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | +| [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | +| [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | +| [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | +| [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [process\_check\_enabled](#input\_process\_check\_enabled) | Flag to enable Process Check monitor | `string` | `"true"` | no | +| [process\_check\_name](#input\_process\_check\_name) | Name of Process for Process Check Monitor | `string` | `""` | no | +| [process\_check\_threshold\_critical](#input\_process\_check\_threshold\_critical) | Proccess Check critical threshold | `number` | `5` | no | +| [process\_check\_threshold\_ok](#input\_process\_check\_threshold\_ok) | Proccess Check ok threshold | `number` | `1` | no | +| [process\_check\_threshold\_warning](#input\_process\_check\_threshold\_warning) | Proccess Check warning threshold | `number` | `2` | no | +| [process\_check\_timeframe](#input\_process\_check\_timeframe) | Monitor timeframe for Process Check [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | +| [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [timeout\_h](#input\_timeout\_h) | Auto-resolve alert in specified hours if condition no longer matches | `number` | `0` | no | +| [title\_prefix](#input\_title\_prefix) | Prefix all alerts with specified value in brackets | `string` | `null` | no | +| [title\_suffix](#input\_title\_suffix) | Suffix all alerts with specified value in parenthesis | `string` | `null` | no | +| [warn\_priority](#input\_warn\_priority) | Priority for alerts with no data (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | + +## Outputs + +No outputs. + diff --git a/host/swap/README.md b/host/swap/README.md index e69de29..4632a84 100644 --- a/host/swap/README.md +++ b/host/swap/README.md @@ -0,0 +1,69 @@ +# terraform-datadog-monitor/host/swap + +Configures monitor for Swap Memory Free. + + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | ~> 1.5 | +| [datadog](#requirement\_datadog) | >= 3.37 | +| [null](#requirement\_null) | >= 3.1.0 | + +## Providers + +| Name | Version | +|------|---------| +| [datadog](#provider\_datadog) | 3.39.0 | + +## Modules + +No modules. + +## Resources + +| Name | Type | +|------|------| +| [datadog_monitor.swap](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [additional\_tags](#input\_additional\_tags) | Additional tags (key:value format) to add to this type of check (combined with `local.tags` and `var.base_tags`) | `list(string)` | `[]` | no | +| [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | +| [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:apigateway"
]
| no | +| [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | +| [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | +| [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | +| [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | +| [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | +| [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [swap\_enabled](#input\_swap\_enabled) | Flag to enable Swap monitor | `string` | `"true"` | no | +| [swap\_threshold\_critical](#input\_swap\_threshold\_critical) | Free Swap critical threshold as percentage | `number` | `0.1` | no | +| [swap\_threshold\_warning](#input\_swap\_threshold\_warning) | Free Swap warning threshold as percentage | `number` | `0.3` | no | +| [swap\_time\_aggregator](#input\_swap\_time\_aggregator) | Monitor aggregator for Free Swap [available values: min, max or avg] | `string` | `"max"` | no | +| [swap\_timeframe](#input\_swap\_timeframe) | Monitor timeframe for Free Swap [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | +| [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [timeout\_h](#input\_timeout\_h) | Auto-resolve alert in specified hours if condition no longer matches | `number` | `0` | no | +| [title\_prefix](#input\_title\_prefix) | Prefix all alerts with specified value in brackets | `string` | `null` | no | +| [title\_suffix](#input\_title\_suffix) | Suffix all alerts with specified value in parenthesis | `string` | `null` | no | +| [warn\_priority](#input\_warn\_priority) | Priority for alerts with no data (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | + +## Outputs + +No outputs. + From 9b679f9cee55c0d463d0f8b1f945a1f4be66654e Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Thu, 13 Jun 2024 03:05:46 -0600 Subject: [PATCH 07/77] add num-process check --- host/num-process/README.md | 70 +++++++++++++++++++++++++++++++++++ host/num-process/common.tf | 1 + host/num-process/main.tf | 37 ++++++++++++++++++ host/num-process/variables.tf | 53 ++++++++++++++++++++++++++ host/num-process/versions.tf | 1 + 5 files changed, 162 insertions(+) create mode 100644 host/num-process/README.md create mode 120000 host/num-process/common.tf create mode 100644 host/num-process/main.tf create mode 100644 host/num-process/variables.tf create mode 120000 host/num-process/versions.tf diff --git a/host/num-process/README.md b/host/num-process/README.md new file mode 100644 index 0000000..b041dae --- /dev/null +++ b/host/num-process/README.md @@ -0,0 +1,70 @@ +# terraform-datadog-monitor/host/num-process + +Number of Processes Check to alert on stale or runaway processes. + + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | ~> 1.5 | +| [datadog](#requirement\_datadog) | >= 3.37 | +| [null](#requirement\_null) | >= 3.1.0 | + +## Providers + +| Name | Version | +|------|---------| +| [datadog](#provider\_datadog) | >= 3.37 | + +## Modules + +No modules. + +## Resources + +| Name | Type | +|------|------| +| [datadog_monitor.num_process_check](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [additional\_tags](#input\_additional\_tags) | Additional tags (key:value format) to add to this type of check (combined with `local.tags` and `var.base_tags`) | `list(string)` | `[]` | no | +| [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | +| [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:apigateway"
]
| no | +| [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | +| [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | +| [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | +| [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | +| [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [num\_process\_check\_enabled](#input\_num\_process\_check\_enabled) | Flag to enable Num Process Check monitor | `string` | `"true"` | no | +| [num\_process\_check\_name](#input\_num\_process\_check\_name) | Name of Process for Num Process Check Monitor | `string` | `""` | no | +| [num\_process\_check\_operator](#input\_num\_process\_check\_operator) | Operator for Num Proccess Check Query [available values: `<, >, <=, >=, =`] | `string` | `"<="` | no | +| [num\_process\_check\_threshold\_critical](#input\_num\_process\_check\_threshold\_critical) | Num Proccess Check critical threshold | `number` | `1` | no | +| [num\_process\_check\_threshold\_warning](#input\_num\_process\_check\_threshold\_warning) | Num Proccess Check warning threshold | `number` | `2` | no | +| [num\_process\_check\_timeframe](#input\_num\_process\_check\_timeframe) | Monitor timeframe for Num Process Check [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | +| [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [timeout\_h](#input\_timeout\_h) | Auto-resolve alert in specified hours if condition no longer matches | `number` | `0` | no | +| [title\_prefix](#input\_title\_prefix) | Prefix all alerts with specified value in brackets | `string` | `null` | no | +| [title\_suffix](#input\_title\_suffix) | Suffix all alerts with specified value in parenthesis | `string` | `null` | no | +| [warn\_priority](#input\_warn\_priority) | Priority for alerts with no data (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | + +## Outputs + +No outputs. + diff --git a/host/num-process/common.tf b/host/num-process/common.tf new file mode 120000 index 0000000..47c0063 --- /dev/null +++ b/host/num-process/common.tf @@ -0,0 +1 @@ +../../common/common.tf \ No newline at end of file diff --git a/host/num-process/main.tf b/host/num-process/main.tf new file mode 100644 index 0000000..8c6f0b7 --- /dev/null +++ b/host/num-process/main.tf @@ -0,0 +1,37 @@ +locals { + # these must be defined but do not need to be overridden + monitor_alert_default_priority = null + monitor_warn_default_priority = null + monitor_nodata_default_priority = null + + title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}[${var.env}] " + title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" +} + +resource "datadog_monitor" "num_process_check" { + count = var.num_process_check_enabled ? 1 : 0 + + name = join("", [local.title_prefix, "Process Check - {{host.name}}", local.title_suffix]) + message = local.query_alert_base_message + tags = concat(local.common_tags, var.base_tags, var.additional_tags) + type = "query alert" + + evaluation_delay = var.evaluation_delay + new_group_delay = var.new_group_delay + notify_no_data = false + renotify_interval = 0 + notify_audit = false + timeout_h = var.timeout_h + include_tags = true + require_full_window = true + + query = < Date: Thu, 13 Jun 2024 03:06:15 -0600 Subject: [PATCH 08/77] add num-process check --- host/num-process/.terraform.lock.hcl | 44 ++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 host/num-process/.terraform.lock.hcl diff --git a/host/num-process/.terraform.lock.hcl b/host/num-process/.terraform.lock.hcl new file mode 100644 index 0000000..0791549 --- /dev/null +++ b/host/num-process/.terraform.lock.hcl @@ -0,0 +1,44 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/datadog/datadog" { + version = "3.39.0" + constraints = ">= 3.37.0" + hashes = [ + "h1:6rSVMI3RBWRHA70wH8eIGyzH1IZHu1hwdixT+UbD9S0=", + "zh:3389298e5116232edd1c6e64c7a83f696d5663f1a1c7da5bb32be3472faa4a9e", + "zh:39b5d91e58372716d9c7d4869e8391612d3799a936f7c94cc9b3efbe08f4a6d9", + "zh:4a077105269fd187fc751a390d3e894092a2dd1b44e7e76ff9923968d971dc6a", + "zh:4ddfc1d5839eb4b88bdf3c620bc7f3a94c850d5e5a21b8c818bba63c4f264d24", + "zh:65d076f03bbaa2782c7487411bda925c14ee4841aefd0eda5442c5e4e73856cd", + "zh:7e357a7fe969c7ccbcb755799b95612f9e0bd835cfd993b05b5303c6dde1ffbd", + "zh:a1f11d390762eddaeef701c9d2747c8a9e113afa7fe7284210d62a21d1113f6e", + "zh:a7a17b04e66d7b13dca6240dab393a3dffec4429fc685fdeabd7113064cd8331", + "zh:af60a0062adcf35d89b159a45f1ce77ad8ea196bccaea1d1e17ab8caffbe859a", + "zh:bf8e5836cb7cbc82fae10b874d137fd5e804c7308ce05c76eaebee6e5b26123e", + "zh:c1c4742ea3be506124a494bdc9d2f4ec777e98e0ad6add9b6e81d4703dc4ac1e", + "zh:d121a6fcb947c674026b35751f10ffe4941ab3c163d4c0f210d053e0984f11e6", + "zh:d99b1c20a343c4cf7c4a2117e9b29eb8056d9f481c52d19500c037c8b6e87878", + "zh:e1338c712edb4a87b7ebeb9bd4f7ae72dc3b7574fdac45bc8e2d0cef784e0597", + ] +} + +provider "registry.terraform.io/hashicorp/null" { + version = "3.2.2" + constraints = ">= 3.1.0" + hashes = [ + "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", + "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", + "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", + "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", + "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", + "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", + "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", + "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", + "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", + "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", + ] +} From cbf6d64cfd40bf700ecec1b8818d1674269f7517 Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Fri, 12 Jul 2024 01:37:47 -0600 Subject: [PATCH 09/77] fix spelling mistakes --- host/num-process/variables.tf | 6 +++--- host/process/variables.tf | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/host/num-process/variables.tf b/host/num-process/variables.tf index f68524b..81d1d3d 100644 --- a/host/num-process/variables.tf +++ b/host/num-process/variables.tf @@ -35,19 +35,19 @@ variable "num_process_check_timeframe" { } variable "num_process_check_threshold_warning" { - description = "Num Proccess Check warning threshold" + description = "Num Process Check warning threshold" type = number default = 2 } variable "num_process_check_threshold_critical" { - description = "Num Proccess Check critical threshold" + description = "Num Process Check critical threshold" type = number default = 1 } variable "num_process_check_operator" { - description = "Operator for Num Proccess Check Query [available values: `<, >, <=, >=, =`]" + description = "Operator for Num Process Check Query [available values: `<, >, <=, >=, =`]" type = string default = "<=" } diff --git a/host/process/variables.tf b/host/process/variables.tf index 586814d..e36e098 100644 --- a/host/process/variables.tf +++ b/host/process/variables.tf @@ -35,19 +35,19 @@ variable "process_check_timeframe" { } variable "process_check_threshold_warning" { - description = "Proccess Check warning threshold" + description = "Process Check warning threshold" type = number default = 2 } variable "process_check_threshold_critical" { - description = "Proccess Check critical threshold" + description = "Process Check critical threshold" type = number default = 5 } variable "process_check_threshold_ok" { - description = "Proccess Check ok threshold" + description = "Process Check ok threshold" type = number default = 1 } From 53810919c0c90ae8d05160d2d7f642d18c5bee5e Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Fri, 12 Jul 2024 01:40:10 -0600 Subject: [PATCH 10/77] fix spelling mistakes --- host/num-process/README.md | 8 ++++---- host/process/README.md | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/host/num-process/README.md b/host/num-process/README.md index b041dae..11ce261 100644 --- a/host/num-process/README.md +++ b/host/num-process/README.md @@ -15,7 +15,7 @@ Number of Processes Check to alert on stale or runaway processes. | Name | Version | |------|---------| -| [datadog](#provider\_datadog) | >= 3.37 | +| [datadog](#provider\_datadog) | 3.39.0 | ## Modules @@ -51,9 +51,9 @@ No modules. | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [num\_process\_check\_enabled](#input\_num\_process\_check\_enabled) | Flag to enable Num Process Check monitor | `string` | `"true"` | no | | [num\_process\_check\_name](#input\_num\_process\_check\_name) | Name of Process for Num Process Check Monitor | `string` | `""` | no | -| [num\_process\_check\_operator](#input\_num\_process\_check\_operator) | Operator for Num Proccess Check Query [available values: `<, >, <=, >=, =`] | `string` | `"<="` | no | -| [num\_process\_check\_threshold\_critical](#input\_num\_process\_check\_threshold\_critical) | Num Proccess Check critical threshold | `number` | `1` | no | -| [num\_process\_check\_threshold\_warning](#input\_num\_process\_check\_threshold\_warning) | Num Proccess Check warning threshold | `number` | `2` | no | +| [num\_process\_check\_operator](#input\_num\_process\_check\_operator) | Operator for Num Process Check Query [available values: `<, >, <=, >=, =`] | `string` | `"<="` | no | +| [num\_process\_check\_threshold\_critical](#input\_num\_process\_check\_threshold\_critical) | Num Process Check critical threshold | `number` | `1` | no | +| [num\_process\_check\_threshold\_warning](#input\_num\_process\_check\_threshold\_warning) | Num Process Check warning threshold | `number` | `2` | no | | [num\_process\_check\_timeframe](#input\_num\_process\_check\_timeframe) | Monitor timeframe for Num Process Check [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | diff --git a/host/process/README.md b/host/process/README.md index 93a1bb8..58382b3 100644 --- a/host/process/README.md +++ b/host/process/README.md @@ -51,9 +51,9 @@ No modules. | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [process\_check\_enabled](#input\_process\_check\_enabled) | Flag to enable Process Check monitor | `string` | `"true"` | no | | [process\_check\_name](#input\_process\_check\_name) | Name of Process for Process Check Monitor | `string` | `""` | no | -| [process\_check\_threshold\_critical](#input\_process\_check\_threshold\_critical) | Proccess Check critical threshold | `number` | `5` | no | -| [process\_check\_threshold\_ok](#input\_process\_check\_threshold\_ok) | Proccess Check ok threshold | `number` | `1` | no | -| [process\_check\_threshold\_warning](#input\_process\_check\_threshold\_warning) | Proccess Check warning threshold | `number` | `2` | no | +| [process\_check\_threshold\_critical](#input\_process\_check\_threshold\_critical) | Process Check critical threshold | `number` | `5` | no | +| [process\_check\_threshold\_ok](#input\_process\_check\_threshold\_ok) | Process Check ok threshold | `number` | `1` | no | +| [process\_check\_threshold\_warning](#input\_process\_check\_threshold\_warning) | Process Check warning threshold | `number` | `2` | no | | [process\_check\_timeframe](#input\_process\_check\_timeframe) | Monitor timeframe for Process Check [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | From 9bf5f2a949027f2ba50c40c33ae004943fee791a Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Mon, 15 Jul 2024 13:18:03 -0600 Subject: [PATCH 11/77] update filter used by host unreachable monitor --- host/agent/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/agent/main.tf b/host/agent/main.tf index 0ee09ae..45f503a 100644 --- a/host/agent/main.tf +++ b/host/agent/main.tf @@ -24,7 +24,7 @@ resource "datadog_monitor" "host_unreachable" { timeout_h = var.timeout_h query = < Date: Mon, 15 Jul 2024 14:23:20 -0600 Subject: [PATCH 12/77] make notify_no_data a variable --- host/agent/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/agent/main.tf b/host/agent/main.tf index 45f503a..7377cdb 100644 --- a/host/agent/main.tf +++ b/host/agent/main.tf @@ -18,7 +18,7 @@ resource "datadog_monitor" "host_unreachable" { evaluation_delay = var.evaluation_delay new_group_delay = var.new_group_delay - notify_no_data = false + notify_no_data = var.notify_no_data renotify_interval = var.renotify_interval require_full_window = true timeout_h = var.timeout_h From 51596c753b9802390dbe6a179c7d4729651937b8 Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Tue, 16 Jul 2024 07:34:15 -0600 Subject: [PATCH 13/77] fix monitor queries --- host/num-process/README.md | 2 +- host/num-process/main.tf | 2 +- host/num-process/variables.tf | 6 +++--- host/process/README.md | 1 - host/process/main.tf | 2 +- host/process/variables.tf | 6 ------ host/swap/main.tf | 4 ++-- 7 files changed, 8 insertions(+), 15 deletions(-) diff --git a/host/num-process/README.md b/host/num-process/README.md index 11ce261..41dad92 100644 --- a/host/num-process/README.md +++ b/host/num-process/README.md @@ -49,8 +49,8 @@ No modules. | [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [num\_process\_check\_aggregator](#input\_num\_process\_check\_aggregator) | Aggregation method for Num Process Check [available values: `min, max, avg, sum`] | `string` | `"min"` | no | | [num\_process\_check\_enabled](#input\_num\_process\_check\_enabled) | Flag to enable Num Process Check monitor | `string` | `"true"` | no | -| [num\_process\_check\_name](#input\_num\_process\_check\_name) | Name of Process for Num Process Check Monitor | `string` | `""` | no | | [num\_process\_check\_operator](#input\_num\_process\_check\_operator) | Operator for Num Process Check Query [available values: `<, >, <=, >=, =`] | `string` | `"<="` | no | | [num\_process\_check\_threshold\_critical](#input\_num\_process\_check\_threshold\_critical) | Num Process Check critical threshold | `number` | `1` | no | | [num\_process\_check\_threshold\_warning](#input\_num\_process\_check\_threshold\_warning) | Num Process Check warning threshold | `number` | `2` | no | diff --git a/host/num-process/main.tf b/host/num-process/main.tf index 8c6f0b7..a7dcb23 100644 --- a/host/num-process/main.tf +++ b/host/num-process/main.tf @@ -26,7 +26,7 @@ resource "datadog_monitor" "num_process_check" { require_full_window = true query = < [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [process\_check\_enabled](#input\_process\_check\_enabled) | Flag to enable Process Check monitor | `string` | `"true"` | no | -| [process\_check\_name](#input\_process\_check\_name) | Name of Process for Process Check Monitor | `string` | `""` | no | | [process\_check\_threshold\_critical](#input\_process\_check\_threshold\_critical) | Process Check critical threshold | `number` | `5` | no | | [process\_check\_threshold\_ok](#input\_process\_check\_threshold\_ok) | Process Check ok threshold | `number` | `1` | no | | [process\_check\_threshold\_warning](#input\_process\_check\_threshold\_warning) | Process Check warning threshold | `number` | `2` | no | diff --git a/host/process/main.tf b/host/process/main.tf index dcd9d0b..b3ed643 100644 --- a/host/process/main.tf +++ b/host/process/main.tf @@ -26,7 +26,7 @@ resource "datadog_monitor" "process_check" { require_full_window = true query = < ${var.swap_threshold_critical} + avg:system.swap.pct_free${local.query_filter} by {host} + < ${var.swap_threshold_critical} EOQ evaluation_delay = var.evaluation_delay From 68845bcc1d1e34a0a088256a0ecaf54d7061db05 Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Tue, 16 Jul 2024 08:14:54 -0600 Subject: [PATCH 14/77] fix process monitor query --- host/process/README.md | 1 - host/process/main.tf | 2 +- host/process/variables.tf | 6 ------ 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/host/process/README.md b/host/process/README.md index 6cb7702..2bc5fca 100644 --- a/host/process/README.md +++ b/host/process/README.md @@ -53,7 +53,6 @@ No modules. | [process\_check\_threshold\_critical](#input\_process\_check\_threshold\_critical) | Process Check critical threshold | `number` | `5` | no | | [process\_check\_threshold\_ok](#input\_process\_check\_threshold\_ok) | Process Check ok threshold | `number` | `1` | no | | [process\_check\_threshold\_warning](#input\_process\_check\_threshold\_warning) | Process Check warning threshold | `number` | `2` | no | -| [process\_check\_timeframe](#input\_process\_check\_timeframe) | Monitor timeframe for Process Check [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | diff --git a/host/process/main.tf b/host/process/main.tf index b3ed643..8a4ccb8 100644 --- a/host/process/main.tf +++ b/host/process/main.tf @@ -26,7 +26,7 @@ resource "datadog_monitor" "process_check" { require_full_window = true query = < Date: Tue, 16 Jul 2024 10:53:07 -0600 Subject: [PATCH 15/77] fix service check query --- host/process/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/process/main.tf b/host/process/main.tf index 8a4ccb8..84e8060 100644 --- a/host/process/main.tf +++ b/host/process/main.tf @@ -26,7 +26,7 @@ resource "datadog_monitor" "process_check" { require_full_window = true query = < Date: Wed, 17 Jul 2024 09:22:46 -0600 Subject: [PATCH 16/77] add system clock monitor --- host/clock/.terraform.lock.hcl | 44 +++++++++++++++++++++++ host/clock/README.md | 65 ++++++++++++++++++++++++++++++++++ host/clock/common.tf | 1 + host/clock/main.tf | 35 ++++++++++++++++++ host/clock/variables.tf | 23 ++++++++++++ host/clock/versions.tf | 1 + 6 files changed, 169 insertions(+) create mode 100644 host/clock/.terraform.lock.hcl create mode 100644 host/clock/README.md create mode 120000 host/clock/common.tf create mode 100644 host/clock/main.tf create mode 100644 host/clock/variables.tf create mode 120000 host/clock/versions.tf diff --git a/host/clock/.terraform.lock.hcl b/host/clock/.terraform.lock.hcl new file mode 100644 index 0000000..f254011 --- /dev/null +++ b/host/clock/.terraform.lock.hcl @@ -0,0 +1,44 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/datadog/datadog" { + version = "3.41.0" + constraints = ">= 3.37.0" + hashes = [ + "h1:pirD2aruoZmIWnGHiX8ygPrpDfvqxpcpQsXT72xQbRM=", + "zh:22fea67ac137965232efb5b47ee3297d580f6e121f8c38d66e8988b8c572e495", + "zh:5a59f205a92b4a99699129db9e19b7bf9d25a40cd6c85f1dbcccee061451072a", + "zh:718d0c88c43a140bd9e78d225485d07619ed23590851d93fc2db0b549494680d", + "zh:73b86c4ae3c53e884e3e31b8a44e9d1f82456ac708bbf70fd6f69ee43fad3373", + "zh:8f04df7bfab6596f389f7b8994c4b21dfa9ca82ccc75e34bdd5247ea23dae8bd", + "zh:98465837fe157095b4247f0a103bfb49f6d6ec917afdf5523689bb8570dbe09c", + "zh:9fc62ba7033890b4d350af348c53f9fb4b152cb93a8d3b31f362b57860fa06de", + "zh:c278d8f6deeff57c95aad2604dd32cca8dae587583dfb44cbc2f23bfd9547129", + "zh:c2f16f6c40fe4aae4728cc815ea818bb18305bd9464486349c06d339b4ecbe6e", + "zh:cda87b6a8c264ea07c57b1f1aaa70aa2f5ea262ea5f487762b88a896787c4e31", + "zh:d543041a223ec6ca7abb5e0b4218651ae84ef2c3601e2254063d5c7f3b7f2868", + "zh:e24cd9533c23a5c952d02e751a461624a90456f946cce16812671c055f8bf865", + "zh:f046dac619cbfd53fffdb7ff84669f7e62a83a6c9eee4bb9ef23115672dc4a1c", + "zh:fec08e860447b2c9afe386b36ef5cacd82b5ba2884a8b67b3b3dfe1ca18e932b", + ] +} + +provider "registry.terraform.io/hashicorp/null" { + version = "3.2.2" + constraints = ">= 3.1.0" + hashes = [ + "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", + "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", + "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", + "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", + "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", + "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", + "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", + "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", + "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", + "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", + ] +} diff --git a/host/clock/README.md b/host/clock/README.md new file mode 100644 index 0000000..7baea44 --- /dev/null +++ b/host/clock/README.md @@ -0,0 +1,65 @@ +# terraform-datadog-monitor/host/clock + +Configures monitor for System Clock. + + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | ~> 1.5 | +| [datadog](#requirement\_datadog) | >= 3.37 | +| [null](#requirement\_null) | >= 3.1.0 | + +## Providers + +| Name | Version | +|------|---------| +| [datadog](#provider\_datadog) | 3.41.0 | + +## Modules + +No modules. + +## Resources + +| Name | Type | +|------|------| +| [datadog_monitor.system_clock](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [additional\_tags](#input\_additional\_tags) | Additional tags (key:value format) to add to this type of check (combined with `local.tags` and `var.base_tags`) | `list(string)` | `[]` | no | +| [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | +| [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:apigateway"
]
| no | +| [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | +| [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | +| [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | +| [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | +| [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | +| [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [system\_clock\_enabled](#input\_system\_clock\_enabled) | Flag to enable Host unreachable monitor | `bool` | `true` | no | +| [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [timeout\_h](#input\_timeout\_h) | Auto-resolve alert in specified hours if condition no longer matches | `number` | `0` | no | +| [title\_prefix](#input\_title\_prefix) | Prefix all alerts with specified value in brackets | `string` | `null` | no | +| [title\_suffix](#input\_title\_suffix) | Suffix all alerts with specified value in parenthesis | `string` | `null` | no | +| [warn\_priority](#input\_warn\_priority) | Priority for alerts with no data (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | + +## Outputs + +No outputs. + diff --git a/host/clock/common.tf b/host/clock/common.tf new file mode 120000 index 0000000..47c0063 --- /dev/null +++ b/host/clock/common.tf @@ -0,0 +1 @@ +../../common/common.tf \ No newline at end of file diff --git a/host/clock/main.tf b/host/clock/main.tf new file mode 100644 index 0000000..9b9ccc0 --- /dev/null +++ b/host/clock/main.tf @@ -0,0 +1,35 @@ +locals { + # these must be defined but do not need to be overridden + monitor_alert_default_priority = null + monitor_warn_default_priority = null + monitor_nodata_default_priority = null + + title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}[${var.env}] " + title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" +} + +resource "datadog_monitor" "system_clock" { + count = var.system_clock_enabled ? 1 : 0 + + name = join("", [local.title_prefix, "System Clock - {{host.name}}", local.title_suffix]) + message = local.query_alert_base_message + tags = concat(local.common_tags, var.base_tags, var.additional_tags) + type = "service check" + + evaluation_delay = var.evaluation_delay + new_group_delay = var.new_group_delay + notify_no_data = var.notify_no_data + renotify_interval = var.renotify_interval + require_full_window = true + timeout_h = var.timeout_h + + query = < Date: Wed, 17 Jul 2024 15:02:59 -0600 Subject: [PATCH 17/77] make process monitor more robust --- host/num-process/.terraform.lock.hcl | 44 ----------------- host/num-process/README.md | 70 ---------------------------- host/num-process/common.tf | 1 - host/num-process/main.tf | 37 --------------- host/num-process/variables.tf | 53 --------------------- host/num-process/versions.tf | 1 - host/process/README.md | 11 +++-- host/process/main.tf | 16 +++---- host/process/variables.tf | 26 +++++++---- 9 files changed, 30 insertions(+), 229 deletions(-) delete mode 100644 host/num-process/.terraform.lock.hcl delete mode 100644 host/num-process/README.md delete mode 120000 host/num-process/common.tf delete mode 100644 host/num-process/main.tf delete mode 100644 host/num-process/variables.tf delete mode 120000 host/num-process/versions.tf diff --git a/host/num-process/.terraform.lock.hcl b/host/num-process/.terraform.lock.hcl deleted file mode 100644 index 0791549..0000000 --- a/host/num-process/.terraform.lock.hcl +++ /dev/null @@ -1,44 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/datadog/datadog" { - version = "3.39.0" - constraints = ">= 3.37.0" - hashes = [ - "h1:6rSVMI3RBWRHA70wH8eIGyzH1IZHu1hwdixT+UbD9S0=", - "zh:3389298e5116232edd1c6e64c7a83f696d5663f1a1c7da5bb32be3472faa4a9e", - "zh:39b5d91e58372716d9c7d4869e8391612d3799a936f7c94cc9b3efbe08f4a6d9", - "zh:4a077105269fd187fc751a390d3e894092a2dd1b44e7e76ff9923968d971dc6a", - "zh:4ddfc1d5839eb4b88bdf3c620bc7f3a94c850d5e5a21b8c818bba63c4f264d24", - "zh:65d076f03bbaa2782c7487411bda925c14ee4841aefd0eda5442c5e4e73856cd", - "zh:7e357a7fe969c7ccbcb755799b95612f9e0bd835cfd993b05b5303c6dde1ffbd", - "zh:a1f11d390762eddaeef701c9d2747c8a9e113afa7fe7284210d62a21d1113f6e", - "zh:a7a17b04e66d7b13dca6240dab393a3dffec4429fc685fdeabd7113064cd8331", - "zh:af60a0062adcf35d89b159a45f1ce77ad8ea196bccaea1d1e17ab8caffbe859a", - "zh:bf8e5836cb7cbc82fae10b874d137fd5e804c7308ce05c76eaebee6e5b26123e", - "zh:c1c4742ea3be506124a494bdc9d2f4ec777e98e0ad6add9b6e81d4703dc4ac1e", - "zh:d121a6fcb947c674026b35751f10ffe4941ab3c163d4c0f210d053e0984f11e6", - "zh:d99b1c20a343c4cf7c4a2117e9b29eb8056d9f481c52d19500c037c8b6e87878", - "zh:e1338c712edb4a87b7ebeb9bd4f7ae72dc3b7574fdac45bc8e2d0cef784e0597", - ] -} - -provider "registry.terraform.io/hashicorp/null" { - version = "3.2.2" - constraints = ">= 3.1.0" - hashes = [ - "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", - "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", - "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", - "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", - "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", - "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", - "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", - "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", - "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", - "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", - "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", - ] -} diff --git a/host/num-process/README.md b/host/num-process/README.md deleted file mode 100644 index 41dad92..0000000 --- a/host/num-process/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# terraform-datadog-monitor/host/num-process - -Number of Processes Check to alert on stale or runaway processes. - - -## Requirements - -| Name | Version | -|------|---------| -| [terraform](#requirement\_terraform) | ~> 1.5 | -| [datadog](#requirement\_datadog) | >= 3.37 | -| [null](#requirement\_null) | >= 3.1.0 | - -## Providers - -| Name | Version | -|------|---------| -| [datadog](#provider\_datadog) | 3.39.0 | - -## Modules - -No modules. - -## Resources - -| Name | Type | -|------|------| -| [datadog_monitor.num_process_check](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | - -## Inputs - -| Name | Description | Type | Default | Required | -|------|-------------|------|---------|:--------:| -| [additional\_tags](#input\_additional\_tags) | Additional tags (key:value format) to add to this type of check (combined with `local.tags` and `var.base_tags`) | `list(string)` | `[]` | no | -| [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | -| [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | -| [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | -| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:apigateway"
]
| no | -| [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | -| [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | -| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | -| [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | -| [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | -| [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | -| [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | -| [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | -| [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | -| [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | -| [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | -| [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | -| [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | -| [num\_process\_check\_aggregator](#input\_num\_process\_check\_aggregator) | Aggregation method for Num Process Check [available values: `min, max, avg, sum`] | `string` | `"min"` | no | -| [num\_process\_check\_enabled](#input\_num\_process\_check\_enabled) | Flag to enable Num Process Check monitor | `string` | `"true"` | no | -| [num\_process\_check\_operator](#input\_num\_process\_check\_operator) | Operator for Num Process Check Query [available values: `<, >, <=, >=, =`] | `string` | `"<="` | no | -| [num\_process\_check\_threshold\_critical](#input\_num\_process\_check\_threshold\_critical) | Num Process Check critical threshold | `number` | `1` | no | -| [num\_process\_check\_threshold\_warning](#input\_num\_process\_check\_threshold\_warning) | Num Process Check warning threshold | `number` | `2` | no | -| [num\_process\_check\_timeframe](#input\_num\_process\_check\_timeframe) | Monitor timeframe for Num Process Check [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | -| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | -| [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | -| [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | -| [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | -| [timeout\_h](#input\_timeout\_h) | Auto-resolve alert in specified hours if condition no longer matches | `number` | `0` | no | -| [title\_prefix](#input\_title\_prefix) | Prefix all alerts with specified value in brackets | `string` | `null` | no | -| [title\_suffix](#input\_title\_suffix) | Suffix all alerts with specified value in parenthesis | `string` | `null` | no | -| [warn\_priority](#input\_warn\_priority) | Priority for alerts with no data (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | - -## Outputs - -No outputs. - diff --git a/host/num-process/common.tf b/host/num-process/common.tf deleted file mode 120000 index 47c0063..0000000 --- a/host/num-process/common.tf +++ /dev/null @@ -1 +0,0 @@ -../../common/common.tf \ No newline at end of file diff --git a/host/num-process/main.tf b/host/num-process/main.tf deleted file mode 100644 index a7dcb23..0000000 --- a/host/num-process/main.tf +++ /dev/null @@ -1,37 +0,0 @@ -locals { - # these must be defined but do not need to be overridden - monitor_alert_default_priority = null - monitor_warn_default_priority = null - monitor_nodata_default_priority = null - - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}[${var.env}] " - title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" -} - -resource "datadog_monitor" "num_process_check" { - count = var.num_process_check_enabled ? 1 : 0 - - name = join("", [local.title_prefix, "Process Check - {{host.name}}", local.title_suffix]) - message = local.query_alert_base_message - tags = concat(local.common_tags, var.base_tags, var.additional_tags) - type = "query alert" - - evaluation_delay = var.evaluation_delay - new_group_delay = var.new_group_delay - notify_no_data = false - renotify_interval = 0 - notify_audit = false - timeout_h = var.timeout_h - include_tags = true - require_full_window = true - - query = < [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | -| [process\_check\_enabled](#input\_process\_check\_enabled) | Flag to enable Process Check monitor | `string` | `"true"` | no | -| [process\_check\_threshold\_critical](#input\_process\_check\_threshold\_critical) | Process Check critical threshold | `number` | `5` | no | -| [process\_check\_threshold\_ok](#input\_process\_check\_threshold\_ok) | Process Check ok threshold | `number` | `1` | no | -| [process\_check\_threshold\_warning](#input\_process\_check\_threshold\_warning) | Process Check warning threshold | `number` | `2` | no | +| [process\_alert\_enabled](#input\_process\_alert\_enabled) | Flag to enable Process Check monitor | `string` | `"true"` | no | +| [process\_alert\_operator](#input\_process\_alert\_operator) | Operator for Process Alert Query [available values: `<, >, <=, >=, =`] | `string` | `"<"` | no | +| [process\_alert\_threshold\_critical](#input\_process\_alert\_threshold\_critical) | Process Alert critical threshold | `number` | `5` | no | +| [process\_alert\_threshold\_warning](#input\_process\_alert\_threshold\_warning) | Process Alert warning threshold | `number` | `2` | no | +| [process\_alert\_timeframe](#input\_process\_alert\_timeframe) | Monitor timeframe for Process Alert [available values: `#m` (1, 5, 10, 15, or 30), `#h` (1, 2, or 4), or `1d`] | `string` | `"5m"` | no | | [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | diff --git a/host/process/main.tf b/host/process/main.tf index 84e8060..22552e4 100644 --- a/host/process/main.tf +++ b/host/process/main.tf @@ -8,13 +8,13 @@ locals { title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } -resource "datadog_monitor" "process_check" { - count = var.process_check_enabled ? 1 : 0 +resource "datadog_monitor" "process_alert" { + count = var.process_alert_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Process Check - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "Process Alert - {{host.name}}", local.title_suffix]) message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) - type = "service check" + type = "process alert" evaluation_delay = var.evaluation_delay new_group_delay = var.new_group_delay @@ -26,12 +26,12 @@ resource "datadog_monitor" "process_check" { require_full_window = true query = < Date: Wed, 17 Jul 2024 16:14:58 -0600 Subject: [PATCH 18/77] add process name as input --- host/process/README.md | 1 + host/process/main.tf | 2 +- host/process/variables.tf | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/host/process/README.md b/host/process/README.md index 4855d5e..e06e4a8 100644 --- a/host/process/README.md +++ b/host/process/README.md @@ -51,6 +51,7 @@ No modules. | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [process\_alert\_enabled](#input\_process\_alert\_enabled) | Flag to enable Process Check monitor | `string` | `"true"` | no | | [process\_alert\_operator](#input\_process\_alert\_operator) | Operator for Process Alert Query [available values: `<, >, <=, >=, =`] | `string` | `"<"` | no | +| [process\_alert\_process\_name](#input\_process\_alert\_process\_name) | Name of Process for Process Alert | `string` | `""` | no | | [process\_alert\_threshold\_critical](#input\_process\_alert\_threshold\_critical) | Process Alert critical threshold | `number` | `5` | no | | [process\_alert\_threshold\_warning](#input\_process\_alert\_threshold\_warning) | Process Alert warning threshold | `number` | `2` | no | | [process\_alert\_timeframe](#input\_process\_alert\_timeframe) | Monitor timeframe for Process Alert [available values: `#m` (1, 5, 10, 15, or 30), `#h` (1, 2, or 4), or `1d`] | `string` | `"5m"` | no | diff --git a/host/process/main.tf b/host/process/main.tf index 22552e4..73a9c18 100644 --- a/host/process/main.tf +++ b/host/process/main.tf @@ -26,7 +26,7 @@ resource "datadog_monitor" "process_alert" { require_full_window = true query = < Date: Wed, 17 Jul 2024 16:32:42 -0600 Subject: [PATCH 19/77] fix process query --- host/process/README.md | 4 ++-- host/process/main.tf | 2 +- host/process/variables.tf | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/host/process/README.md b/host/process/README.md index e06e4a8..d18dd99 100644 --- a/host/process/README.md +++ b/host/process/README.md @@ -52,8 +52,8 @@ No modules. | [process\_alert\_enabled](#input\_process\_alert\_enabled) | Flag to enable Process Check monitor | `string` | `"true"` | no | | [process\_alert\_operator](#input\_process\_alert\_operator) | Operator for Process Alert Query [available values: `<, >, <=, >=, =`] | `string` | `"<"` | no | | [process\_alert\_process\_name](#input\_process\_alert\_process\_name) | Name of Process for Process Alert | `string` | `""` | no | -| [process\_alert\_threshold\_critical](#input\_process\_alert\_threshold\_critical) | Process Alert critical threshold | `number` | `5` | no | -| [process\_alert\_threshold\_warning](#input\_process\_alert\_threshold\_warning) | Process Alert warning threshold | `number` | `2` | no | +| [process\_alert\_threshold\_critical](#input\_process\_alert\_threshold\_critical) | Process Alert critical threshold | `number` | `1` | no | +| [process\_alert\_threshold\_warning](#input\_process\_alert\_threshold\_warning) | Process Alert warning threshold | `number` | `null` | no | | [process\_alert\_timeframe](#input\_process\_alert\_timeframe) | Monitor timeframe for Process Alert [available values: `#m` (1, 5, 10, 15, or 30), `#h` (1, 2, or 4), or `1d`] | `string` | `"5m"` | no | | [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | diff --git a/host/process/main.tf b/host/process/main.tf index 73a9c18..803f51e 100644 --- a/host/process/main.tf +++ b/host/process/main.tf @@ -26,7 +26,7 @@ resource "datadog_monitor" "process_alert" { require_full_window = true query = < Date: Wed, 17 Jul 2024 16:52:30 -0600 Subject: [PATCH 20/77] fix process query syntax --- host/process/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/process/main.tf b/host/process/main.tf index 803f51e..629f9ad 100644 --- a/host/process/main.tf +++ b/host/process/main.tf @@ -26,7 +26,7 @@ resource "datadog_monitor" "process_alert" { require_full_window = true query = < Date: Wed, 17 Jul 2024 17:05:16 -0600 Subject: [PATCH 21/77] fix process query syntax --- host/process/main.tf | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/host/process/main.tf b/host/process/main.tf index 629f9ad..7918fbd 100644 --- a/host/process/main.tf +++ b/host/process/main.tf @@ -17,7 +17,6 @@ resource "datadog_monitor" "process_alert" { type = "process alert" evaluation_delay = var.evaluation_delay - new_group_delay = var.new_group_delay notify_no_data = false renotify_interval = 0 notify_audit = false @@ -26,8 +25,7 @@ resource "datadog_monitor" "process_alert" { require_full_window = true query = < Date: Mon, 12 Aug 2024 12:48:19 -0600 Subject: [PATCH 22/77] configure ssl certificate monitor --- synthetics/certificate/.terraform.lock.hcl | 44 +++++++++++++ synthetics/certificate/README.md | 72 ++++++++++++++++++++++ synthetics/certificate/common.tf | 1 + synthetics/certificate/main.tf | 37 +++++++++++ synthetics/certificate/variables.tf | 58 +++++++++++++++++ synthetics/certificate/versions.tf | 1 + 6 files changed, 213 insertions(+) create mode 100644 synthetics/certificate/.terraform.lock.hcl create mode 100644 synthetics/certificate/README.md create mode 120000 synthetics/certificate/common.tf create mode 100644 synthetics/certificate/main.tf create mode 100644 synthetics/certificate/variables.tf create mode 120000 synthetics/certificate/versions.tf diff --git a/synthetics/certificate/.terraform.lock.hcl b/synthetics/certificate/.terraform.lock.hcl new file mode 100644 index 0000000..4819dd9 --- /dev/null +++ b/synthetics/certificate/.terraform.lock.hcl @@ -0,0 +1,44 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/datadog/datadog" { + version = "3.42.0" + constraints = ">= 3.37.0" + hashes = [ + "h1:Wi04Hu0HzKTJilkBg7oLoZJyuWLfIXfvGYX7Vdi7VnI=", + "zh:168651f7fb057da1747056f600971b20741ee8dae9a10b8d84862dec032a0609", + "zh:1d4dd8dc0a367721ebcf6418d31612f2c1cca253ef1183e9247deecc14a5e4dd", + "zh:262cde1f060ad33612f709f9d73d744db3eb11bedc7c2326692aa5aa82d675f4", + "zh:27aa69e2c707136198814252c5e8d9660cf560ba614253cf8c51ca086ac2c9aa", + "zh:437b97e85b181c70b29cd0ceaee470bb654cec38efe459ae8fac58c75e082e81", + "zh:5011d1d68226c50f996f72dfca04029c2ef33e0e7ff79ddf54941dc704bf5d74", + "zh:65e048c49aa4739fbdc62096c58a8ee33f3ed2f2ff169d3e042bc17374f36484", + "zh:8b4fb3221839228a30b83d2591925952c86206dcac4d517a7822384ed7ff29ba", + "zh:9389e9224d815f8b684742d45383e981b26a3c87ce3828101db153d901a10d87", + "zh:97f9dcfc33edd824a65ee7debcf4b437b146c4a18fce5e3b98a3f0e9aab97b1e", + "zh:a1c39f73301335d99a9ed154d5b32b9208540c33ba6c6eb07574eba828ae6814", + "zh:c10413ba2e1985cb499221e83f0b848a547a3648e1d9e75c546ad8c50f12478b", + "zh:e9bb68a4beaafa4630cd7ddf7206d1cd799497dc6cac2c9de5c419e40f81c1bf", + "zh:eefac5e52e0fe756eeac8c336f9fd64adb8d86155695b4e7a11a4874f1e3bc85", + ] +} + +provider "registry.terraform.io/hashicorp/null" { + version = "3.2.2" + constraints = ">= 3.1.0" + hashes = [ + "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", + "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", + "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", + "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", + "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", + "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", + "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", + "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", + "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", + "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", + ] +} diff --git a/synthetics/certificate/README.md b/synthetics/certificate/README.md new file mode 100644 index 0000000..03e6c5b --- /dev/null +++ b/synthetics/certificate/README.md @@ -0,0 +1,72 @@ +# terraform-datadog-monitor/synthetics/certificate + +Configures Synthetic Test for SSL Certificate + + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | ~> 1.5 | +| [datadog](#requirement\_datadog) | >= 3.37 | +| [null](#requirement\_null) | >= 3.1.0 | + +## Providers + +| Name | Version | +|------|---------| +| [datadog](#provider\_datadog) | 3.42.0 | + +## Modules + +No modules. + +## Resources + +| Name | Type | +|------|------| +| [datadog_synthetics_test.ssl](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/synthetics_test) | resource | +| [datadog_synthetics_locations.ssl](https://registry.terraform.io/providers/datadog/datadog/latest/docs/data-sources/synthetics_locations) | data source | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [additional\_tags](#input\_additional\_tags) | Additional tags (key:value format) to add to this type of check (combined with `local.tags` and `var.base_tags`) | `list(string)` | `[]` | no | +| [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | +| [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:apigateway"
]
| no | +| [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | +| [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | +| [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | +| [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | +| [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | +| [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [ssl\_synthetic\_accept\_self\_signed](#input\_ssl\_synthetic\_accept\_self\_signed) | Whether or not SSL Synthetic Test should allow self signed certificates. | `bool` | `false` | no | +| [ssl\_synthetic\_days\_to\_expiration](#input\_ssl\_synthetic\_days\_to\_expiration) | Number of Days till certificate expiration for SSL Synthetic Test to alert. | `number` | `7` | no | +| [ssl\_synthetic\_enabled](#input\_ssl\_synthetic\_enabled) | Flag to enable SSL Synthetic Test | `string` | `"true"` | no | +| [ssl\_synthetic\_host](#input\_ssl\_synthetic\_host) | Host name to perform SSL Synthetic Test with. | `string` | n/a | yes | +| [ssl\_synthetic\_locations](#input\_ssl\_synthetic\_locations) | An array of datadog locations used to run SSL Synthetic Test | `list(string)` |
[
"aws:us-east-1"
]
| no | +| [ssl\_synthetic\_port](#input\_ssl\_synthetic\_port) | Port to use when performing SSL Synthetic Test. | `number` | `443` | no | +| [ssl\_synthetic\_tick\_every](#input\_ssl\_synthetic\_tick\_every) | How often SSL Synthetic Test should run in seconds. | `number` | `900` | no | +| [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [timeout\_h](#input\_timeout\_h) | Auto-resolve alert in specified hours if condition no longer matches | `number` | `0` | no | +| [title\_prefix](#input\_title\_prefix) | Prefix all alerts with specified value in brackets | `string` | `null` | no | +| [title\_suffix](#input\_title\_suffix) | Suffix all alerts with specified value in parenthesis | `string` | `null` | no | +| [warn\_priority](#input\_warn\_priority) | Priority for alerts with no data (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | + +## Outputs + +No outputs. + diff --git a/synthetics/certificate/common.tf b/synthetics/certificate/common.tf new file mode 120000 index 0000000..47c0063 --- /dev/null +++ b/synthetics/certificate/common.tf @@ -0,0 +1 @@ +../../common/common.tf \ No newline at end of file diff --git a/synthetics/certificate/main.tf b/synthetics/certificate/main.tf new file mode 100644 index 0000000..cc410c0 --- /dev/null +++ b/synthetics/certificate/main.tf @@ -0,0 +1,37 @@ +locals { + # these must be defined but do not need to be overridden + monitor_alert_default_priority = null + monitor_warn_default_priority = null + monitor_nodata_default_priority = null + + title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}[${var.env}] " + title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" +} + +resource "datadog_synthetics_test" "ssl" { + count = var.ssl_synthetic_enabled ? 1 : 0 + + name = join("", [local.title_prefix, "Certificate", local.title_suffix]) + type = "api" + subtype = "ssl" + status = "live" + message = local.query_alert_base_message + locations = var.ssl_synthetic_locations + tags = concat(local.common_tags, var.base_tags, var.additional_tags) + + request_definition { + host = var.ssl_synthetic_host + port = var.ssl_synthetic_port + } + + assertion { + type = "certificate" + operator = "isInMoreThan" + target = var.ssl_synthetic_days_to_expiration + } + + options_list { + tick_every = var.ssl_synthetic_tick_every + accept_self_signed = var.ssl_synthetic_accept_self_signed + } +} diff --git a/synthetics/certificate/variables.tf b/synthetics/certificate/variables.tf new file mode 100644 index 0000000..a38b9b7 --- /dev/null +++ b/synthetics/certificate/variables.tf @@ -0,0 +1,58 @@ +######################################## +# Global variables +######################################## +variable "additional_tags" { + default = [] + description = "Additional tags (key:value format) to add to this type of check (combined with `local.tags` and `var.base_tags`)" + type = list(string) +} + +variable "base_tags" { + default = ["resource:apigateway"] + description = "Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this)" + type = list(string) +} + +######################################## +# Certificate +######################################## +variable "ssl_synthetic_enabled" { + description = "Flag to enable SSL Synthetic Test" + type = string + default = "true" +} + +variable "ssl_synthetic_locations" { + description = "An array of datadog locations used to run SSL Synthetic Test" + type = list(string) + default = ["aws:us-east-1"] +} + +variable "ssl_synthetic_host" { + description = "Host name to perform SSL Synthetic Test with." + type = string +} + +variable "ssl_synthetic_port" { + description = "Port to use when performing SSL Synthetic Test." + type = number + default = 443 +} + +variable "ssl_synthetic_days_to_expiration" { + description = "Number of Days till certificate expiration for SSL Synthetic Test to alert." + type = number + default = 7 +} + +variable "ssl_synthetic_tick_every" { + description = "How often SSL Synthetic Test should run in seconds." + type = number + default = 900 +} + +variable "ssl_synthetic_accept_self_signed" { + description = "Whether or not SSL Synthetic Test should allow self signed certificates." + type = bool + default = false +} diff --git a/synthetics/certificate/versions.tf b/synthetics/certificate/versions.tf new file mode 120000 index 0000000..cbeda73 --- /dev/null +++ b/synthetics/certificate/versions.tf @@ -0,0 +1 @@ +../../common/versions.tf \ No newline at end of file From 61a09169d366f790451f42508ae7662ea99192a1 Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Mon, 12 Aug 2024 23:27:51 -0600 Subject: [PATCH 23/77] configure alert message for synthetics monitor --- common/common.tf | 7 +++++++ synthetics/certificate/main.tf | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/common/common.tf b/common/common.tf index a770728..14461a1 100644 --- a/common/common.tf +++ b/common/common.tf @@ -255,5 +255,12 @@ ${local.alert_context} {{#is_warning}} ${local.notify_on_warn} {{/is_warning}} {{#is_no_data}} ${local.notify_on_nodata} {{/is_no_data}} {{#is_recovery}} ${local.notify_on_recovery} {{/is_recovery}} +END + + synthetic_alert_base_message = < Date: Tue, 13 Aug 2024 00:15:18 -0600 Subject: [PATCH 24/77] add tlsversion and responsetime assertions --- synthetics/certificate/README.md | 3 ++- synthetics/certificate/main.tf | 12 ++++++++++++ synthetics/certificate/variables.tf | 12 ++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/synthetics/certificate/README.md b/synthetics/certificate/README.md index 03e6c5b..2f736b8 100644 --- a/synthetics/certificate/README.md +++ b/synthetics/certificate/README.md @@ -26,7 +26,6 @@ No modules. | Name | Type | |------|------| | [datadog_synthetics_test.ssl](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/synthetics_test) | resource | -| [datadog_synthetics_locations.ssl](https://registry.terraform.io/providers/datadog/datadog/latest/docs/data-sources/synthetics_locations) | data source | ## Inputs @@ -58,6 +57,8 @@ No modules. | [ssl\_synthetic\_enabled](#input\_ssl\_synthetic\_enabled) | Flag to enable SSL Synthetic Test | `string` | `"true"` | no | | [ssl\_synthetic\_host](#input\_ssl\_synthetic\_host) | Host name to perform SSL Synthetic Test with. | `string` | n/a | yes | | [ssl\_synthetic\_locations](#input\_ssl\_synthetic\_locations) | An array of datadog locations used to run SSL Synthetic Test | `list(string)` |
[
"aws:us-east-1"
]
| no | +| [ssl\_synthetic\_max\_response\_time](#input\_ssl\_synthetic\_max\_response\_time) | Number of milliseconds host response time should be less than. | `number` | `2000` | no | +| [ssl\_synthetic\_min\_tls\_version](#input\_ssl\_synthetic\_min\_tls\_version) | Number Certificate TLS version should be equal to or greater than. | `number` | `1.2` | no | | [ssl\_synthetic\_port](#input\_ssl\_synthetic\_port) | Port to use when performing SSL Synthetic Test. | `number` | `443` | no | | [ssl\_synthetic\_tick\_every](#input\_ssl\_synthetic\_tick\_every) | How often SSL Synthetic Test should run in seconds. | `number` | `900` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | diff --git a/synthetics/certificate/main.tf b/synthetics/certificate/main.tf index 9007c99..cf84ba8 100644 --- a/synthetics/certificate/main.tf +++ b/synthetics/certificate/main.tf @@ -30,6 +30,18 @@ resource "datadog_synthetics_test" "ssl" { target = var.ssl_synthetic_days_to_expiration } + assertion { + type = "tlsVersion" + operator = "moreThanOrEqual" + target = var.ssl_synthetic_min_tls_version + } + + assertion { + type = "responseTime" + operator = "lessThan" + target = var.ssl_synthetic_max_response_time + } + options_list { tick_every = var.ssl_synthetic_tick_every accept_self_signed = var.ssl_synthetic_accept_self_signed diff --git a/synthetics/certificate/variables.tf b/synthetics/certificate/variables.tf index a38b9b7..47dc636 100644 --- a/synthetics/certificate/variables.tf +++ b/synthetics/certificate/variables.tf @@ -45,6 +45,18 @@ variable "ssl_synthetic_days_to_expiration" { default = 7 } +variable "ssl_synthetic_min_tls_version" { + description = "Number Certificate TLS version should be equal to or greater than." + type = number + default = 1.2 +} + +variable "ssl_synthetic_max_response_time" { + description = "Number of milliseconds host response time should be less than." + type = number + default = 2000 +} + variable "ssl_synthetic_tick_every" { description = "How often SSL Synthetic Test should run in seconds." type = number From 2e9f0538e2fcab1f01267775d969cfc73af2de76 Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Tue, 13 Aug 2024 02:01:50 -0600 Subject: [PATCH 25/77] rename path --- synthetics/{certificate => ssl}/.terraform.lock.hcl | 0 synthetics/{certificate => ssl}/README.md | 2 +- synthetics/{certificate => ssl}/common.tf | 0 synthetics/{certificate => ssl}/main.tf | 0 synthetics/{certificate => ssl}/variables.tf | 2 +- synthetics/{certificate => ssl}/versions.tf | 0 6 files changed, 2 insertions(+), 2 deletions(-) rename synthetics/{certificate => ssl}/.terraform.lock.hcl (100%) rename synthetics/{certificate => ssl}/README.md (99%) rename synthetics/{certificate => ssl}/common.tf (100%) rename synthetics/{certificate => ssl}/main.tf (100%) rename synthetics/{certificate => ssl}/variables.tf (98%) rename synthetics/{certificate => ssl}/versions.tf (100%) diff --git a/synthetics/certificate/.terraform.lock.hcl b/synthetics/ssl/.terraform.lock.hcl similarity index 100% rename from synthetics/certificate/.terraform.lock.hcl rename to synthetics/ssl/.terraform.lock.hcl diff --git a/synthetics/certificate/README.md b/synthetics/ssl/README.md similarity index 99% rename from synthetics/certificate/README.md rename to synthetics/ssl/README.md index 2f736b8..3928138 100644 --- a/synthetics/certificate/README.md +++ b/synthetics/ssl/README.md @@ -1,4 +1,4 @@ -# terraform-datadog-monitor/synthetics/certificate +# terraform-datadog-monitor/synthetics/ssl Configures Synthetic Test for SSL Certificate diff --git a/synthetics/certificate/common.tf b/synthetics/ssl/common.tf similarity index 100% rename from synthetics/certificate/common.tf rename to synthetics/ssl/common.tf diff --git a/synthetics/certificate/main.tf b/synthetics/ssl/main.tf similarity index 100% rename from synthetics/certificate/main.tf rename to synthetics/ssl/main.tf diff --git a/synthetics/certificate/variables.tf b/synthetics/ssl/variables.tf similarity index 98% rename from synthetics/certificate/variables.tf rename to synthetics/ssl/variables.tf index 47dc636..d6e5d9f 100644 --- a/synthetics/certificate/variables.tf +++ b/synthetics/ssl/variables.tf @@ -14,7 +14,7 @@ variable "base_tags" { } ######################################## -# Certificate +# SSL Synthetic Test variables ######################################## variable "ssl_synthetic_enabled" { description = "Flag to enable SSL Synthetic Test" diff --git a/synthetics/certificate/versions.tf b/synthetics/ssl/versions.tf similarity index 100% rename from synthetics/certificate/versions.tf rename to synthetics/ssl/versions.tf From 9ffc85b37db82a8f0775f6047087910bac21eb7a Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Tue, 13 Aug 2024 02:47:06 -0600 Subject: [PATCH 26/77] configure browser synthetic test module --- synthetics/browser/.terraform.lock.hcl | 44 ++++++++++++++++ synthetics/browser/README.md | 70 ++++++++++++++++++++++++++ synthetics/browser/common.tf | 1 + synthetics/browser/main.tf | 44 ++++++++++++++++ synthetics/browser/variables.tf | 57 +++++++++++++++++++++ synthetics/browser/versions.tf | 1 + 6 files changed, 217 insertions(+) create mode 100644 synthetics/browser/.terraform.lock.hcl create mode 100644 synthetics/browser/README.md create mode 120000 synthetics/browser/common.tf create mode 100644 synthetics/browser/main.tf create mode 100644 synthetics/browser/variables.tf create mode 120000 synthetics/browser/versions.tf diff --git a/synthetics/browser/.terraform.lock.hcl b/synthetics/browser/.terraform.lock.hcl new file mode 100644 index 0000000..4819dd9 --- /dev/null +++ b/synthetics/browser/.terraform.lock.hcl @@ -0,0 +1,44 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/datadog/datadog" { + version = "3.42.0" + constraints = ">= 3.37.0" + hashes = [ + "h1:Wi04Hu0HzKTJilkBg7oLoZJyuWLfIXfvGYX7Vdi7VnI=", + "zh:168651f7fb057da1747056f600971b20741ee8dae9a10b8d84862dec032a0609", + "zh:1d4dd8dc0a367721ebcf6418d31612f2c1cca253ef1183e9247deecc14a5e4dd", + "zh:262cde1f060ad33612f709f9d73d744db3eb11bedc7c2326692aa5aa82d675f4", + "zh:27aa69e2c707136198814252c5e8d9660cf560ba614253cf8c51ca086ac2c9aa", + "zh:437b97e85b181c70b29cd0ceaee470bb654cec38efe459ae8fac58c75e082e81", + "zh:5011d1d68226c50f996f72dfca04029c2ef33e0e7ff79ddf54941dc704bf5d74", + "zh:65e048c49aa4739fbdc62096c58a8ee33f3ed2f2ff169d3e042bc17374f36484", + "zh:8b4fb3221839228a30b83d2591925952c86206dcac4d517a7822384ed7ff29ba", + "zh:9389e9224d815f8b684742d45383e981b26a3c87ce3828101db153d901a10d87", + "zh:97f9dcfc33edd824a65ee7debcf4b437b146c4a18fce5e3b98a3f0e9aab97b1e", + "zh:a1c39f73301335d99a9ed154d5b32b9208540c33ba6c6eb07574eba828ae6814", + "zh:c10413ba2e1985cb499221e83f0b848a547a3648e1d9e75c546ad8c50f12478b", + "zh:e9bb68a4beaafa4630cd7ddf7206d1cd799497dc6cac2c9de5c419e40f81c1bf", + "zh:eefac5e52e0fe756eeac8c336f9fd64adb8d86155695b4e7a11a4874f1e3bc85", + ] +} + +provider "registry.terraform.io/hashicorp/null" { + version = "3.2.2" + constraints = ">= 3.1.0" + hashes = [ + "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", + "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", + "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", + "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", + "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", + "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", + "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", + "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", + "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", + "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", + ] +} diff --git a/synthetics/browser/README.md b/synthetics/browser/README.md new file mode 100644 index 0000000..2ba1cbc --- /dev/null +++ b/synthetics/browser/README.md @@ -0,0 +1,70 @@ +# terraform-datadog-monitor/synthetics/browser + +Configures Synthetic Test for Browser + + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | ~> 1.5 | +| [datadog](#requirement\_datadog) | >= 3.37 | +| [null](#requirement\_null) | >= 3.1.0 | + +## Providers + +| Name | Version | +|------|---------| +| [datadog](#provider\_datadog) | >= 3.37 | + +## Modules + +No modules. + +## Resources + +| Name | Type | +|------|------| +| [datadog_synthetics_test.browser](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/synthetics_test) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [additional\_tags](#input\_additional\_tags) | Additional tags (key:value format) to add to this type of check (combined with `local.tags` and `var.base_tags`) | `list(string)` | `[]` | no | +| [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | +| [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:apigateway"
]
| no | +| [browser\_synthetic\_device\_ids](#input\_browser\_synthetic\_device\_ids) | List with the different device IDs used to run the test. Valid values are laptop\_large, tablet, mobile\_small, chrome.laptop\_large, chrome.tablet, chrome.mobile\_small, firefox.laptop\_large, firefox.tablet, firefox.mobile\_small, edge.laptop\_large, edge.tablet, edge.mobile\_small. | `list(string)` |
[
"laptop_large"
]
| no | +| [browser\_synthetic\_enabled](#input\_browser\_synthetic\_enabled) | Flag to enable Browser Synthetic Test. | `bool` | `true` | no | +| [browser\_synthetic\_locations](#input\_browser\_synthetic\_locations) | An array of datadog locations used to run Browser Synthetic Test. | `list(string)` |
[
"aws:us-east-1"
]
| no | +| [browser\_synthetic\_request\_url](#input\_browser\_synthetic\_request\_url) | URL to send Browser Synthetic Test requests to. | `string` | n/a | yes | +| [browser\_synthetic\_steps](#input\_browser\_synthetic\_steps) | Steps for the Browser Synthetic Test to take. |
map(object({
name = string
type = string
params = map(object({
value = "string"
}))
}))
| n/a | yes | +| [browser\_synthetic\_tick\_every](#input\_browser\_synthetic\_tick\_every) | How often Browser Synthetic Test should run in seconds. | `number` | `900` | no | +| [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | +| [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | +| [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | +| [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | +| [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | +| [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [timeout\_h](#input\_timeout\_h) | Auto-resolve alert in specified hours if condition no longer matches | `number` | `0` | no | +| [title\_prefix](#input\_title\_prefix) | Prefix all alerts with specified value in brackets | `string` | `null` | no | +| [title\_suffix](#input\_title\_suffix) | Suffix all alerts with specified value in parenthesis | `string` | `null` | no | +| [warn\_priority](#input\_warn\_priority) | Priority for alerts with no data (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | + +## Outputs + +No outputs. + \ No newline at end of file diff --git a/synthetics/browser/common.tf b/synthetics/browser/common.tf new file mode 120000 index 0000000..47c0063 --- /dev/null +++ b/synthetics/browser/common.tf @@ -0,0 +1 @@ +../../common/common.tf \ No newline at end of file diff --git a/synthetics/browser/main.tf b/synthetics/browser/main.tf new file mode 100644 index 0000000..40370b1 --- /dev/null +++ b/synthetics/browser/main.tf @@ -0,0 +1,44 @@ +locals { + # these must be defined but do not need to be overridden + monitor_alert_default_priority = null + monitor_warn_default_priority = null + monitor_nodata_default_priority = null + + title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}[${var.env}] " + title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" +} + +resource "datadog_synthetics_test" "browser" { + count = var.browser_synthetic_enabled ? 1 : 0 + + name = join("", [local.title_prefix, "Browser Test", local.title_suffix]) + type = "browser" + status = "live" + message = local.synthetic_alert_base_message + device_ids = var.browser_synthetic_device_ids + locations = var.browser_synthetic_locations + tags = concat(local.common_tags, var.base_tags, var.additional_tags) + + request_definition { + method = "GET" + url = var.browser_synthetic_request_url + } + + dynamic "browser_step" { + for_each = var.browser_synthetic_steps + content { + name = browser_step.value["name"] + type = browser_step.value["type"] + dynamic "params" { + for_each = browser_step.value["params"] + content { + value = params.value["value"] + } + } + } + } + + options_list { + tick_every = var.browser_synthetic_tick_every + } +} diff --git a/synthetics/browser/variables.tf b/synthetics/browser/variables.tf new file mode 100644 index 0000000..b84c4cb --- /dev/null +++ b/synthetics/browser/variables.tf @@ -0,0 +1,57 @@ +######################################## +# Global variables +######################################## +variable "additional_tags" { + default = [] + description = "Additional tags (key:value format) to add to this type of check (combined with `local.tags` and `var.base_tags`)" + type = list(string) +} + +variable "base_tags" { + default = ["resource:apigateway"] + description = "Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this)" + type = list(string) +} + +######################################## +# Browser Synthetic Test variables +######################################## +variable "browser_synthetic_enabled" { + description = "Flag to enable Browser Synthetic Test." + type = bool + default = true +} + +variable "browser_synthetic_device_ids" { + description = "List with the different device IDs used to run the test. Valid values are laptop_large, tablet, mobile_small, chrome.laptop_large, chrome.tablet, chrome.mobile_small, firefox.laptop_large, firefox.tablet, firefox.mobile_small, edge.laptop_large, edge.tablet, edge.mobile_small." + type = list(string) + default = ["laptop_large"] +} + +variable "browser_synthetic_locations" { + description = "An array of datadog locations used to run Browser Synthetic Test." + type = list(string) + default = ["aws:us-east-1"] +} + +variable "browser_synthetic_request_url" { + description = "URL to send Browser Synthetic Test requests to." + type = string +} + +variable "browser_synthetic_steps" { + description = "Steps for the Browser Synthetic Test to take." + type = map(object({ + name = string + type = string + params = map(object({ + value = string + })) + })) +} + +variable "browser_synthetic_tick_every" { + description = "How often Browser Synthetic Test should run in seconds." + type = number + default = 900 +} diff --git a/synthetics/browser/versions.tf b/synthetics/browser/versions.tf new file mode 120000 index 0000000..cbeda73 --- /dev/null +++ b/synthetics/browser/versions.tf @@ -0,0 +1 @@ +../../common/versions.tf \ No newline at end of file From bf2f3ef2456b360ce15a89729c641a05db32ed69 Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Tue, 13 Aug 2024 03:00:25 -0600 Subject: [PATCH 27/77] update browser_synthetics_steps variable definition --- synthetics/browser/README.md | 4 ++-- synthetics/browser/variables.tf | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/synthetics/browser/README.md b/synthetics/browser/README.md index 2ba1cbc..fdffd1c 100644 --- a/synthetics/browser/README.md +++ b/synthetics/browser/README.md @@ -15,7 +15,7 @@ Configures Synthetic Test for Browser | Name | Version | |------|---------| -| [datadog](#provider\_datadog) | >= 3.37 | +| [datadog](#provider\_datadog) | 3.42.0 | ## Modules @@ -40,7 +40,7 @@ No modules. | [browser\_synthetic\_enabled](#input\_browser\_synthetic\_enabled) | Flag to enable Browser Synthetic Test. | `bool` | `true` | no | | [browser\_synthetic\_locations](#input\_browser\_synthetic\_locations) | An array of datadog locations used to run Browser Synthetic Test. | `list(string)` |
[
"aws:us-east-1"
]
| no | | [browser\_synthetic\_request\_url](#input\_browser\_synthetic\_request\_url) | URL to send Browser Synthetic Test requests to. | `string` | n/a | yes | -| [browser\_synthetic\_steps](#input\_browser\_synthetic\_steps) | Steps for the Browser Synthetic Test to take. |
map(object({
name = string
type = string
params = map(object({
value = "string"
}))
}))
| n/a | yes | +| [browser\_synthetic\_steps](#input\_browser\_synthetic\_steps) | Steps for the Browser Synthetic Test to take. |
list(object({
name = string
type = string
params = object()
}))
| n/a | yes | | [browser\_synthetic\_tick\_every](#input\_browser\_synthetic\_tick\_every) | How often Browser Synthetic Test should run in seconds. | `number` | `900` | no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | diff --git a/synthetics/browser/variables.tf b/synthetics/browser/variables.tf index b84c4cb..a847d63 100644 --- a/synthetics/browser/variables.tf +++ b/synthetics/browser/variables.tf @@ -41,12 +41,10 @@ variable "browser_synthetic_request_url" { variable "browser_synthetic_steps" { description = "Steps for the Browser Synthetic Test to take." - type = map(object({ - name = string - type = string - params = map(object({ - value = string - })) + type = list(object({ + name = string + type = string + params = object() })) } From 09b55341cb3cbab53110286ae6ee8b0c18f1e9e9 Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Tue, 13 Aug 2024 03:03:42 -0600 Subject: [PATCH 28/77] update browser_synthetics_steps variable definition --- synthetics/browser/variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synthetics/browser/variables.tf b/synthetics/browser/variables.tf index a847d63..aadd0c6 100644 --- a/synthetics/browser/variables.tf +++ b/synthetics/browser/variables.tf @@ -44,7 +44,7 @@ variable "browser_synthetic_steps" { type = list(object({ name = string type = string - params = object() + params = object(map) })) } From 67bcd338cb50bff71416e6937695a85eb06af0ab Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Tue, 13 Aug 2024 03:03:52 -0600 Subject: [PATCH 29/77] update browser_synthetics_steps variable definition --- synthetics/browser/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synthetics/browser/README.md b/synthetics/browser/README.md index fdffd1c..a39d0d5 100644 --- a/synthetics/browser/README.md +++ b/synthetics/browser/README.md @@ -40,7 +40,7 @@ No modules. | [browser\_synthetic\_enabled](#input\_browser\_synthetic\_enabled) | Flag to enable Browser Synthetic Test. | `bool` | `true` | no | | [browser\_synthetic\_locations](#input\_browser\_synthetic\_locations) | An array of datadog locations used to run Browser Synthetic Test. | `list(string)` |
[
"aws:us-east-1"
]
| no | | [browser\_synthetic\_request\_url](#input\_browser\_synthetic\_request\_url) | URL to send Browser Synthetic Test requests to. | `string` | n/a | yes | -| [browser\_synthetic\_steps](#input\_browser\_synthetic\_steps) | Steps for the Browser Synthetic Test to take. |
list(object({
name = string
type = string
params = object()
}))
| n/a | yes | +| [browser\_synthetic\_steps](#input\_browser\_synthetic\_steps) | Steps for the Browser Synthetic Test to take. |
list(object({
name = string
type = string
params = object(map)
}))
| n/a | yes | | [browser\_synthetic\_tick\_every](#input\_browser\_synthetic\_tick\_every) | How often Browser Synthetic Test should run in seconds. | `number` | `900` | no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | From 3decb02405cff1d105a97afc1fe1e45822edbae2 Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Tue, 13 Aug 2024 03:09:36 -0600 Subject: [PATCH 30/77] update browser_synthetics_steps variable definition --- synthetics/browser/README.md | 2 +- synthetics/browser/variables.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/synthetics/browser/README.md b/synthetics/browser/README.md index a39d0d5..bfc2897 100644 --- a/synthetics/browser/README.md +++ b/synthetics/browser/README.md @@ -40,7 +40,7 @@ No modules. | [browser\_synthetic\_enabled](#input\_browser\_synthetic\_enabled) | Flag to enable Browser Synthetic Test. | `bool` | `true` | no | | [browser\_synthetic\_locations](#input\_browser\_synthetic\_locations) | An array of datadog locations used to run Browser Synthetic Test. | `list(string)` |
[
"aws:us-east-1"
]
| no | | [browser\_synthetic\_request\_url](#input\_browser\_synthetic\_request\_url) | URL to send Browser Synthetic Test requests to. | `string` | n/a | yes | -| [browser\_synthetic\_steps](#input\_browser\_synthetic\_steps) | Steps for the Browser Synthetic Test to take. |
list(object({
name = string
type = string
params = object(map)
}))
| n/a | yes | +| [browser\_synthetic\_steps](#input\_browser\_synthetic\_steps) | Steps for the Browser Synthetic Test to take. |
list(object({
name = string
type = string
params = map(any)
}))
| n/a | yes | | [browser\_synthetic\_tick\_every](#input\_browser\_synthetic\_tick\_every) | How often Browser Synthetic Test should run in seconds. | `number` | `900` | no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | diff --git a/synthetics/browser/variables.tf b/synthetics/browser/variables.tf index aadd0c6..931354c 100644 --- a/synthetics/browser/variables.tf +++ b/synthetics/browser/variables.tf @@ -44,7 +44,7 @@ variable "browser_synthetic_steps" { type = list(object({ name = string type = string - params = object(map) + params = map(any) })) } From 232ae6596fcf586f83886bc80a49d27aa3b4c05c Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Tue, 13 Aug 2024 03:43:23 -0600 Subject: [PATCH 31/77] make browser step params more defined --- synthetics/browser/main.tf | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/synthetics/browser/main.tf b/synthetics/browser/main.tf index 40370b1..b33dd0e 100644 --- a/synthetics/browser/main.tf +++ b/synthetics/browser/main.tf @@ -27,13 +27,26 @@ resource "datadog_synthetics_test" "browser" { dynamic "browser_step" { for_each = var.browser_synthetic_steps content { - name = browser_step.value["name"] - type = browser_step.value["type"] - dynamic "params" { - for_each = browser_step.value["params"] - content { - value = params.value["value"] - } + name = browser_step.value.name + type = browser_step.value.type + params { + attribute = lookup(browser_step.value.params, "attribute", null) + check = lookup(browser_step.value.params, "check", null) + click_type = lookup(browser_step.value.params, "click_type", null) + code = lookup(browser_step.value.params, "code", null) + delay = lookup(browser_step.value.params, "delay", null) + element = lookup(browser_step.value.params, "element", null) + email = lookup(browser_step.value.params, "email", null) + file = lookup(browser_step.value.params, "file", null) + files = lookup(browser_step.value.params, "files", null) + modifiers = lookup(browser_step.value.params, "modifiers", null) + playing_tab_id = lookup(browser_step.value.params, "playing_tab_id", null) + request = lookup(browser_step.value.params, "request", null) + subtest_public_id = lookup(browser_step.value.params, "subtest_public_id", null) + value = lookup(browser_step.value.params, "value", null) + with_click = lookup(browser_step.value.params, "with_click", null) + x = lookup(browser_step.value.params, "x", null) + y = lookup(browser_step.value.params, "y", null) } } } From 1d30fd816f248e43fed63cabb1e5971a9f6af26f Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Tue, 13 Aug 2024 03:47:08 -0600 Subject: [PATCH 32/77] make browser step params more defined --- synthetics/browser/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synthetics/browser/main.tf b/synthetics/browser/main.tf index b33dd0e..457ae3b 100644 --- a/synthetics/browser/main.tf +++ b/synthetics/browser/main.tf @@ -39,7 +39,7 @@ resource "datadog_synthetics_test" "browser" { email = lookup(browser_step.value.params, "email", null) file = lookup(browser_step.value.params, "file", null) files = lookup(browser_step.value.params, "files", null) - modifiers = lookup(browser_step.value.params, "modifiers", null) + modifiers = lookup(browser_step.value.params, "modifiers", [null]) playing_tab_id = lookup(browser_step.value.params, "playing_tab_id", null) request = lookup(browser_step.value.params, "request", null) subtest_public_id = lookup(browser_step.value.params, "subtest_public_id", null) From de783d22387d9d3f9c4a806ed3a235ee64a2f287 Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Tue, 13 Aug 2024 03:48:32 -0600 Subject: [PATCH 33/77] make browser step params more defined --- synthetics/browser/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synthetics/browser/main.tf b/synthetics/browser/main.tf index 457ae3b..83366a8 100644 --- a/synthetics/browser/main.tf +++ b/synthetics/browser/main.tf @@ -39,7 +39,7 @@ resource "datadog_synthetics_test" "browser" { email = lookup(browser_step.value.params, "email", null) file = lookup(browser_step.value.params, "file", null) files = lookup(browser_step.value.params, "files", null) - modifiers = lookup(browser_step.value.params, "modifiers", [null]) + modifiers = lookup(browser_step.value.params, "modifiers", [""]) playing_tab_id = lookup(browser_step.value.params, "playing_tab_id", null) request = lookup(browser_step.value.params, "request", null) subtest_public_id = lookup(browser_step.value.params, "subtest_public_id", null) From cc67b2e5dcab3177102f12e5b25830aeae840e3a Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Tue, 13 Aug 2024 03:50:37 -0600 Subject: [PATCH 34/77] fix syntax error --- synthetics/browser/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synthetics/browser/main.tf b/synthetics/browser/main.tf index 83366a8..cc0204f 100644 --- a/synthetics/browser/main.tf +++ b/synthetics/browser/main.tf @@ -39,7 +39,7 @@ resource "datadog_synthetics_test" "browser" { email = lookup(browser_step.value.params, "email", null) file = lookup(browser_step.value.params, "file", null) files = lookup(browser_step.value.params, "files", null) - modifiers = lookup(browser_step.value.params, "modifiers", [""]) + modifiers = lookup(browser_step.value.params, "modifiers", []) playing_tab_id = lookup(browser_step.value.params, "playing_tab_id", null) request = lookup(browser_step.value.params, "request", null) subtest_public_id = lookup(browser_step.value.params, "subtest_public_id", null) From d4ef36063e008df5aa27bc1f82312dc861f8341b Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Tue, 13 Aug 2024 03:58:14 -0600 Subject: [PATCH 35/77] make browser step params more defined --- synthetics/browser/main.tf | 2 +- synthetics/browser/variables.tf | 24 +++++++++++++++++++++--- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/synthetics/browser/main.tf b/synthetics/browser/main.tf index cc0204f..b33dd0e 100644 --- a/synthetics/browser/main.tf +++ b/synthetics/browser/main.tf @@ -39,7 +39,7 @@ resource "datadog_synthetics_test" "browser" { email = lookup(browser_step.value.params, "email", null) file = lookup(browser_step.value.params, "file", null) files = lookup(browser_step.value.params, "files", null) - modifiers = lookup(browser_step.value.params, "modifiers", []) + modifiers = lookup(browser_step.value.params, "modifiers", null) playing_tab_id = lookup(browser_step.value.params, "playing_tab_id", null) request = lookup(browser_step.value.params, "request", null) subtest_public_id = lookup(browser_step.value.params, "subtest_public_id", null) diff --git a/synthetics/browser/variables.tf b/synthetics/browser/variables.tf index 931354c..3b822b2 100644 --- a/synthetics/browser/variables.tf +++ b/synthetics/browser/variables.tf @@ -42,9 +42,27 @@ variable "browser_synthetic_request_url" { variable "browser_synthetic_steps" { description = "Steps for the Browser Synthetic Test to take." type = list(object({ - name = string - type = string - params = map(any) + name = string + type = string + params = map(object({ + attribute = string + check = string + click_type = string + code = string + delay = number + element = string + email = string + file = string + files = string + modifiers = list(string) + playing_tab_id = string + request = string + subtest_public_id = string + value = string + with_click = bool + x = number + y = number + })) })) } From 53044d9fa1d1861fad670cbfaca999b27cb2c7d9 Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Tue, 13 Aug 2024 04:05:41 -0600 Subject: [PATCH 36/77] fix variable syntax --- synthetics/browser/README.md | 2 +- synthetics/browser/variables.tf | 38 ++++++++++++++++----------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/synthetics/browser/README.md b/synthetics/browser/README.md index bfc2897..585f20d 100644 --- a/synthetics/browser/README.md +++ b/synthetics/browser/README.md @@ -40,7 +40,7 @@ No modules. | [browser\_synthetic\_enabled](#input\_browser\_synthetic\_enabled) | Flag to enable Browser Synthetic Test. | `bool` | `true` | no | | [browser\_synthetic\_locations](#input\_browser\_synthetic\_locations) | An array of datadog locations used to run Browser Synthetic Test. | `list(string)` |
[
"aws:us-east-1"
]
| no | | [browser\_synthetic\_request\_url](#input\_browser\_synthetic\_request\_url) | URL to send Browser Synthetic Test requests to. | `string` | n/a | yes | -| [browser\_synthetic\_steps](#input\_browser\_synthetic\_steps) | Steps for the Browser Synthetic Test to take. |
list(object({
name = string
type = string
params = map(any)
}))
| n/a | yes | +| [browser\_synthetic\_steps](#input\_browser\_synthetic\_steps) | Steps for the Browser Synthetic Test to take. |
list(object({
name = string
type = string
params = object({
attribute = optional(string)
check = optional(string)
click_type = optional(string)
code = optional(string)
delay = optional(number)
element = optional(string)
email = optional(string)
file = optional(string)
files = optional(string)
modifiers = optional(list(string))
playing_tab_id = optional(string)
request = optional(string)
subtest_public_id = optional(string)
value = optional(string)
with_click = optional(bool)
x = optional(number)
y = optional(number)
})
}))
| n/a | yes | | [browser\_synthetic\_tick\_every](#input\_browser\_synthetic\_tick\_every) | How often Browser Synthetic Test should run in seconds. | `number` | `900` | no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | diff --git a/synthetics/browser/variables.tf b/synthetics/browser/variables.tf index 3b822b2..36fbcf7 100644 --- a/synthetics/browser/variables.tf +++ b/synthetics/browser/variables.tf @@ -44,25 +44,25 @@ variable "browser_synthetic_steps" { type = list(object({ name = string type = string - params = map(object({ - attribute = string - check = string - click_type = string - code = string - delay = number - element = string - email = string - file = string - files = string - modifiers = list(string) - playing_tab_id = string - request = string - subtest_public_id = string - value = string - with_click = bool - x = number - y = number - })) + params = object({ + attribute = optional(string) + check = optional(string) + click_type = optional(string) + code = optional(string) + delay = optional(number) + element = optional(string) + email = optional(string) + file = optional(string) + files = optional(string) + modifiers = optional(list(string)) + playing_tab_id = optional(string) + request = optional(string) + subtest_public_id = optional(string) + value = optional(string) + with_click = optional(bool) + x = optional(number) + y = optional(number) + }) })) } From c34e62a6cfd7e05c5aa79f8341b78e502cfc46b9 Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Wed, 21 Aug 2024 12:31:12 -0600 Subject: [PATCH 37/77] ensure browser step supports all parameters --- synthetics/browser/README.md | 4 ++-- synthetics/browser/main.tf | 35 +++++++++++++++++++++++--------- synthetics/browser/variables.tf | 36 +++++++++++++++++---------------- 3 files changed, 47 insertions(+), 28 deletions(-) diff --git a/synthetics/browser/README.md b/synthetics/browser/README.md index 585f20d..4cffcd0 100644 --- a/synthetics/browser/README.md +++ b/synthetics/browser/README.md @@ -40,7 +40,7 @@ No modules. | [browser\_synthetic\_enabled](#input\_browser\_synthetic\_enabled) | Flag to enable Browser Synthetic Test. | `bool` | `true` | no | | [browser\_synthetic\_locations](#input\_browser\_synthetic\_locations) | An array of datadog locations used to run Browser Synthetic Test. | `list(string)` |
[
"aws:us-east-1"
]
| no | | [browser\_synthetic\_request\_url](#input\_browser\_synthetic\_request\_url) | URL to send Browser Synthetic Test requests to. | `string` | n/a | yes | -| [browser\_synthetic\_steps](#input\_browser\_synthetic\_steps) | Steps for the Browser Synthetic Test to take. |
list(object({
name = string
type = string
params = object({
attribute = optional(string)
check = optional(string)
click_type = optional(string)
code = optional(string)
delay = optional(number)
element = optional(string)
email = optional(string)
file = optional(string)
files = optional(string)
modifiers = optional(list(string))
playing_tab_id = optional(string)
request = optional(string)
subtest_public_id = optional(string)
value = optional(string)
with_click = optional(bool)
x = optional(number)
y = optional(number)
})
}))
| n/a | yes | +| [browser\_synthetic\_steps](#input\_browser\_synthetic\_steps) | Steps for the Browser Synthetic Test to take. |
list(object({
name = string
type = string
params = object({
attribute = optional(string)
check = optional(string)
click_type = optional(string)
code = optional(string)
delay = optional(number)
element = optional(string)
element_user_locator = optional(map(string))
email = optional(string)
file = optional(string)
files = optional(string)
modifiers = optional(list(string))
playing_tab_id = optional(string)
request = optional(string)
subtest_public_id = optional(string)
value = optional(string)
variable = optional(map(string))
with_click = optional(bool)
x = optional(number)
y = optional(number)
})
}))
| n/a | yes | | [browser\_synthetic\_tick\_every](#input\_browser\_synthetic\_tick\_every) | How often Browser Synthetic Test should run in seconds. | `number` | `900` | no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | @@ -67,4 +67,4 @@ No modules. ## Outputs No outputs. - \ No newline at end of file + diff --git a/synthetics/browser/main.tf b/synthetics/browser/main.tf index b33dd0e..1c7a468 100644 --- a/synthetics/browser/main.tf +++ b/synthetics/browser/main.tf @@ -30,12 +30,22 @@ resource "datadog_synthetics_test" "browser" { name = browser_step.value.name type = browser_step.value.type params { - attribute = lookup(browser_step.value.params, "attribute", null) - check = lookup(browser_step.value.params, "check", null) - click_type = lookup(browser_step.value.params, "click_type", null) - code = lookup(browser_step.value.params, "code", null) - delay = lookup(browser_step.value.params, "delay", null) - element = lookup(browser_step.value.params, "element", null) + attribute = lookup(browser_step.value.params, "attribute", null) + check = lookup(browser_step.value.params, "check", null) + click_type = lookup(browser_step.value.params, "click_type", null) + code = lookup(browser_step.value.params, "code", null) + delay = lookup(browser_step.value.params, "delay", null) + element = lookup(browser_step.value.params, "element", null) + dynamic "element_user_locator" { + for_each = lookup(browser_step.value.params, "element_user_locator", null) + content { + value { + value = lookup(element_user_locator.value, "value", null) + type = lookup(element_user_locator.value, "type", null) + } + fail_test_on_cannot_locate = lookup(element_user_locator.value, "fail_test_on_cannot_locate", null) + } + } email = lookup(browser_step.value.params, "email", null) file = lookup(browser_step.value.params, "file", null) files = lookup(browser_step.value.params, "files", null) @@ -44,9 +54,16 @@ resource "datadog_synthetics_test" "browser" { request = lookup(browser_step.value.params, "request", null) subtest_public_id = lookup(browser_step.value.params, "subtest_public_id", null) value = lookup(browser_step.value.params, "value", null) - with_click = lookup(browser_step.value.params, "with_click", null) - x = lookup(browser_step.value.params, "x", null) - y = lookup(browser_step.value.params, "y", null) + dynamic "variable" { + for_each = lookup(browser_step.value.params, "variable", null) + content { + example = lookup(variable.value, "example", null) + name = lookup(variable.value, "name", null) + } + } + with_click = lookup(browser_step.value.params, "with_click", null) + x = lookup(browser_step.value.params, "x", null) + y = lookup(browser_step.value.params, "y", null) } } } diff --git a/synthetics/browser/variables.tf b/synthetics/browser/variables.tf index 36fbcf7..09263a6 100644 --- a/synthetics/browser/variables.tf +++ b/synthetics/browser/variables.tf @@ -45,23 +45,25 @@ variable "browser_synthetic_steps" { name = string type = string params = object({ - attribute = optional(string) - check = optional(string) - click_type = optional(string) - code = optional(string) - delay = optional(number) - element = optional(string) - email = optional(string) - file = optional(string) - files = optional(string) - modifiers = optional(list(string)) - playing_tab_id = optional(string) - request = optional(string) - subtest_public_id = optional(string) - value = optional(string) - with_click = optional(bool) - x = optional(number) - y = optional(number) + attribute = optional(string) + check = optional(string) + click_type = optional(string) + code = optional(string) + delay = optional(number) + element = optional(string) + element_user_locator = optional(map(string)) + email = optional(string) + file = optional(string) + files = optional(string) + modifiers = optional(list(string)) + playing_tab_id = optional(string) + request = optional(string) + subtest_public_id = optional(string) + value = optional(string) + variable = optional(map(string)) + with_click = optional(bool) + x = optional(number) + y = optional(number) }) })) } From 014cdd59c31fb568fad0dcb7b19f0019e4b5465f Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Wed, 21 Aug 2024 12:49:17 -0600 Subject: [PATCH 38/77] fix syntax issue --- synthetics/browser/main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synthetics/browser/main.tf b/synthetics/browser/main.tf index 1c7a468..c79fff2 100644 --- a/synthetics/browser/main.tf +++ b/synthetics/browser/main.tf @@ -37,7 +37,7 @@ resource "datadog_synthetics_test" "browser" { delay = lookup(browser_step.value.params, "delay", null) element = lookup(browser_step.value.params, "element", null) dynamic "element_user_locator" { - for_each = lookup(browser_step.value.params, "element_user_locator", null) + for_each = lookup(browser_step.value.params, "element_user_locator", {}) content { value { value = lookup(element_user_locator.value, "value", null) @@ -55,7 +55,7 @@ resource "datadog_synthetics_test" "browser" { subtest_public_id = lookup(browser_step.value.params, "subtest_public_id", null) value = lookup(browser_step.value.params, "value", null) dynamic "variable" { - for_each = lookup(browser_step.value.params, "variable", null) + for_each = lookup(browser_step.value.params, "variable", {}) content { example = lookup(variable.value, "example", null) name = lookup(variable.value, "name", null) From ebdceef1f6fe5d86ffc144636cc83ced1850a2a3 Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Wed, 21 Aug 2024 12:51:29 -0600 Subject: [PATCH 39/77] fix syntax issue --- synthetics/browser/main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synthetics/browser/main.tf b/synthetics/browser/main.tf index c79fff2..6fb06e3 100644 --- a/synthetics/browser/main.tf +++ b/synthetics/browser/main.tf @@ -37,7 +37,7 @@ resource "datadog_synthetics_test" "browser" { delay = lookup(browser_step.value.params, "delay", null) element = lookup(browser_step.value.params, "element", null) dynamic "element_user_locator" { - for_each = lookup(browser_step.value.params, "element_user_locator", {}) + for_each = lookup(browser_step.value.params, "element_user_locator", []) content { value { value = lookup(element_user_locator.value, "value", null) @@ -55,7 +55,7 @@ resource "datadog_synthetics_test" "browser" { subtest_public_id = lookup(browser_step.value.params, "subtest_public_id", null) value = lookup(browser_step.value.params, "value", null) dynamic "variable" { - for_each = lookup(browser_step.value.params, "variable", {}) + for_each = lookup(browser_step.value.params, "variable", []) content { example = lookup(variable.value, "example", null) name = lookup(variable.value, "name", null) From 603e796b783138bf6a62454437c1a3fa7c03ee90 Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Wed, 21 Aug 2024 12:59:13 -0600 Subject: [PATCH 40/77] fix syntax issue --- synthetics/browser/main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synthetics/browser/main.tf b/synthetics/browser/main.tf index 6fb06e3..11a1885 100644 --- a/synthetics/browser/main.tf +++ b/synthetics/browser/main.tf @@ -37,7 +37,7 @@ resource "datadog_synthetics_test" "browser" { delay = lookup(browser_step.value.params, "delay", null) element = lookup(browser_step.value.params, "element", null) dynamic "element_user_locator" { - for_each = lookup(browser_step.value.params, "element_user_locator", []) + for_each = browser_step.value.params.element_user_locator != null ? browser_step.value.params.element_user_locator : [] content { value { value = lookup(element_user_locator.value, "value", null) @@ -55,7 +55,7 @@ resource "datadog_synthetics_test" "browser" { subtest_public_id = lookup(browser_step.value.params, "subtest_public_id", null) value = lookup(browser_step.value.params, "value", null) dynamic "variable" { - for_each = lookup(browser_step.value.params, "variable", []) + for_each = browser_step.value.params.variable != null ? browser_step.value.params.variable : [] content { example = lookup(variable.value, "example", null) name = lookup(variable.value, "name", null) From ded9b2edc44e02569cca2967bbfe182ee5d75907 Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Wed, 21 Aug 2024 13:00:45 -0600 Subject: [PATCH 41/77] fix syntax issue --- synthetics/browser/main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synthetics/browser/main.tf b/synthetics/browser/main.tf index 11a1885..dc54e85 100644 --- a/synthetics/browser/main.tf +++ b/synthetics/browser/main.tf @@ -37,7 +37,7 @@ resource "datadog_synthetics_test" "browser" { delay = lookup(browser_step.value.params, "delay", null) element = lookup(browser_step.value.params, "element", null) dynamic "element_user_locator" { - for_each = browser_step.value.params.element_user_locator != null ? browser_step.value.params.element_user_locator : [] + for_each = browser_step.value.params.element_user_locator != null ? browser_step.value.params.element_user_locator : {} content { value { value = lookup(element_user_locator.value, "value", null) @@ -55,7 +55,7 @@ resource "datadog_synthetics_test" "browser" { subtest_public_id = lookup(browser_step.value.params, "subtest_public_id", null) value = lookup(browser_step.value.params, "value", null) dynamic "variable" { - for_each = browser_step.value.params.variable != null ? browser_step.value.params.variable : [] + for_each = browser_step.value.params.variable != null ? browser_step.value.params.variable : {} content { example = lookup(variable.value, "example", null) name = lookup(variable.value, "name", null) From b41737c35e7a0177ad9c8b06f7965e016a47dc5d Mon Sep 17 00:00:00 2001 From: David Goodell Date: Tue, 10 Sep 2024 09:12:05 -0400 Subject: [PATCH 42/77] Fix specified resource for EC2 checks --- aws/alb/.terraform.lock.hcl | 2 ++ aws/apigateway/.terraform.lock.hcl | 2 ++ aws/beanstalk/.terraform.lock.hcl | 2 ++ aws/ec2/.terraform.lock.hcl | 2 ++ aws/ecs-cluster/.terraform.lock.hcl | 2 ++ aws/ecs-fargate/.terraform.lock.hcl | 2 ++ aws/ecs-service/.terraform.lock.hcl | 2 ++ aws/elasticache/.terraform.lock.hcl | 2 ++ aws/elasticsearch/.terraform.lock.hcl | 2 ++ aws/elb/.terraform.lock.hcl | 2 ++ aws/lambda/.terraform.lock.hcl | 2 ++ aws/rds/.terraform.lock.hcl | 2 ++ aws/sqs/.terraform.lock.hcl | 44 ++++++++++++++++++++++++++ aws/vpn/.terraform.lock.hcl | 44 ++++++++++++++++++++++++++ host/agent/.terraform.lock.hcl | 2 ++ host/agent/variables.tf | 2 +- host/clock/.terraform.lock.hcl | 2 ++ host/clock/variables.tf | 2 +- host/cpu/.terraform.lock.hcl | 2 ++ host/cpu/variables.tf | 2 +- host/disk/.terraform.lock.hcl | 2 ++ host/disk/variables.tf | 2 +- host/memory/.terraform.lock.hcl | 2 ++ host/memory/variables.tf | 2 +- host/process/.terraform.lock.hcl | 2 ++ host/process/variables.tf | 2 +- host/swap/.terraform.lock.hcl | 2 ++ host/swap/variables.tf | 2 +- synthetics/browser/.terraform.lock.hcl | 2 ++ synthetics/browser/variables.tf | 2 +- synthetics/ssl/.terraform.lock.hcl | 2 ++ synthetics/ssl/variables.tf | 2 +- 32 files changed, 139 insertions(+), 9 deletions(-) create mode 100644 aws/sqs/.terraform.lock.hcl create mode 100644 aws/vpn/.terraform.lock.hcl diff --git a/aws/alb/.terraform.lock.hcl b/aws/alb/.terraform.lock.hcl index d53197d..73aa0ff 100644 --- a/aws/alb/.terraform.lock.hcl +++ b/aws/alb/.terraform.lock.hcl @@ -6,6 +6,7 @@ provider "registry.terraform.io/datadog/datadog" { constraints = ">= 3.37.0" hashes = [ "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", + "h1:yAUN0kckUMwxTwy/uD5co/bQ5oAJyGzo3UWLDcH26Yc=", "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", @@ -28,6 +29,7 @@ provider "registry.terraform.io/hashicorp/null" { constraints = ">= 3.1.0" hashes = [ "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", diff --git a/aws/apigateway/.terraform.lock.hcl b/aws/apigateway/.terraform.lock.hcl index d53197d..73aa0ff 100644 --- a/aws/apigateway/.terraform.lock.hcl +++ b/aws/apigateway/.terraform.lock.hcl @@ -6,6 +6,7 @@ provider "registry.terraform.io/datadog/datadog" { constraints = ">= 3.37.0" hashes = [ "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", + "h1:yAUN0kckUMwxTwy/uD5co/bQ5oAJyGzo3UWLDcH26Yc=", "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", @@ -28,6 +29,7 @@ provider "registry.terraform.io/hashicorp/null" { constraints = ">= 3.1.0" hashes = [ "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", diff --git a/aws/beanstalk/.terraform.lock.hcl b/aws/beanstalk/.terraform.lock.hcl index d53197d..73aa0ff 100644 --- a/aws/beanstalk/.terraform.lock.hcl +++ b/aws/beanstalk/.terraform.lock.hcl @@ -6,6 +6,7 @@ provider "registry.terraform.io/datadog/datadog" { constraints = ">= 3.37.0" hashes = [ "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", + "h1:yAUN0kckUMwxTwy/uD5co/bQ5oAJyGzo3UWLDcH26Yc=", "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", @@ -28,6 +29,7 @@ provider "registry.terraform.io/hashicorp/null" { constraints = ">= 3.1.0" hashes = [ "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", diff --git a/aws/ec2/.terraform.lock.hcl b/aws/ec2/.terraform.lock.hcl index d53197d..73aa0ff 100644 --- a/aws/ec2/.terraform.lock.hcl +++ b/aws/ec2/.terraform.lock.hcl @@ -6,6 +6,7 @@ provider "registry.terraform.io/datadog/datadog" { constraints = ">= 3.37.0" hashes = [ "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", + "h1:yAUN0kckUMwxTwy/uD5co/bQ5oAJyGzo3UWLDcH26Yc=", "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", @@ -28,6 +29,7 @@ provider "registry.terraform.io/hashicorp/null" { constraints = ">= 3.1.0" hashes = [ "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", diff --git a/aws/ecs-cluster/.terraform.lock.hcl b/aws/ecs-cluster/.terraform.lock.hcl index d53197d..73aa0ff 100644 --- a/aws/ecs-cluster/.terraform.lock.hcl +++ b/aws/ecs-cluster/.terraform.lock.hcl @@ -6,6 +6,7 @@ provider "registry.terraform.io/datadog/datadog" { constraints = ">= 3.37.0" hashes = [ "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", + "h1:yAUN0kckUMwxTwy/uD5co/bQ5oAJyGzo3UWLDcH26Yc=", "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", @@ -28,6 +29,7 @@ provider "registry.terraform.io/hashicorp/null" { constraints = ">= 3.1.0" hashes = [ "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", diff --git a/aws/ecs-fargate/.terraform.lock.hcl b/aws/ecs-fargate/.terraform.lock.hcl index d53197d..73aa0ff 100644 --- a/aws/ecs-fargate/.terraform.lock.hcl +++ b/aws/ecs-fargate/.terraform.lock.hcl @@ -6,6 +6,7 @@ provider "registry.terraform.io/datadog/datadog" { constraints = ">= 3.37.0" hashes = [ "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", + "h1:yAUN0kckUMwxTwy/uD5co/bQ5oAJyGzo3UWLDcH26Yc=", "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", @@ -28,6 +29,7 @@ provider "registry.terraform.io/hashicorp/null" { constraints = ">= 3.1.0" hashes = [ "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", diff --git a/aws/ecs-service/.terraform.lock.hcl b/aws/ecs-service/.terraform.lock.hcl index d53197d..73aa0ff 100644 --- a/aws/ecs-service/.terraform.lock.hcl +++ b/aws/ecs-service/.terraform.lock.hcl @@ -6,6 +6,7 @@ provider "registry.terraform.io/datadog/datadog" { constraints = ">= 3.37.0" hashes = [ "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", + "h1:yAUN0kckUMwxTwy/uD5co/bQ5oAJyGzo3UWLDcH26Yc=", "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", @@ -28,6 +29,7 @@ provider "registry.terraform.io/hashicorp/null" { constraints = ">= 3.1.0" hashes = [ "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", diff --git a/aws/elasticache/.terraform.lock.hcl b/aws/elasticache/.terraform.lock.hcl index d53197d..73aa0ff 100644 --- a/aws/elasticache/.terraform.lock.hcl +++ b/aws/elasticache/.terraform.lock.hcl @@ -6,6 +6,7 @@ provider "registry.terraform.io/datadog/datadog" { constraints = ">= 3.37.0" hashes = [ "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", + "h1:yAUN0kckUMwxTwy/uD5co/bQ5oAJyGzo3UWLDcH26Yc=", "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", @@ -28,6 +29,7 @@ provider "registry.terraform.io/hashicorp/null" { constraints = ">= 3.1.0" hashes = [ "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", diff --git a/aws/elasticsearch/.terraform.lock.hcl b/aws/elasticsearch/.terraform.lock.hcl index d53197d..73aa0ff 100644 --- a/aws/elasticsearch/.terraform.lock.hcl +++ b/aws/elasticsearch/.terraform.lock.hcl @@ -6,6 +6,7 @@ provider "registry.terraform.io/datadog/datadog" { constraints = ">= 3.37.0" hashes = [ "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", + "h1:yAUN0kckUMwxTwy/uD5co/bQ5oAJyGzo3UWLDcH26Yc=", "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", @@ -28,6 +29,7 @@ provider "registry.terraform.io/hashicorp/null" { constraints = ">= 3.1.0" hashes = [ "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", diff --git a/aws/elb/.terraform.lock.hcl b/aws/elb/.terraform.lock.hcl index d53197d..73aa0ff 100644 --- a/aws/elb/.terraform.lock.hcl +++ b/aws/elb/.terraform.lock.hcl @@ -6,6 +6,7 @@ provider "registry.terraform.io/datadog/datadog" { constraints = ">= 3.37.0" hashes = [ "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", + "h1:yAUN0kckUMwxTwy/uD5co/bQ5oAJyGzo3UWLDcH26Yc=", "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", @@ -28,6 +29,7 @@ provider "registry.terraform.io/hashicorp/null" { constraints = ">= 3.1.0" hashes = [ "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", diff --git a/aws/lambda/.terraform.lock.hcl b/aws/lambda/.terraform.lock.hcl index d53197d..73aa0ff 100644 --- a/aws/lambda/.terraform.lock.hcl +++ b/aws/lambda/.terraform.lock.hcl @@ -6,6 +6,7 @@ provider "registry.terraform.io/datadog/datadog" { constraints = ">= 3.37.0" hashes = [ "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", + "h1:yAUN0kckUMwxTwy/uD5co/bQ5oAJyGzo3UWLDcH26Yc=", "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", @@ -28,6 +29,7 @@ provider "registry.terraform.io/hashicorp/null" { constraints = ">= 3.1.0" hashes = [ "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", diff --git a/aws/rds/.terraform.lock.hcl b/aws/rds/.terraform.lock.hcl index d53197d..73aa0ff 100644 --- a/aws/rds/.terraform.lock.hcl +++ b/aws/rds/.terraform.lock.hcl @@ -6,6 +6,7 @@ provider "registry.terraform.io/datadog/datadog" { constraints = ">= 3.37.0" hashes = [ "h1:D5lzAUqnEF3458Fu5wxNc4KaCy46CgcPIHM+b1e71YU=", + "h1:yAUN0kckUMwxTwy/uD5co/bQ5oAJyGzo3UWLDcH26Yc=", "zh:0bf149256e2166d77a7cea60adcf1486bf18c65120caccba3f9caf643a0937a7", "zh:246c40bbb198f918a7380c059ac2e9110832215e0e00c06fdd8a5c34fb01f797", "zh:3ff8667f41e9f787de6dae59c3ee447177c062613787368e7f8ae0b1efdbe25f", @@ -28,6 +29,7 @@ provider "registry.terraform.io/hashicorp/null" { constraints = ">= 3.1.0" hashes = [ "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", diff --git a/aws/sqs/.terraform.lock.hcl b/aws/sqs/.terraform.lock.hcl new file mode 100644 index 0000000..5fa8913 --- /dev/null +++ b/aws/sqs/.terraform.lock.hcl @@ -0,0 +1,44 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/datadog/datadog" { + version = "3.44.0" + constraints = ">= 3.37.0" + hashes = [ + "h1:neJ/si/8CotiW8ulfjU6dFmb1bpzbTjhfHLTlCvdynw=", + "zh:12119fe0cafbe7e05c32d4101a804d479ae756e19512c789c67cb3c51420ac98", + "zh:35267ecc27de00e449893df9a37481f38b8fe24d14fe94198cd68966f1aa586f", + "zh:48833bcdc7bc603dc42ca0a1dcc791656f0fa4193f55331111451b1bcb108378", + "zh:60413aa44c018c7d62970cc92bedd25575a17ddacf0691a9f3d593ca7fdbd4ec", + "zh:6a2427008a79ae199e3541183ddf6f79b4be8726e2acc75392067403b20ce4f1", + "zh:8b92685e2d7738bd5b33b4bddc2ff09a8af7a3d45bd2ce8e9f35470daa878963", + "zh:9467b99af78e1e17f2c9218d62dddb476c662c06aafa4b0af7de76d3738b77aa", + "zh:c398de81437c9930790df6989fec00aa02db58870dda514fd3b8045ca93609a1", + "zh:c62269f7e957305efe29f32de4fd05bf662dcb58da94254a0d2c04c26e669ee6", + "zh:cd0bb443c0961d3597efab0ba71d196afe87a896e17b4975535672aa3fe44745", + "zh:cdf39c4bb6a6dce38cf36f36ac9462946fe3356999600cb33a942c45ea398b58", + "zh:daea192a8bd937f16d2eaf8003cb3cff162e4be8a29202a06e6db5fd43e59f87", + "zh:e74ccc5dc85021d47801dbcdee52d77e7604551420a1b9697ec933fe936aaaed", + "zh:fab13e1c3312a94e657ae39d6e6dcf0c37277ac64b014b94e398793b525c5443", + ] +} + +provider "registry.terraform.io/hashicorp/null" { + version = "3.2.2" + constraints = ">= 3.1.0" + hashes = [ + "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", + "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", + "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", + "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", + "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", + "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", + "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", + "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", + "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", + "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", + "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", + ] +} diff --git a/aws/vpn/.terraform.lock.hcl b/aws/vpn/.terraform.lock.hcl new file mode 100644 index 0000000..5fa8913 --- /dev/null +++ b/aws/vpn/.terraform.lock.hcl @@ -0,0 +1,44 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/datadog/datadog" { + version = "3.44.0" + constraints = ">= 3.37.0" + hashes = [ + "h1:neJ/si/8CotiW8ulfjU6dFmb1bpzbTjhfHLTlCvdynw=", + "zh:12119fe0cafbe7e05c32d4101a804d479ae756e19512c789c67cb3c51420ac98", + "zh:35267ecc27de00e449893df9a37481f38b8fe24d14fe94198cd68966f1aa586f", + "zh:48833bcdc7bc603dc42ca0a1dcc791656f0fa4193f55331111451b1bcb108378", + "zh:60413aa44c018c7d62970cc92bedd25575a17ddacf0691a9f3d593ca7fdbd4ec", + "zh:6a2427008a79ae199e3541183ddf6f79b4be8726e2acc75392067403b20ce4f1", + "zh:8b92685e2d7738bd5b33b4bddc2ff09a8af7a3d45bd2ce8e9f35470daa878963", + "zh:9467b99af78e1e17f2c9218d62dddb476c662c06aafa4b0af7de76d3738b77aa", + "zh:c398de81437c9930790df6989fec00aa02db58870dda514fd3b8045ca93609a1", + "zh:c62269f7e957305efe29f32de4fd05bf662dcb58da94254a0d2c04c26e669ee6", + "zh:cd0bb443c0961d3597efab0ba71d196afe87a896e17b4975535672aa3fe44745", + "zh:cdf39c4bb6a6dce38cf36f36ac9462946fe3356999600cb33a942c45ea398b58", + "zh:daea192a8bd937f16d2eaf8003cb3cff162e4be8a29202a06e6db5fd43e59f87", + "zh:e74ccc5dc85021d47801dbcdee52d77e7604551420a1b9697ec933fe936aaaed", + "zh:fab13e1c3312a94e657ae39d6e6dcf0c37277ac64b014b94e398793b525c5443", + ] +} + +provider "registry.terraform.io/hashicorp/null" { + version = "3.2.2" + constraints = ">= 3.1.0" + hashes = [ + "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", + "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", + "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", + "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", + "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", + "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", + "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", + "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", + "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", + "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", + "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", + ] +} diff --git a/host/agent/.terraform.lock.hcl b/host/agent/.terraform.lock.hcl index 0791549..e29eb96 100644 --- a/host/agent/.terraform.lock.hcl +++ b/host/agent/.terraform.lock.hcl @@ -6,6 +6,7 @@ provider "registry.terraform.io/datadog/datadog" { constraints = ">= 3.37.0" hashes = [ "h1:6rSVMI3RBWRHA70wH8eIGyzH1IZHu1hwdixT+UbD9S0=", + "h1:i2teIBkWHesijmdA9Hny73TQXzIpGo3400Iqz1+aBn4=", "zh:3389298e5116232edd1c6e64c7a83f696d5663f1a1c7da5bb32be3472faa4a9e", "zh:39b5d91e58372716d9c7d4869e8391612d3799a936f7c94cc9b3efbe08f4a6d9", "zh:4a077105269fd187fc751a390d3e894092a2dd1b44e7e76ff9923968d971dc6a", @@ -28,6 +29,7 @@ provider "registry.terraform.io/hashicorp/null" { constraints = ">= 3.1.0" hashes = [ "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", diff --git a/host/agent/variables.tf b/host/agent/variables.tf index 96a37f1..a5c350b 100644 --- a/host/agent/variables.tf +++ b/host/agent/variables.tf @@ -8,7 +8,7 @@ variable "additional_tags" { } variable "base_tags" { - default = ["resource:apigateway"] + default = ["resource:ec2"] description = "Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this)" type = list(string) } diff --git a/host/clock/.terraform.lock.hcl b/host/clock/.terraform.lock.hcl index f254011..8399561 100644 --- a/host/clock/.terraform.lock.hcl +++ b/host/clock/.terraform.lock.hcl @@ -5,6 +5,7 @@ provider "registry.terraform.io/datadog/datadog" { version = "3.41.0" constraints = ">= 3.37.0" hashes = [ + "h1:o94twRXuelLuN0yCr6l3MawP5irtwgmNWB5tLJHaE/s=", "h1:pirD2aruoZmIWnGHiX8ygPrpDfvqxpcpQsXT72xQbRM=", "zh:22fea67ac137965232efb5b47ee3297d580f6e121f8c38d66e8988b8c572e495", "zh:5a59f205a92b4a99699129db9e19b7bf9d25a40cd6c85f1dbcccee061451072a", @@ -28,6 +29,7 @@ provider "registry.terraform.io/hashicorp/null" { constraints = ">= 3.1.0" hashes = [ "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", diff --git a/host/clock/variables.tf b/host/clock/variables.tf index 9444920..9ced19e 100644 --- a/host/clock/variables.tf +++ b/host/clock/variables.tf @@ -8,7 +8,7 @@ variable "additional_tags" { } variable "base_tags" { - default = ["resource:apigateway"] + default = ["resource:ec2"] description = "Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this)" type = list(string) } diff --git a/host/cpu/.terraform.lock.hcl b/host/cpu/.terraform.lock.hcl index 0791549..e29eb96 100644 --- a/host/cpu/.terraform.lock.hcl +++ b/host/cpu/.terraform.lock.hcl @@ -6,6 +6,7 @@ provider "registry.terraform.io/datadog/datadog" { constraints = ">= 3.37.0" hashes = [ "h1:6rSVMI3RBWRHA70wH8eIGyzH1IZHu1hwdixT+UbD9S0=", + "h1:i2teIBkWHesijmdA9Hny73TQXzIpGo3400Iqz1+aBn4=", "zh:3389298e5116232edd1c6e64c7a83f696d5663f1a1c7da5bb32be3472faa4a9e", "zh:39b5d91e58372716d9c7d4869e8391612d3799a936f7c94cc9b3efbe08f4a6d9", "zh:4a077105269fd187fc751a390d3e894092a2dd1b44e7e76ff9923968d971dc6a", @@ -28,6 +29,7 @@ provider "registry.terraform.io/hashicorp/null" { constraints = ">= 3.1.0" hashes = [ "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", diff --git a/host/cpu/variables.tf b/host/cpu/variables.tf index 76fcbd9..049e904 100644 --- a/host/cpu/variables.tf +++ b/host/cpu/variables.tf @@ -8,7 +8,7 @@ variable "additional_tags" { } variable "base_tags" { - default = ["resource:apigateway"] + default = ["resource:ec2"] description = "Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this)" type = list(string) } diff --git a/host/disk/.terraform.lock.hcl b/host/disk/.terraform.lock.hcl index 0791549..e29eb96 100644 --- a/host/disk/.terraform.lock.hcl +++ b/host/disk/.terraform.lock.hcl @@ -6,6 +6,7 @@ provider "registry.terraform.io/datadog/datadog" { constraints = ">= 3.37.0" hashes = [ "h1:6rSVMI3RBWRHA70wH8eIGyzH1IZHu1hwdixT+UbD9S0=", + "h1:i2teIBkWHesijmdA9Hny73TQXzIpGo3400Iqz1+aBn4=", "zh:3389298e5116232edd1c6e64c7a83f696d5663f1a1c7da5bb32be3472faa4a9e", "zh:39b5d91e58372716d9c7d4869e8391612d3799a936f7c94cc9b3efbe08f4a6d9", "zh:4a077105269fd187fc751a390d3e894092a2dd1b44e7e76ff9923968d971dc6a", @@ -28,6 +29,7 @@ provider "registry.terraform.io/hashicorp/null" { constraints = ">= 3.1.0" hashes = [ "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", diff --git a/host/disk/variables.tf b/host/disk/variables.tf index 1cd809d..b9c36fa 100644 --- a/host/disk/variables.tf +++ b/host/disk/variables.tf @@ -8,7 +8,7 @@ variable "additional_tags" { } variable "base_tags" { - default = ["resource:apigateway"] + default = ["resource:ec2"] description = "Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this)" type = list(string) } diff --git a/host/memory/.terraform.lock.hcl b/host/memory/.terraform.lock.hcl index 0791549..e29eb96 100644 --- a/host/memory/.terraform.lock.hcl +++ b/host/memory/.terraform.lock.hcl @@ -6,6 +6,7 @@ provider "registry.terraform.io/datadog/datadog" { constraints = ">= 3.37.0" hashes = [ "h1:6rSVMI3RBWRHA70wH8eIGyzH1IZHu1hwdixT+UbD9S0=", + "h1:i2teIBkWHesijmdA9Hny73TQXzIpGo3400Iqz1+aBn4=", "zh:3389298e5116232edd1c6e64c7a83f696d5663f1a1c7da5bb32be3472faa4a9e", "zh:39b5d91e58372716d9c7d4869e8391612d3799a936f7c94cc9b3efbe08f4a6d9", "zh:4a077105269fd187fc751a390d3e894092a2dd1b44e7e76ff9923968d971dc6a", @@ -28,6 +29,7 @@ provider "registry.terraform.io/hashicorp/null" { constraints = ">= 3.1.0" hashes = [ "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", diff --git a/host/memory/variables.tf b/host/memory/variables.tf index 9553870..810fb3a 100644 --- a/host/memory/variables.tf +++ b/host/memory/variables.tf @@ -8,7 +8,7 @@ variable "additional_tags" { } variable "base_tags" { - default = ["resource:apigateway"] + default = ["resource:ec2"] description = "Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this)" type = list(string) } diff --git a/host/process/.terraform.lock.hcl b/host/process/.terraform.lock.hcl index 0791549..e29eb96 100644 --- a/host/process/.terraform.lock.hcl +++ b/host/process/.terraform.lock.hcl @@ -6,6 +6,7 @@ provider "registry.terraform.io/datadog/datadog" { constraints = ">= 3.37.0" hashes = [ "h1:6rSVMI3RBWRHA70wH8eIGyzH1IZHu1hwdixT+UbD9S0=", + "h1:i2teIBkWHesijmdA9Hny73TQXzIpGo3400Iqz1+aBn4=", "zh:3389298e5116232edd1c6e64c7a83f696d5663f1a1c7da5bb32be3472faa4a9e", "zh:39b5d91e58372716d9c7d4869e8391612d3799a936f7c94cc9b3efbe08f4a6d9", "zh:4a077105269fd187fc751a390d3e894092a2dd1b44e7e76ff9923968d971dc6a", @@ -28,6 +29,7 @@ provider "registry.terraform.io/hashicorp/null" { constraints = ">= 3.1.0" hashes = [ "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", diff --git a/host/process/variables.tf b/host/process/variables.tf index f5f1190..21e441a 100644 --- a/host/process/variables.tf +++ b/host/process/variables.tf @@ -8,7 +8,7 @@ variable "additional_tags" { } variable "base_tags" { - default = ["resource:apigateway"] + default = ["resource:ec2"] description = "Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this)" type = list(string) } diff --git a/host/swap/.terraform.lock.hcl b/host/swap/.terraform.lock.hcl index 0791549..e29eb96 100644 --- a/host/swap/.terraform.lock.hcl +++ b/host/swap/.terraform.lock.hcl @@ -6,6 +6,7 @@ provider "registry.terraform.io/datadog/datadog" { constraints = ">= 3.37.0" hashes = [ "h1:6rSVMI3RBWRHA70wH8eIGyzH1IZHu1hwdixT+UbD9S0=", + "h1:i2teIBkWHesijmdA9Hny73TQXzIpGo3400Iqz1+aBn4=", "zh:3389298e5116232edd1c6e64c7a83f696d5663f1a1c7da5bb32be3472faa4a9e", "zh:39b5d91e58372716d9c7d4869e8391612d3799a936f7c94cc9b3efbe08f4a6d9", "zh:4a077105269fd187fc751a390d3e894092a2dd1b44e7e76ff9923968d971dc6a", @@ -28,6 +29,7 @@ provider "registry.terraform.io/hashicorp/null" { constraints = ">= 3.1.0" hashes = [ "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", diff --git a/host/swap/variables.tf b/host/swap/variables.tf index 16e22b7..4a7aa82 100644 --- a/host/swap/variables.tf +++ b/host/swap/variables.tf @@ -8,7 +8,7 @@ variable "additional_tags" { } variable "base_tags" { - default = ["resource:apigateway"] + default = ["resource:ec2"] description = "Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this)" type = list(string) } diff --git a/synthetics/browser/.terraform.lock.hcl b/synthetics/browser/.terraform.lock.hcl index 4819dd9..c3f1a74 100644 --- a/synthetics/browser/.terraform.lock.hcl +++ b/synthetics/browser/.terraform.lock.hcl @@ -6,6 +6,7 @@ provider "registry.terraform.io/datadog/datadog" { constraints = ">= 3.37.0" hashes = [ "h1:Wi04Hu0HzKTJilkBg7oLoZJyuWLfIXfvGYX7Vdi7VnI=", + "h1:tXm3tAaqCBejFSOBzaPersNH9VrSl3XxJ2+5uW6jcq4=", "zh:168651f7fb057da1747056f600971b20741ee8dae9a10b8d84862dec032a0609", "zh:1d4dd8dc0a367721ebcf6418d31612f2c1cca253ef1183e9247deecc14a5e4dd", "zh:262cde1f060ad33612f709f9d73d744db3eb11bedc7c2326692aa5aa82d675f4", @@ -28,6 +29,7 @@ provider "registry.terraform.io/hashicorp/null" { constraints = ">= 3.1.0" hashes = [ "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", diff --git a/synthetics/browser/variables.tf b/synthetics/browser/variables.tf index 09263a6..e42eeb0 100644 --- a/synthetics/browser/variables.tf +++ b/synthetics/browser/variables.tf @@ -8,7 +8,7 @@ variable "additional_tags" { } variable "base_tags" { - default = ["resource:apigateway"] + default = [""] description = "Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this)" type = list(string) } diff --git a/synthetics/ssl/.terraform.lock.hcl b/synthetics/ssl/.terraform.lock.hcl index 4819dd9..c3f1a74 100644 --- a/synthetics/ssl/.terraform.lock.hcl +++ b/synthetics/ssl/.terraform.lock.hcl @@ -6,6 +6,7 @@ provider "registry.terraform.io/datadog/datadog" { constraints = ">= 3.37.0" hashes = [ "h1:Wi04Hu0HzKTJilkBg7oLoZJyuWLfIXfvGYX7Vdi7VnI=", + "h1:tXm3tAaqCBejFSOBzaPersNH9VrSl3XxJ2+5uW6jcq4=", "zh:168651f7fb057da1747056f600971b20741ee8dae9a10b8d84862dec032a0609", "zh:1d4dd8dc0a367721ebcf6418d31612f2c1cca253ef1183e9247deecc14a5e4dd", "zh:262cde1f060ad33612f709f9d73d744db3eb11bedc7c2326692aa5aa82d675f4", @@ -28,6 +29,7 @@ provider "registry.terraform.io/hashicorp/null" { constraints = ">= 3.1.0" hashes = [ "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", diff --git a/synthetics/ssl/variables.tf b/synthetics/ssl/variables.tf index d6e5d9f..6d2662a 100644 --- a/synthetics/ssl/variables.tf +++ b/synthetics/ssl/variables.tf @@ -8,7 +8,7 @@ variable "additional_tags" { } variable "base_tags" { - default = ["resource:apigateway"] + default = [""] description = "Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this)" type = list(string) } From 950e2f633d62527a05f2d299c03345a451e2c2bd Mon Sep 17 00:00:00 2001 From: Kevin Date: Tue, 24 Sep 2024 13:50:38 -0400 Subject: [PATCH 43/77] add env to queries, improve titles, fix queries --- aws/alb/main.tf | 26 +++++++++++++------------- aws/ec2/main.tf | 16 ++++++++-------- aws/ecs-cluster/main.tf | 24 +++++++++++------------- aws/ecs-fargate/main.tf | 16 ++++++++-------- aws/ecs-service/main.tf | 18 +++++++++--------- aws/elasticache/main.tf | 28 ++++++++++++++-------------- aws/elasticsearch/main.tf | 28 +++++++++++++++------------- aws/lambda/main.tf | 28 ++++++++++++++-------------- aws/rds/main.tf | 18 +++++++++--------- aws/sqs/main.tf | 4 ++-- 10 files changed, 103 insertions(+), 103 deletions(-) diff --git a/aws/alb/main.tf b/aws/alb/main.tf index 7e24d32..f882612 100644 --- a/aws/alb/main.tf +++ b/aws/alb/main.tf @@ -11,7 +11,7 @@ locals { resource "datadog_monitor" "http_5xx_responses" { count = var.http_5xx_responses_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ALB 5xx Responses - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "ALB 5xx Responses - {{loadbalancer.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -27,8 +27,8 @@ resource "datadog_monitor" "http_5xx_responses" { query = < ${var.http_5xx_responses_threshold_critical} END @@ -41,7 +41,7 @@ END resource "datadog_monitor" "http_5xx_tg_responses" { count = var.http_5xx_tg_responses_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ALB Target Group 5xx Responses - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "ALB Target Group 5xx Responses - {{loadbalancer.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -57,8 +57,8 @@ resource "datadog_monitor" "http_5xx_tg_responses" { query = < ${var.http_5xx_tg_responses_threshold_critical} END @@ -72,7 +72,7 @@ END resource "datadog_monitor" "latency" { count = var.latency_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ALB latency - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "{{loadbalancer.name}} ALB latency - {{value}}s ", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -88,7 +88,7 @@ resource "datadog_monitor" "latency" { query = < ${var.latency_threshold_critical} END @@ -101,7 +101,7 @@ END resource "datadog_monitor" "no_healthy_instances" { count = var.no_healthy_instances_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ALB healthy instances - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "{{loadbalancer.name}} ALB healthy instances is at {{value}}%", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -117,10 +117,10 @@ resource "datadog_monitor" "no_healthy_instances" { query = <= 1 END @@ -38,7 +38,7 @@ END resource "datadog_monitor" "status_failed_instance" { count = var.status_failed_instance_enabled ? 1 : 0 - name = join("", [local.title_prefix, "EC2 instance status - instance failure - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "EC2 instance status - instance failure - {{name.name}}({{instance_id.name}})", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -53,7 +53,7 @@ resource "datadog_monitor" "status_failed_instance" { query = <= 1 END @@ -65,7 +65,7 @@ END resource "datadog_monitor" "status_failed_system" { count = var.status_failed_system_enabled ? 1 : 0 - name = join("", [local.title_prefix, "EC2 instance status - host failure - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "EC2 instance status - host failure - {{name.name}}({{instance_id.name}})", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -80,7 +80,7 @@ resource "datadog_monitor" "status_failed_system" { query = <= 1 END @@ -92,7 +92,7 @@ END resource "datadog_monitor" "status_failed_volume" { count = var.status_failed_volume_enabled ? 1 : 0 - name = join("", [local.title_prefix, "EC2 instance status - volume failure - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "EC2 instance status - volume failure - {{name.name}}({{instance_id.name}})", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -107,7 +107,7 @@ resource "datadog_monitor" "status_failed_volume" { query = <= 1 END diff --git a/aws/ecs-cluster/main.tf b/aws/ecs-cluster/main.tf index 7d8af51..677ea4c 100644 --- a/aws/ecs-cluster/main.tf +++ b/aws/ecs-cluster/main.tf @@ -12,11 +12,11 @@ locals { resource "datadog_monitor" "agent_status" { count = var.agent_status_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ECS Cluster Agent Status - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "ECS Agent disconnected - {{clustername.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) - type = "query alert" + type = "service check" evaluation_delay = var.evaluation_delay new_group_delay = var.new_group_delay @@ -26,11 +26,9 @@ resource "datadog_monitor" "agent_status" { require_full_window = true timeout_h = var.timeout_h - query = <= ${var.agent_status_threshold_critical} -END + query = < ${var.cpu_utilization_threshold_critical} END @@ -70,7 +68,7 @@ END resource "datadog_monitor" "cpu_utilization_anomaly" { count = var.cpu_utilization_anomaly_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ECS cluster CPU utilization anomalous activity - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "ECS cluster CPU utilization anomalous activity - {{clustername.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -86,7 +84,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { query = <= ${var.cpu_utilization_anomaly_threshold_critical} @@ -106,7 +104,7 @@ END resource "datadog_monitor" "memory_reservation" { count = var.memory_reservation_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ECS Cluster CPU Reservation - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "ECS Cluster Memory Reservation High - {{clustername.name}} - {{value}}%", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -122,7 +120,7 @@ resource "datadog_monitor" "memory_reservation" { query = < ${var.memory_reservation_threshold_critical} END diff --git a/aws/ecs-fargate/main.tf b/aws/ecs-fargate/main.tf index 12f8bcb..51fa955 100644 --- a/aws/ecs-fargate/main.tf +++ b/aws/ecs-fargate/main.tf @@ -12,7 +12,7 @@ locals { resource "datadog_monitor" "fargate_check" { count = var.fargate_check_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ECS Fargate task status check - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "Fargate service not responding", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -40,7 +40,7 @@ END resource "datadog_monitor" "cpu_utilization" { count = var.cpu_utilization_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ECS Fargate task CPU utilization - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "ECS Fargate task CPU utilization", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -56,7 +56,7 @@ resource "datadog_monitor" "cpu_utilization" { query = < ${var.cpu_utilization_threshold_critical} END @@ -69,7 +69,7 @@ END resource "datadog_monitor" "cpu_utilization_anomaly" { count = var.cpu_utilization_anomaly_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ECS service CPU utilization anomalous activity - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "ECS service CPU utilization anomalous activity", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -85,7 +85,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { query = <= ${var.cpu_utilization_anomaly_threshold_critical} @@ -105,7 +105,7 @@ END resource "datadog_monitor" "memory_utilization" { count = var.memory_utilization_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ECS Fargate task memory utilization - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "ECS Fargate task memory utilization", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -121,8 +121,8 @@ resource "datadog_monitor" "memory_utilization" { query = <= ${var.memory_utilization_threshold_critical} END diff --git a/aws/ecs-service/main.tf b/aws/ecs-service/main.tf index 0e8c98f..f227770 100644 --- a/aws/ecs-service/main.tf +++ b/aws/ecs-service/main.tf @@ -12,7 +12,7 @@ locals { resource "datadog_monitor" "running_tasks" { count = var.running_tasks_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ECS service running tasks - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "ECS service failed tasks - {{servicename.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -28,8 +28,8 @@ resource "datadog_monitor" "running_tasks" { query = <= ${var.cpu_utilization_threshold_critical} END @@ -71,7 +71,7 @@ END resource "datadog_monitor" "cpu_utilization_anomaly" { count = var.cpu_utilization_anomaly_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ECS service CPU utilization anomalous activity - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "ECS service CPU utilization anomalous activity - {{servicename.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -87,7 +87,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { query = <= ${var.cpu_utilization_anomaly_threshold_critical} @@ -107,7 +107,7 @@ END resource "datadog_monitor" "memory_utilization" { count = var.memory_utilization_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ECS Service memory utilization - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "ECS Service memory utilization - {{servicename.name}} - {{value}}%", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -123,7 +123,7 @@ resource "datadog_monitor" "memory_utilization" { query = <= ${var.memory_utilization_threshold_critical} END diff --git a/aws/elasticache/main.tf b/aws/elasticache/main.tf index 1e62b3c..12e702f 100644 --- a/aws/elasticache/main.tf +++ b/aws/elasticache/main.tf @@ -11,7 +11,7 @@ locals { resource "datadog_monitor" "cpu_utilization" { count = var.cpu_utilization_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Elasticache CPU Utilization - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "Elasticache CPU Utilization - {{cacheclusterid.name}} - {{value}}%", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -27,7 +27,7 @@ resource "datadog_monitor" "cpu_utilization" { query = <= ${var.cpu_utilization_threshold_critical} END @@ -40,7 +40,7 @@ END resource "datadog_monitor" "cpu_utilization_anomaly" { count = var.cpu_utilization_anomaly_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Elasticache CPU utilization anomalous activity - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "Elasticache CPU utilization anomalous activity - {{cacheclusterid.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -56,7 +56,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { query = <= ${var.cpu_utilization_anomaly_threshold_critical} @@ -70,7 +70,7 @@ END resource "datadog_monitor" "evictions" { count = var.evictions_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Elasticache evictions - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "Elasticache evictions - {{cacheclusterid.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -86,7 +86,7 @@ resource "datadog_monitor" "evictions" { query = <= ${var.evictions_threshold_critical} END @@ -99,7 +99,7 @@ END resource "datadog_monitor" "hit_rate" { count = var.hit_rate_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Elasticache cache hit rate - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "Elasticache cache hit rate - {{cacheclusterid.name}} - {{value}}% ", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -115,7 +115,7 @@ resource "datadog_monitor" "hit_rate" { query = <= ${var.hit_rate_threshold_critical} END @@ -128,7 +128,7 @@ END resource "datadog_monitor" "hit_rate_anomaly" { count = var.hit_rate_anomaly_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Elasticache cache hit rate anomalous activity - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "Elasticache cache hit rate anomalous activity - {{cacheclusterid.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -144,7 +144,7 @@ resource "datadog_monitor" "hit_rate_anomaly" { query = <= ${var.hit_rate_anomaly_threshold_critical} @@ -158,7 +158,7 @@ END resource "datadog_monitor" "max_connections" { count = var.max_connections_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Elasticache max connections - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "Elasticache max connections reached - {{cacheclusterid.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -174,7 +174,7 @@ resource "datadog_monitor" "max_connections" { query = <= ${var.max_connections_threshold_critical} END @@ -187,7 +187,7 @@ END resource "datadog_monitor" "swap_usage" { count = var.swap_usage_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Elasticache swap usage - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "Elasticache swap usage - {{cacheclusterid.name}} - {{value}}MB", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -203,7 +203,7 @@ resource "datadog_monitor" "swap_usage" { query = <= 1 END @@ -39,7 +39,7 @@ END resource "datadog_monitor" "cluster_health_yellow" { count = var.cluster_health_yellow_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ElasticSearch cluster health yellow - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "ElasticSearch cluster health yellow - {{name.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -55,7 +55,7 @@ resource "datadog_monitor" "cluster_health_yellow" { query = <= 1 END @@ -67,7 +67,7 @@ END resource "datadog_monitor" "cpu_utilization" { count = var.cpu_utilization_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ElasticSearch CPU Utilization - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "ElasticSearch CPU Utilization - {{name.name}} - {{value}}%", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -83,7 +83,7 @@ resource "datadog_monitor" "cpu_utilization" { query = <= ${var.cpu_utilization_threshold_critical} END @@ -96,7 +96,7 @@ END resource "datadog_monitor" "cpu_utilization_anomaly" { count = var.cpu_utilization_anomaly_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ElasticSearch CPU utilization anomalous activity - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "ElasticSearch CPU utilization anomalous activity - {{name.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -132,7 +132,7 @@ END resource "datadog_monitor" "free_storage" { count = var.free_storage_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ElasticSearch cluster free storage - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "ElasticSearch cluster storage - {{name.name}} - {{value}}% used", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -146,11 +146,13 @@ resource "datadog_monitor" "free_storage" { require_full_window = true timeout_h = var.timeout_h - query = < ${var.free_storage_threshold_critical} +EOQ monitor_thresholds { critical = var.free_storage_threshold_critical diff --git a/aws/lambda/main.tf b/aws/lambda/main.tf index 653d566..efab3bd 100644 --- a/aws/lambda/main.tf +++ b/aws/lambda/main.tf @@ -13,7 +13,7 @@ locals { resource "datadog_monitor" "error_rate" { count = var.error_rate_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Lambda error rate - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "Lambda error rate - {{functionname.name}} - {{value}}%", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -29,8 +29,8 @@ resource "datadog_monitor" "error_rate" { query = < ${var.error_rate_threshold_critical} END @@ -43,7 +43,7 @@ END resource "datadog_monitor" "timeouts" { count = var.timeouts_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Lambda timeouts - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "Lambda timeouts - {{functionname.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -59,8 +59,8 @@ resource "datadog_monitor" "timeouts" { query = < ${var.timeouts_threshold_critical} END @@ -73,7 +73,7 @@ END resource "datadog_monitor" "cold_starts" { count = var.cold_starts_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Lambda cold starts - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "Lambda cold starts - {{functionname.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -89,8 +89,8 @@ resource "datadog_monitor" "cold_starts" { query = < ${var.cold_starts_threshold_critical} END @@ -103,7 +103,7 @@ END resource "datadog_monitor" "out_of_memory" { count = var.out_of_memory_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Lambda out of memory - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "Lambda out of memory - {{functionname.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -133,7 +133,7 @@ END resource "datadog_monitor" "iterator_age" { count = var.iterator_age_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Lambda iterator age - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "Lambda iterator age - {{functionname.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -149,7 +149,7 @@ resource "datadog_monitor" "iterator_age" { query = < ${var.iterator_age_threshold_critical} END @@ -162,7 +162,7 @@ END resource "datadog_monitor" "iterator_age_forecast" { count = var.iterator_age_forecast_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Lambda stream data loss forecasted - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "Lambda stream data loss forecasted - {{functionname.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -190,7 +190,7 @@ END resource "datadog_monitor" "throttle_rate" { count = var.throttle_rate_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Lambda throttle rate - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "Lambda throttle rate - {{functionname.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) diff --git a/aws/rds/main.tf b/aws/rds/main.tf index f08fb93..af56bdd 100644 --- a/aws/rds/main.tf +++ b/aws/rds/main.tf @@ -11,7 +11,7 @@ locals { resource "datadog_monitor" "connection_count_anomaly" { count = var.connection_count_anomaly_enabled ? 1 : 0 - name = join("", [local.title_prefix, "RDS connection count anomalous activity - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "RDS connection count anomalous activity - {{dbinstanceidentifier.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -27,7 +27,7 @@ resource "datadog_monitor" "connection_count_anomaly" { query = <= ${var.connection_count_anomaly_threshold_critical} @@ -47,7 +47,7 @@ END resource "datadog_monitor" "cpu_utilization" { count = var.cpu_utilization_enabled ? 1 : 0 - name = join("", [local.title_prefix, "RDS CPU Utilization - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "RDS CPU Utilization - {{dbinstanceidentifier.name}} - {{value}}%", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -63,7 +63,7 @@ resource "datadog_monitor" "cpu_utilization" { query = <= ${var.cpu_utilization_threshold_critical} END @@ -76,7 +76,7 @@ END resource "datadog_monitor" "cpu_utilization_anomaly" { count = var.cpu_utilization_anomaly_enabled ? 1 : 0 - name = join("", [local.title_prefix, "RDS CPU utilization anomalous activity - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "RDS CPU utilization anomalous activity - {{dbinstanceidentifier.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -92,7 +92,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { query = <= ${var.cpu_utilization_anomaly_threshold_critical} @@ -112,7 +112,7 @@ END resource "datadog_monitor" "used_storage" { count = var.used_storage_enabled ? 1 : 0 - name = join("", [local.title_prefix, "RDS instance free storage - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "RDS instance storage - {{dbinstanceidentifier.name}} - {{value}}% used", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -129,8 +129,8 @@ resource "datadog_monitor" "used_storage" { query = <= ${var.used_storage_threshold_critical} END diff --git a/aws/sqs/main.tf b/aws/sqs/main.tf index c0bb6bb..ed9e2d7 100644 --- a/aws/sqs/main.tf +++ b/aws/sqs/main.tf @@ -11,7 +11,7 @@ locals { resource "datadog_monitor" "oldest_message" { count = var.oldest_message_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Oldest queued message - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "Oldest queued message - {{queuename.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -40,7 +40,7 @@ END resource "datadog_monitor" "queue_depth" { count = var.queue_depth_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Queue depth - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "Queue depth - {{queuename.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) From c4b466fc0c62ad3eeda5670884b963f5993c96ac Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 26 Sep 2024 12:48:53 -0400 Subject: [PATCH 44/77] remove eng from monitor titles --- aws/alb/main.tf | 2 +- aws/apigateway/main.tf | 2 +- aws/beanstalk/main.tf | 2 +- aws/ec2/main.tf | 2 +- aws/ecs-cluster/main.tf | 2 +- aws/ecs-fargate/main.tf | 2 +- aws/ecs-service/main.tf | 2 +- aws/elasticache/main.tf | 2 +- aws/elasticsearch/main.tf | 2 +- aws/elb/main.tf | 2 +- aws/lambda/main.tf | 2 +- aws/rds/main.tf | 2 +- aws/sqs/main.tf | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/aws/alb/main.tf b/aws/alb/main.tf index f882612..30458f7 100644 --- a/aws/alb/main.tf +++ b/aws/alb/main.tf @@ -4,7 +4,7 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}[${var.env}] " + title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } diff --git a/aws/apigateway/main.tf b/aws/apigateway/main.tf index 62a23de..02033c6 100644 --- a/aws/apigateway/main.tf +++ b/aws/apigateway/main.tf @@ -4,7 +4,7 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}[${var.env}] " + title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } diff --git a/aws/beanstalk/main.tf b/aws/beanstalk/main.tf index 0f4fe29..f55018b 100644 --- a/aws/beanstalk/main.tf +++ b/aws/beanstalk/main.tf @@ -17,7 +17,7 @@ locals { latency_metric = local.latency_metric_map[var.latency_measurement] - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}[${var.env}] " + title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } diff --git a/aws/ec2/main.tf b/aws/ec2/main.tf index cf6e7f2..3a75582 100644 --- a/aws/ec2/main.tf +++ b/aws/ec2/main.tf @@ -4,7 +4,7 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}[${var.env}] " + title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } diff --git a/aws/ecs-cluster/main.tf b/aws/ecs-cluster/main.tf index 677ea4c..82da113 100644 --- a/aws/ecs-cluster/main.tf +++ b/aws/ecs-cluster/main.tf @@ -5,7 +5,7 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}[${var.env}] " + title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } diff --git a/aws/ecs-fargate/main.tf b/aws/ecs-fargate/main.tf index 51fa955..7bd1431 100644 --- a/aws/ecs-fargate/main.tf +++ b/aws/ecs-fargate/main.tf @@ -5,7 +5,7 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}[${var.env}] " + title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } diff --git a/aws/ecs-service/main.tf b/aws/ecs-service/main.tf index f227770..0365e9b 100644 --- a/aws/ecs-service/main.tf +++ b/aws/ecs-service/main.tf @@ -5,7 +5,7 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}[${var.env}] " + title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } diff --git a/aws/elasticache/main.tf b/aws/elasticache/main.tf index 12e702f..3f7c8a5 100644 --- a/aws/elasticache/main.tf +++ b/aws/elasticache/main.tf @@ -4,7 +4,7 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}[${var.env}] " + title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } diff --git a/aws/elasticsearch/main.tf b/aws/elasticsearch/main.tf index 82d6642..a566878 100644 --- a/aws/elasticsearch/main.tf +++ b/aws/elasticsearch/main.tf @@ -4,7 +4,7 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}[${var.env}] " + title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } diff --git a/aws/elb/main.tf b/aws/elb/main.tf index b6a673d..182c7e2 100644 --- a/aws/elb/main.tf +++ b/aws/elb/main.tf @@ -4,7 +4,7 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}[${var.env}] " + title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } diff --git a/aws/lambda/main.tf b/aws/lambda/main.tf index efab3bd..1eb0d13 100644 --- a/aws/lambda/main.tf +++ b/aws/lambda/main.tf @@ -4,7 +4,7 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}[${var.env}] " + title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" cold_start_query_filter = local.query_filter == "{*}" ? "{cold_start:true}" : replace(local.query_filter, "{", "{cold_star:true,") diff --git a/aws/rds/main.tf b/aws/rds/main.tf index af56bdd..bbb3292 100644 --- a/aws/rds/main.tf +++ b/aws/rds/main.tf @@ -4,7 +4,7 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}[${var.env}] " + title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } diff --git a/aws/sqs/main.tf b/aws/sqs/main.tf index ed9e2d7..edbfc91 100644 --- a/aws/sqs/main.tf +++ b/aws/sqs/main.tf @@ -4,7 +4,7 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}[${var.env}] " + title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } From 86d3c1ac12344b0778cc4349d444a10507a2e8ef Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 26 Sep 2024 13:14:15 -0400 Subject: [PATCH 45/77] Fix elasticsearch disk check --- aws/elasticsearch/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/elasticsearch/main.tf b/aws/elasticsearch/main.tf index a566878..87970c0 100644 --- a/aws/elasticsearch/main.tf +++ b/aws/elasticsearch/main.tf @@ -148,7 +148,7 @@ resource "datadog_monitor" "free_storage" { query = < ${var.free_storage_threshold_critical} From 96642b76a23b69b10fc7832645f0fd71dccb85ae Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 26 Sep 2024 13:31:38 -0400 Subject: [PATCH 46/77] fix elastic disk check --- aws/elasticsearch/main.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aws/elasticsearch/main.tf b/aws/elasticsearch/main.tf index 87970c0..632e503 100644 --- a/aws/elasticsearch/main.tf +++ b/aws/elasticsearch/main.tf @@ -147,10 +147,10 @@ resource "datadog_monitor" "free_storage" { timeout_h = var.timeout_h query = < ${var.free_storage_threshold_critical} EOQ From 219c2c14b94dc130e78ced86da10a36a87d0b986 Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 26 Sep 2024 13:38:15 -0400 Subject: [PATCH 47/77] docs updates --- README.md | 26 ++++++++++++++ aws/alb/README.md | 2 +- aws/apigateway/README.md | 2 +- aws/beanstalk/README.md | 2 +- aws/ec2/README.md | 18 +++------- aws/ecs-cluster/README.md | 2 +- aws/ecs-fargate/README.md | 2 +- aws/ecs-service/README.md | 2 +- aws/elasticache/README.md | 2 +- aws/elasticsearch/README.md | 4 +-- aws/elb/README.md | 19 ++++++----- aws/lambda/README.md | 67 +++++++++++++++++++++++-------------- aws/rds/README.md | 61 +++++++++++++++++++-------------- aws/sqs/README.md | 39 ++++++++------------- aws/vpn/README.md | 31 ++++------------- 15 files changed, 148 insertions(+), 131 deletions(-) diff --git a/README.md b/README.md index 62593d8..3c31d8a 100644 --- a/README.md +++ b/README.md @@ -27,3 +27,29 @@ module "monitor" { ``` ## About + + +## Requirements + +No requirements. + +## Providers + +No providers. + +## Modules + +No modules. + +## Resources + +No resources. + +## Inputs + +No inputs. + +## Outputs + +No outputs. + \ No newline at end of file diff --git a/aws/alb/README.md b/aws/alb/README.md index ec3899f..29522da 100644 --- a/aws/alb/README.md +++ b/aws/alb/README.md @@ -20,7 +20,7 @@ Configures the following for ALBs based on tags matches: | Name | Version | |------|---------| -| [datadog](#provider\_datadog) | >= 3.37 | +| [datadog](#provider\_datadog) | 3.37.0 | ## Modules diff --git a/aws/apigateway/README.md b/aws/apigateway/README.md index aaaf2f8..2596f1f 100644 --- a/aws/apigateway/README.md +++ b/aws/apigateway/README.md @@ -18,7 +18,7 @@ Configures the following for APIs based on tags matches: | Name | Version | |------|---------| -| [datadog](#provider\_datadog) | >= 3.37 | +| [datadog](#provider\_datadog) | 3.37.0 | ## Modules diff --git a/aws/beanstalk/README.md b/aws/beanstalk/README.md index 007fd00..b2527a1 100644 --- a/aws/beanstalk/README.md +++ b/aws/beanstalk/README.md @@ -20,7 +20,7 @@ Configures the following for Beanstalk environments based on tags matches: | Name | Version | |------|---------| -| [datadog](#provider\_datadog) | >= 3.37 | +| [datadog](#provider\_datadog) | 3.37.0 | ## Modules diff --git a/aws/ec2/README.md b/aws/ec2/README.md index 9feda50..0051be3 100644 --- a/aws/ec2/README.md +++ b/aws/ec2/README.md @@ -17,7 +17,7 @@ All checks are enabled by default. | Name | Version | |------|---------| -| [datadog](#provider\_datadog) | >= 3.37 | +| [datadog](#provider\_datadog) | 3.37.0 | ## Modules @@ -57,26 +57,18 @@ No modules. | [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | -| [status\_failed\_check\_enabled](#input\_status\_failed\_check\_enabled) | Enable ec2 instance status check monitor | `bool` | `false` | no | +| [status\_failed\_check\_enabled](#input\_status\_failed\_check\_enabled) | Enable ec2 instance status check monitor | `bool` | `true` | no | | [status\_failed\_check\_evaluation\_window](#input\_status\_failed\_check\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [status\_failed\_check\_no\_data\_window](#input\_status\_failed\_check\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [status\_failed\_check\_threshold\_critical](#input\_status\_failed\_check\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | -| [status\_failed\_check\_threshold\_warning](#input\_status\_failed\_check\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | -| [status\_failed\_instance\_enabled](#input\_status\_failed\_instance\_enabled) | Enable instance status check monitor | `bool` | `false` | no | +| [status\_failed\_instance\_enabled](#input\_status\_failed\_instance\_enabled) | Enable instance status check monitor | `bool` | `true` | no | | [status\_failed\_instance\_evaluation\_window](#input\_status\_failed\_instance\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [status\_failed\_instance\_no\_data\_window](#input\_status\_failed\_instance\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [status\_failed\_instance\_threshold\_critical](#input\_status\_failed\_instance\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | -| [status\_failed\_instance\_threshold\_warning](#input\_status\_failed\_instance\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | -| [status\_failed\_system\_enabled](#input\_status\_failed\_system\_enabled) | Enable instance system failure monitor | `bool` | `false` | no | +| [status\_failed\_system\_enabled](#input\_status\_failed\_system\_enabled) | Enable instance system failure monitor | `bool` | `true` | no | | [status\_failed\_system\_evaluation\_window](#input\_status\_failed\_system\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [status\_failed\_system\_no\_data\_window](#input\_status\_failed\_system\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [status\_failed\_system\_threshold\_critical](#input\_status\_failed\_system\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | -| [status\_failed\_system\_threshold\_warning](#input\_status\_failed\_system\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | -| [status\_failed\_volume\_enabled](#input\_status\_failed\_volume\_enabled) | Enable attached volume status monitor | `bool` | `false` | no | +| [status\_failed\_volume\_enabled](#input\_status\_failed\_volume\_enabled) | Enable attached volume status monitor | `bool` | `true` | no | | [status\_failed\_volume\_evaluation\_window](#input\_status\_failed\_volume\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [status\_failed\_volume\_no\_data\_window](#input\_status\_failed\_volume\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [status\_failed\_volume\_threshold\_critical](#input\_status\_failed\_volume\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | -| [status\_failed\_volume\_threshold\_warning](#input\_status\_failed\_volume\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [timeout\_h](#input\_timeout\_h) | Auto-resolve alert in specified hours if condition no longer matches | `number` | `0` | no | | [title\_prefix](#input\_title\_prefix) | Prefix all alerts with specified value in brackets | `string` | `null` | no | diff --git a/aws/ecs-cluster/README.md b/aws/ecs-cluster/README.md index 479ac5c..a118a66 100644 --- a/aws/ecs-cluster/README.md +++ b/aws/ecs-cluster/README.md @@ -19,7 +19,7 @@ Configures the following for ECS clusters based on tags matches: | Name | Version | |------|---------| -| [datadog](#provider\_datadog) | >= 3.37 | +| [datadog](#provider\_datadog) | 3.37.0 | ## Modules diff --git a/aws/ecs-fargate/README.md b/aws/ecs-fargate/README.md index fc4875e..31f78c5 100644 --- a/aws/ecs-fargate/README.md +++ b/aws/ecs-fargate/README.md @@ -19,7 +19,7 @@ Configures the following for ECS Fargate tasks based on tag matches: | Name | Version | |------|---------| -| [datadog](#provider\_datadog) | >= 3.37 | +| [datadog](#provider\_datadog) | 3.37.0 | ## Modules diff --git a/aws/ecs-service/README.md b/aws/ecs-service/README.md index f11e074..2c561e9 100644 --- a/aws/ecs-service/README.md +++ b/aws/ecs-service/README.md @@ -19,7 +19,7 @@ Configures the following for ECS services based on tag matches: | Name | Version | |------|---------| -| [datadog](#provider\_datadog) | >= 3.37 | +| [datadog](#provider\_datadog) | 3.37.0 | ## Modules diff --git a/aws/elasticache/README.md b/aws/elasticache/README.md index 55933f8..7bc29d2 100644 --- a/aws/elasticache/README.md +++ b/aws/elasticache/README.md @@ -24,7 +24,7 @@ Configures the following for ElastiCache clusters based on tag matches: | Name | Version | |------|---------| -| [datadog](#provider\_datadog) | >= 3.37 | +| [datadog](#provider\_datadog) | 3.37.0 | ## Modules diff --git a/aws/elasticsearch/README.md b/aws/elasticsearch/README.md index fc6d9c4..af4b2f6 100644 --- a/aws/elasticsearch/README.md +++ b/aws/elasticsearch/README.md @@ -20,7 +20,7 @@ Configures the following for ElasticSearch domains based on tag matches: | Name | Version | |------|---------| -| [datadog](#provider\_datadog) | >= 3.37 | +| [datadog](#provider\_datadog) | 3.37.0 | ## Modules @@ -70,7 +70,7 @@ No modules. | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | | [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | -| [free\_storage\_enabled](#input\_free\_storage\_enabled) | Enable free storage monitor | `bool` | `false` | no | +| [free\_storage\_enabled](#input\_free\_storage\_enabled) | Enable free storage monitor | `bool` | `true` | no | | [free\_storage\_evaluation\_window](#input\_free\_storage\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [free\_storage\_no\_data\_window](#input\_free\_storage\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [free\_storage\_threshold\_critical](#input\_free\_storage\_threshold\_critical) | Critical threshold (GB) | `number` | `null` | no | diff --git a/aws/elb/README.md b/aws/elb/README.md index 9063d12..6a0756a 100644 --- a/aws/elb/README.md +++ b/aws/elb/README.md @@ -20,7 +20,7 @@ Configures the following for Classic ELBs based on tag matches: | Name | Version | |------|---------| -| [datadog](#provider\_datadog) | >= 3.37 | +| [datadog](#provider\_datadog) | 3.37.0 | ## Modules @@ -30,8 +30,8 @@ No modules. | Name | Type | |------|------| +| [datadog_monitor.http_5xx_backend_responses](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | | [datadog_monitor.http_5xx_responses](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | -| [datadog_monitor.http_5xx_tg_responses](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | | [datadog_monitor.latency](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | | [datadog_monitor.no_healthy_instances](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | @@ -43,21 +43,21 @@ No modules. | [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | | [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | | [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | -| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:alb"
]
| no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:lb"
]
| no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | | [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | +| [http\_5xx\_backend\_responses\_enabled](#input\_http\_5xx\_backend\_responses\_enabled) | Enable HTTP 5xx response monitor (backend) | `bool` | `false` | no | +| [http\_5xx\_backend\_responses\_evaluation\_window](#input\_http\_5xx\_backend\_responses\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | +| [http\_5xx\_backend\_responses\_no\_data\_window](#input\_http\_5xx\_backend\_responses\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | +| [http\_5xx\_backend\_responses\_threshold\_critical](#input\_http\_5xx\_backend\_responses\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | +| [http\_5xx\_backend\_responses\_threshold\_warning](#input\_http\_5xx\_backend\_responses\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | | [http\_5xx\_responses\_enabled](#input\_http\_5xx\_responses\_enabled) | Enable HTTP 5xx response monitor | `bool` | `false` | no | | [http\_5xx\_responses\_evaluation\_window](#input\_http\_5xx\_responses\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [http\_5xx\_responses\_no\_data\_window](#input\_http\_5xx\_responses\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [http\_5xx\_responses\_threshold\_critical](#input\_http\_5xx\_responses\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | | [http\_5xx\_responses\_threshold\_warning](#input\_http\_5xx\_responses\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | -| [http\_5xx\_tg\_responses\_enabled](#input\_http\_5xx\_tg\_responses\_enabled) | Enable HTTP 5xx response monitor (target group) | `bool` | `false` | no | -| [http\_5xx\_tg\_responses\_evaluation\_window](#input\_http\_5xx\_tg\_responses\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | -| [http\_5xx\_tg\_responses\_no\_data\_window](#input\_http\_5xx\_tg\_responses\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [http\_5xx\_tg\_responses\_threshold\_critical](#input\_http\_5xx\_tg\_responses\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | -| [http\_5xx\_tg\_responses\_threshold\_warning](#input\_http\_5xx\_tg\_responses\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | | [latency\_enabled](#input\_latency\_enabled) | Enable latency monitor | `bool` | `false` | no | | [latency\_evaluation\_window](#input\_latency\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [latency\_no\_data\_window](#input\_latency\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | @@ -69,7 +69,8 @@ No modules. | [no\_healthy\_instances\_enabled](#input\_no\_healthy\_instances\_enabled) | Enable no healthy instances monitor | `bool` | `true` | no | | [no\_healthy\_instances\_evaluation\_window](#input\_no\_healthy\_instances\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [no\_healthy\_instances\_no\_data\_window](#input\_no\_healthy\_instances\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [no\_healthy\_instances\_threshold\_warning](#input\_no\_healthy\_instances\_threshold\_warning) | Warning threshold (percentage, 0 to disable) | `number` | `0` | no | +| [no\_healthy\_instances\_threshold\_critical](#input\_no\_healthy\_instances\_threshold\_critical) | Warning threshold (percentage) | `number` | `0` | no | +| [no\_healthy\_instances\_threshold\_warning](#input\_no\_healthy\_instances\_threshold\_warning) | Warning threshold (percentage) | `number` | `null` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | diff --git a/aws/lambda/README.md b/aws/lambda/README.md index 2393fd1..f07e953 100644 --- a/aws/lambda/README.md +++ b/aws/lambda/README.md @@ -23,7 +23,7 @@ Configures the following for Lambda functions based on tag matches: | Name | Version | |------|---------| -| [datadog](#provider\_datadog) | >= 3.37 | +| [datadog](#provider\_datadog) | 3.37.0 | ## Modules @@ -33,10 +33,13 @@ No modules. | Name | Type | |------|------| -| [datadog_monitor.http_5xx_responses](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | -| [datadog_monitor.http_5xx_tg_responses](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | -| [datadog_monitor.latency](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | -| [datadog_monitor.no_healthy_instances](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | +| [datadog_monitor.cold_starts](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | +| [datadog_monitor.error_rate](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | +| [datadog_monitor.iterator_age](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | +| [datadog_monitor.iterator_age_forecast](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | +| [datadog_monitor.out_of_memory](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | +| [datadog_monitor.throttle_rate](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | +| [datadog_monitor.timeouts](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | ## Inputs @@ -46,44 +49,58 @@ No modules. | [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | | [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | | [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | -| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:alb"
]
| no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:lambda"
]
| no | +| [cold\_starts\_enabled](#input\_cold\_starts\_enabled) | Enable cold starts monitor (requires enhanced metrics) | `bool` | `false` | no | +| [cold\_starts\_evaluation\_window](#input\_cold\_starts\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_4h"` | no | +| [cold\_starts\_no\_data\_window](#input\_cold\_starts\_no\_data\_window) | No data threshold (in minutes, null to disable) | `number` | `null` | no | +| [cold\_starts\_threshold\_critical](#input\_cold\_starts\_threshold\_critical) | Critical threshold (count) | `number` | `null` | no | +| [cold\_starts\_threshold\_warning](#input\_cold\_starts\_threshold\_warning) | Warning threshold (count) | `number` | `null` | no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | | [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [error\_rate\_enabled](#input\_error\_rate\_enabled) | Enable Lambda error rate monitor | `bool` | `false` | no | +| [error\_rate\_evaluation\_window](#input\_error\_rate\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | +| [error\_rate\_no\_data\_window](#input\_error\_rate\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | +| [error\_rate\_threshold\_critical](#input\_error\_rate\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | +| [error\_rate\_threshold\_warning](#input\_error\_rate\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | -| [http\_5xx\_responses\_enabled](#input\_http\_5xx\_responses\_enabled) | Enable HTTP 5xx response monitor | `bool` | `false` | no | -| [http\_5xx\_responses\_evaluation\_window](#input\_http\_5xx\_responses\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | -| [http\_5xx\_responses\_no\_data\_window](#input\_http\_5xx\_responses\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [http\_5xx\_responses\_threshold\_critical](#input\_http\_5xx\_responses\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | -| [http\_5xx\_responses\_threshold\_warning](#input\_http\_5xx\_responses\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | -| [http\_5xx\_tg\_responses\_enabled](#input\_http\_5xx\_tg\_responses\_enabled) | Enable HTTP 5xx response monitor (target group) | `bool` | `false` | no | -| [http\_5xx\_tg\_responses\_evaluation\_window](#input\_http\_5xx\_tg\_responses\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | -| [http\_5xx\_tg\_responses\_no\_data\_window](#input\_http\_5xx\_tg\_responses\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [http\_5xx\_tg\_responses\_threshold\_critical](#input\_http\_5xx\_tg\_responses\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | -| [http\_5xx\_tg\_responses\_threshold\_warning](#input\_http\_5xx\_tg\_responses\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | -| [latency\_enabled](#input\_latency\_enabled) | Enable latency monitor | `bool` | `false` | no | -| [latency\_evaluation\_window](#input\_latency\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | -| [latency\_no\_data\_window](#input\_latency\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [latency\_threshold\_critical](#input\_latency\_threshold\_critical) | Critical threshold (seconds) | `number` | `null` | no | -| [latency\_threshold\_warning](#input\_latency\_threshold\_warning) | Warning threshold (seconds) | `number` | `null` | no | +| [iterator\_age\_enabled](#input\_iterator\_age\_enabled) | Enable iterator age monitor | `bool` | `false` | no | +| [iterator\_age\_evaluation\_window](#input\_iterator\_age\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_1h"` | no | +| [iterator\_age\_forecast\_enabled](#input\_iterator\_age\_forecast\_enabled) | Enable iterator age monitor | `bool` | `false` | no | +| [iterator\_age\_forecast\_evaluation\_window](#input\_iterator\_age\_forecast\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_1d"` | no | +| [iterator\_age\_forecast\_no\_data\_window](#input\_iterator\_age\_forecast\_no\_data\_window) | No data threshold (in minutes, null to disable) | `number` | `null` | no | +| [iterator\_age\_no\_data\_window](#input\_iterator\_age\_no\_data\_window) | No data threshold (in minutes, null to disable) | `number` | `null` | no | +| [iterator\_age\_threshold\_critical](#input\_iterator\_age\_threshold\_critical) | Critical threshold (milliseconds) | `number` | `86400000` | no | +| [iterator\_age\_threshold\_warning](#input\_iterator\_age\_threshold\_warning) | Warning threshold (milliseconds) | `number` | `null` | no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | -| [no\_healthy\_instances\_enabled](#input\_no\_healthy\_instances\_enabled) | Enable no healthy instances monitor | `bool` | `true` | no | -| [no\_healthy\_instances\_evaluation\_window](#input\_no\_healthy\_instances\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | -| [no\_healthy\_instances\_no\_data\_window](#input\_no\_healthy\_instances\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [no\_healthy\_instances\_threshold\_warning](#input\_no\_healthy\_instances\_threshold\_warning) | Warning threshold (percentage, 0 to disable) | `number` | `0` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | | [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [out\_of\_memory\_enabled](#input\_out\_of\_memory\_enabled) | Enable out of memory monitor (requires enhanced metrics) | `bool` | `false` | no | +| [out\_of\_memory\_evaluation\_window](#input\_out\_of\_memory\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_4h"` | no | +| [out\_of\_memory\_no\_data\_window](#input\_out\_of\_memory\_no\_data\_window) | No data threshold (in minutes, null to disable) | `number` | `null` | no | +| [out\_of\_memory\_threshold\_critical](#input\_out\_of\_memory\_threshold\_critical) | Critical threshold (count) | `number` | `null` | no | +| [out\_of\_memory\_threshold\_warning](#input\_out\_of\_memory\_threshold\_warning) | Warning threshold (count) | `number` | `null` | no | | [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [throttle\_rate\_enabled](#input\_throttle\_rate\_enabled) | Enable Lambda throttle rate monitor | `bool` | `false` | no | +| [throttle\_rate\_evaluation\_window](#input\_throttle\_rate\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | +| [throttle\_rate\_no\_data\_window](#input\_throttle\_rate\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | +| [throttle\_rate\_threshold\_critical](#input\_throttle\_rate\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | +| [throttle\_rate\_threshold\_warning](#input\_throttle\_rate\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | | [timeout\_h](#input\_timeout\_h) | Auto-resolve alert in specified hours if condition no longer matches | `number` | `0` | no | +| [timeouts\_enabled](#input\_timeouts\_enabled) | Enable timeout count monitor | `bool` | `false` | no | +| [timeouts\_evaluation\_window](#input\_timeouts\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | +| [timeouts\_no\_data\_window](#input\_timeouts\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | +| [timeouts\_threshold\_critical](#input\_timeouts\_threshold\_critical) | Critical threshold (count) | `number` | `75` | no | +| [timeouts\_threshold\_warning](#input\_timeouts\_threshold\_warning) | Warning threshold (count) | `number` | `25` | no | | [title\_prefix](#input\_title\_prefix) | Prefix all alerts with specified value in brackets | `string` | `null` | no | | [title\_suffix](#input\_title\_suffix) | Suffix all alerts with specified value in parenthesis | `string` | `null` | no | | [warn\_priority](#input\_warn\_priority) | Priority for alerts with no data (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | diff --git a/aws/rds/README.md b/aws/rds/README.md index cc05203..00f32b6 100644 --- a/aws/rds/README.md +++ b/aws/rds/README.md @@ -21,7 +21,7 @@ Configures the following for RDS databases based on tag matches: | Name | Version | |------|---------| -| [datadog](#provider\_datadog) | >= 3.37 | +| [datadog](#provider\_datadog) | 3.37.0 | ## Modules @@ -31,10 +31,10 @@ No modules. | Name | Type | |------|------| -| [datadog_monitor.http_5xx_responses](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | -| [datadog_monitor.http_5xx_tg_responses](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | -| [datadog_monitor.latency](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | -| [datadog_monitor.no_healthy_instances](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | +| [datadog_monitor.connection_count_anomaly](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | +| [datadog_monitor.cpu_utilization](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | +| [datadog_monitor.cpu_utilization_anomaly](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | +| [datadog_monitor.used_storage](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | ## Inputs @@ -44,33 +44,39 @@ No modules. | [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | | [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | | [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | -| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:alb"
]
| no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:rds"
]
| no | +| [connection\_count\_anomaly\_deviations](#input\_connection\_count\_anomaly\_deviations) | Standard deviations | `number` | `3` | no | +| [connection\_count\_anomaly\_enabled](#input\_connection\_count\_anomaly\_enabled) | Enable CPU utilization anomaly monitor | `bool` | `false` | no | +| [connection\_count\_anomaly\_evaluation\_window](#input\_connection\_count\_anomaly\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_1h"` | no | +| [connection\_count\_anomaly\_no\_data\_window](#input\_connection\_count\_anomaly\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | +| [connection\_count\_anomaly\_recovery\_window](#input\_connection\_count\_anomaly\_recovery\_window) | Recovery window for anomaly monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_15m"` | no | +| [connection\_count\_anomaly\_rollup](#input\_connection\_count\_anomaly\_rollup) | Rollup interval (must be sized based on evaluation window/span and seasonaility) | `number` | `60` | no | +| [connection\_count\_anomaly\_seasonality](#input\_connection\_count\_anomaly\_seasonality) | Seasonaility (hourly, daily, weekly) | `string` | `"weekly"` | no | +| [connection\_count\_anomaly\_threshold\_critical](#input\_connection\_count\_anomaly\_threshold\_critical) | Critical threshold (percent) | `number` | `null` | no | +| [connection\_count\_anomaly\_threshold\_warning](#input\_connection\_count\_anomaly\_threshold\_warning) | Warning threshold (percent) | `number` | `null` | no | +| [connection\_count\_anomaly\_trigger\_window](#input\_connection\_count\_anomaly\_trigger\_window) | Trigger window for anomaly monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_1h"` | no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [cpu\_utilization\_anomaly\_deviations](#input\_cpu\_utilization\_anomaly\_deviations) | Standard deviations | `number` | `4` | no | +| [cpu\_utilization\_anomaly\_enabled](#input\_cpu\_utilization\_anomaly\_enabled) | Enable CPU utilization anomaly monitor | `bool` | `false` | no | +| [cpu\_utilization\_anomaly\_evaluation\_window](#input\_cpu\_utilization\_anomaly\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_1h"` | no | +| [cpu\_utilization\_anomaly\_no\_data\_window](#input\_cpu\_utilization\_anomaly\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | +| [cpu\_utilization\_anomaly\_recovery\_window](#input\_cpu\_utilization\_anomaly\_recovery\_window) | Recovery window for anomaly monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_15m"` | no | +| [cpu\_utilization\_anomaly\_rollup](#input\_cpu\_utilization\_anomaly\_rollup) | Rollup interval (must be sized based on evaluation window/span and seasonaility) | `number` | `60` | no | +| [cpu\_utilization\_anomaly\_seasonality](#input\_cpu\_utilization\_anomaly\_seasonality) | Seasonaility (hourly, daily, weekly) | `string` | `"weekly"` | no | +| [cpu\_utilization\_anomaly\_threshold\_critical](#input\_cpu\_utilization\_anomaly\_threshold\_critical) | Critical threshold (percent) | `number` | `null` | no | +| [cpu\_utilization\_anomaly\_threshold\_warning](#input\_cpu\_utilization\_anomaly\_threshold\_warning) | Warning threshold (percent) | `number` | `null` | no | +| [cpu\_utilization\_anomaly\_trigger\_window](#input\_cpu\_utilization\_anomaly\_trigger\_window) | Trigger window for anomaly monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_1h"` | no | +| [cpu\_utilization\_enabled](#input\_cpu\_utilization\_enabled) | Enable CPU utilization monitor | `bool` | `false` | no | +| [cpu\_utilization\_evaluation\_window](#input\_cpu\_utilization\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | +| [cpu\_utilization\_no\_data\_window](#input\_cpu\_utilization\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | +| [cpu\_utilization\_threshold\_critical](#input\_cpu\_utilization\_threshold\_critical) | Critical threshold (percent) | `number` | `90` | no | +| [cpu\_utilization\_threshold\_warning](#input\_cpu\_utilization\_threshold\_warning) | Warning threshold (percent) | `number` | `80` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | | [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | -| [http\_5xx\_responses\_enabled](#input\_http\_5xx\_responses\_enabled) | Enable HTTP 5xx response monitor | `bool` | `false` | no | -| [http\_5xx\_responses\_evaluation\_window](#input\_http\_5xx\_responses\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | -| [http\_5xx\_responses\_no\_data\_window](#input\_http\_5xx\_responses\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [http\_5xx\_responses\_threshold\_critical](#input\_http\_5xx\_responses\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | -| [http\_5xx\_responses\_threshold\_warning](#input\_http\_5xx\_responses\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | -| [http\_5xx\_tg\_responses\_enabled](#input\_http\_5xx\_tg\_responses\_enabled) | Enable HTTP 5xx response monitor (target group) | `bool` | `false` | no | -| [http\_5xx\_tg\_responses\_evaluation\_window](#input\_http\_5xx\_tg\_responses\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | -| [http\_5xx\_tg\_responses\_no\_data\_window](#input\_http\_5xx\_tg\_responses\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [http\_5xx\_tg\_responses\_threshold\_critical](#input\_http\_5xx\_tg\_responses\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | -| [http\_5xx\_tg\_responses\_threshold\_warning](#input\_http\_5xx\_tg\_responses\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | -| [latency\_enabled](#input\_latency\_enabled) | Enable latency monitor | `bool` | `false` | no | -| [latency\_evaluation\_window](#input\_latency\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | -| [latency\_no\_data\_window](#input\_latency\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [latency\_threshold\_critical](#input\_latency\_threshold\_critical) | Critical threshold (seconds) | `number` | `null` | no | -| [latency\_threshold\_warning](#input\_latency\_threshold\_warning) | Warning threshold (seconds) | `number` | `null` | no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | -| [no\_healthy\_instances\_enabled](#input\_no\_healthy\_instances\_enabled) | Enable no healthy instances monitor | `bool` | `true` | no | -| [no\_healthy\_instances\_evaluation\_window](#input\_no\_healthy\_instances\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | -| [no\_healthy\_instances\_no\_data\_window](#input\_no\_healthy\_instances\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [no\_healthy\_instances\_threshold\_warning](#input\_no\_healthy\_instances\_threshold\_warning) | Warning threshold (percentage, 0 to disable) | `number` | `0` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | @@ -84,6 +90,11 @@ No modules. | [timeout\_h](#input\_timeout\_h) | Auto-resolve alert in specified hours if condition no longer matches | `number` | `0` | no | | [title\_prefix](#input\_title\_prefix) | Prefix all alerts with specified value in brackets | `string` | `null` | no | | [title\_suffix](#input\_title\_suffix) | Suffix all alerts with specified value in parenthesis | `string` | `null` | no | +| [used\_storage\_enabled](#input\_used\_storage\_enabled) | Enable used storage monitor | `bool` | `true` | no | +| [used\_storage\_evaluation\_window](#input\_used\_storage\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_15m"` | no | +| [used\_storage\_no\_data\_window](#input\_used\_storage\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | +| [used\_storage\_threshold\_critical](#input\_used\_storage\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `90` | no | +| [used\_storage\_threshold\_warning](#input\_used\_storage\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `80` | no | | [warn\_priority](#input\_warn\_priority) | Priority for alerts with no data (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | ## Outputs diff --git a/aws/sqs/README.md b/aws/sqs/README.md index 78b8d6e..10fdd7c 100644 --- a/aws/sqs/README.md +++ b/aws/sqs/README.md @@ -18,7 +18,7 @@ Configures the following for Lambda functions based on tag matches: | Name | Version | |------|---------| -| [datadog](#provider\_datadog) | >= 3.37 | +| [datadog](#provider\_datadog) | 3.44.0 | ## Modules @@ -28,10 +28,8 @@ No modules. | Name | Type | |------|------| -| [datadog_monitor.http_5xx_responses](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | -| [datadog_monitor.http_5xx_tg_responses](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | -| [datadog_monitor.latency](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | -| [datadog_monitor.no_healthy_instances](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | +| [datadog_monitor.oldest_message](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | +| [datadog_monitor.queue_depth](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | ## Inputs @@ -41,39 +39,30 @@ No modules. | [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | | [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | | [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | -| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:alb"
]
| no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:queue"
]
| no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | | [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | -| [http\_5xx\_responses\_enabled](#input\_http\_5xx\_responses\_enabled) | Enable HTTP 5xx response monitor | `bool` | `false` | no | -| [http\_5xx\_responses\_evaluation\_window](#input\_http\_5xx\_responses\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | -| [http\_5xx\_responses\_no\_data\_window](#input\_http\_5xx\_responses\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [http\_5xx\_responses\_threshold\_critical](#input\_http\_5xx\_responses\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | -| [http\_5xx\_responses\_threshold\_warning](#input\_http\_5xx\_responses\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | -| [http\_5xx\_tg\_responses\_enabled](#input\_http\_5xx\_tg\_responses\_enabled) | Enable HTTP 5xx response monitor (target group) | `bool` | `false` | no | -| [http\_5xx\_tg\_responses\_evaluation\_window](#input\_http\_5xx\_tg\_responses\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | -| [http\_5xx\_tg\_responses\_no\_data\_window](#input\_http\_5xx\_tg\_responses\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [http\_5xx\_tg\_responses\_threshold\_critical](#input\_http\_5xx\_tg\_responses\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | -| [http\_5xx\_tg\_responses\_threshold\_warning](#input\_http\_5xx\_tg\_responses\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | -| [latency\_enabled](#input\_latency\_enabled) | Enable latency monitor | `bool` | `false` | no | -| [latency\_evaluation\_window](#input\_latency\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | -| [latency\_no\_data\_window](#input\_latency\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [latency\_threshold\_critical](#input\_latency\_threshold\_critical) | Critical threshold (seconds) | `number` | `null` | no | -| [latency\_threshold\_warning](#input\_latency\_threshold\_warning) | Warning threshold (seconds) | `number` | `null` | no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | -| [no\_healthy\_instances\_enabled](#input\_no\_healthy\_instances\_enabled) | Enable no healthy instances monitor | `bool` | `true` | no | -| [no\_healthy\_instances\_evaluation\_window](#input\_no\_healthy\_instances\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | -| [no\_healthy\_instances\_no\_data\_window](#input\_no\_healthy\_instances\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [no\_healthy\_instances\_threshold\_warning](#input\_no\_healthy\_instances\_threshold\_warning) | Warning threshold (percentage, 0 to disable) | `number` | `0` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | | [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [oldest\_message\_enabled](#input\_oldest\_message\_enabled) | Enable oldest queued message monitor | `bool` | `false` | no | +| [oldest\_message\_evaluation\_window](#input\_oldest\_message\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | +| [oldest\_message\_no\_data\_window](#input\_oldest\_message\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | +| [oldest\_message\_threshold\_critical](#input\_oldest\_message\_threshold\_critical) | Critical threshold (seconds) | `number` | `75` | no | +| [oldest\_message\_threshold\_warning](#input\_oldest\_message\_threshold\_warning) | Warning threshold (seconds) | `number` | `null` | no | +| [queue\_depth\_enabled](#input\_queue\_depth\_enabled) | Enable queue depth count monitor | `bool` | `false` | no | +| [queue\_depth\_evaluation\_window](#input\_queue\_depth\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | +| [queue\_depth\_no\_data\_window](#input\_queue\_depth\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | +| [queue\_depth\_threshold\_critical](#input\_queue\_depth\_threshold\_critical) | Critical threshold (count) | `number` | `null` | no | +| [queue\_depth\_threshold\_warning](#input\_queue\_depth\_threshold\_warning) | Warning threshold (count) | `number` | `null` | no | | [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | diff --git a/aws/vpn/README.md b/aws/vpn/README.md index 06a3bb5..1f355c3 100644 --- a/aws/vpn/README.md +++ b/aws/vpn/README.md @@ -15,7 +15,7 @@ Configures up/down monitoring for VPN tunnels | Name | Version | |------|---------| -| [datadog](#provider\_datadog) | >= 3.37 | +| [datadog](#provider\_datadog) | 3.44.0 | ## Modules @@ -25,10 +25,7 @@ No modules. | Name | Type | |------|------| -| [datadog_monitor.http_5xx_responses](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | -| [datadog_monitor.http_5xx_tg_responses](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | -| [datadog_monitor.latency](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | -| [datadog_monitor.no_healthy_instances](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | +| [datadog_monitor.tunnel_state](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | ## Inputs @@ -38,33 +35,14 @@ No modules. | [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | | [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | | [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | -| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:alb"
]
| no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:vpn"
]
| no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | | [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | -| [http\_5xx\_responses\_enabled](#input\_http\_5xx\_responses\_enabled) | Enable HTTP 5xx response monitor | `bool` | `false` | no | -| [http\_5xx\_responses\_evaluation\_window](#input\_http\_5xx\_responses\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | -| [http\_5xx\_responses\_no\_data\_window](#input\_http\_5xx\_responses\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [http\_5xx\_responses\_threshold\_critical](#input\_http\_5xx\_responses\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | -| [http\_5xx\_responses\_threshold\_warning](#input\_http\_5xx\_responses\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | -| [http\_5xx\_tg\_responses\_enabled](#input\_http\_5xx\_tg\_responses\_enabled) | Enable HTTP 5xx response monitor (target group) | `bool` | `false` | no | -| [http\_5xx\_tg\_responses\_evaluation\_window](#input\_http\_5xx\_tg\_responses\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | -| [http\_5xx\_tg\_responses\_no\_data\_window](#input\_http\_5xx\_tg\_responses\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [http\_5xx\_tg\_responses\_threshold\_critical](#input\_http\_5xx\_tg\_responses\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | -| [http\_5xx\_tg\_responses\_threshold\_warning](#input\_http\_5xx\_tg\_responses\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | -| [latency\_enabled](#input\_latency\_enabled) | Enable latency monitor | `bool` | `false` | no | -| [latency\_evaluation\_window](#input\_latency\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | -| [latency\_no\_data\_window](#input\_latency\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [latency\_threshold\_critical](#input\_latency\_threshold\_critical) | Critical threshold (seconds) | `number` | `null` | no | -| [latency\_threshold\_warning](#input\_latency\_threshold\_warning) | Warning threshold (seconds) | `number` | `null` | no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | -| [no\_healthy\_instances\_enabled](#input\_no\_healthy\_instances\_enabled) | Enable no healthy instances monitor | `bool` | `true` | no | -| [no\_healthy\_instances\_evaluation\_window](#input\_no\_healthy\_instances\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | -| [no\_healthy\_instances\_no\_data\_window](#input\_no\_healthy\_instances\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [no\_healthy\_instances\_threshold\_warning](#input\_no\_healthy\_instances\_threshold\_warning) | Warning threshold (percentage, 0 to disable) | `number` | `0` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | @@ -78,6 +56,9 @@ No modules. | [timeout\_h](#input\_timeout\_h) | Auto-resolve alert in specified hours if condition no longer matches | `number` | `0` | no | | [title\_prefix](#input\_title\_prefix) | Prefix all alerts with specified value in brackets | `string` | `null` | no | | [title\_suffix](#input\_title\_suffix) | Suffix all alerts with specified value in parenthesis | `string` | `null` | no | +| [tunnel\_state\_enabled](#input\_tunnel\_state\_enabled) | Enable VPN tunnel state monitor | `bool` | `false` | no | +| [tunnel\_state\_evaluation\_window](#input\_tunnel\_state\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | +| [tunnel\_state\_no\_data\_window](#input\_tunnel\_state\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [warn\_priority](#input\_warn\_priority) | Priority for alerts with no data (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | ## Outputs From bb521753f85c44db047ed5b76cd8c9ac57389a6d Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 26 Sep 2024 13:41:54 -0400 Subject: [PATCH 48/77] Make env optional --- aws/alb/README.md | 2 +- aws/apigateway/README.md | 2 +- aws/beanstalk/README.md | 2 +- aws/ec2/README.md | 2 +- aws/ecs-cluster/README.md | 2 +- aws/ecs-fargate/README.md | 2 +- aws/ecs-service/README.md | 2 +- aws/elasticache/README.md | 2 +- aws/elasticsearch/README.md | 2 +- aws/elb/README.md | 2 +- aws/lambda/README.md | 2 +- aws/rds/README.md | 2 +- aws/sqs/README.md | 2 +- aws/vpn/README.md | 2 +- common/common.tf | 1 + 15 files changed, 15 insertions(+), 14 deletions(-) diff --git a/aws/alb/README.md b/aws/alb/README.md index 29522da..f3df56a 100644 --- a/aws/alb/README.md +++ b/aws/alb/README.md @@ -46,7 +46,7 @@ No modules. | [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:alb"
]
| no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | -| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | | [http\_5xx\_responses\_enabled](#input\_http\_5xx\_responses\_enabled) | Enable HTTP 5xx response monitor | `bool` | `false` | no | | [http\_5xx\_responses\_evaluation\_window](#input\_http\_5xx\_responses\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | diff --git a/aws/apigateway/README.md b/aws/apigateway/README.md index 2596f1f..5acf4df 100644 --- a/aws/apigateway/README.md +++ b/aws/apigateway/README.md @@ -42,7 +42,7 @@ No modules. | [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:apigateway"
]
| no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | -| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | | [http\_5xx\_responses\_enabled](#input\_http\_5xx\_responses\_enabled) | Enable HTTP 5xx response monitor | `bool` | `false` | no | | [http\_5xx\_responses\_evaluation\_window](#input\_http\_5xx\_responses\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | diff --git a/aws/beanstalk/README.md b/aws/beanstalk/README.md index b2527a1..15156eb 100644 --- a/aws/beanstalk/README.md +++ b/aws/beanstalk/README.md @@ -46,7 +46,7 @@ No modules. | [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:beanstalk"
]
| no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | -| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | | [health\_enabled](#input\_health\_enabled) | Enable Beanstalk health monitor (requires enhanced metrics) | `bool` | `false` | no | | [health\_evaluation\_window](#input\_health\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`) | `string` | `"last_5m"` | no | diff --git a/aws/ec2/README.md b/aws/ec2/README.md index 0051be3..de24d42 100644 --- a/aws/ec2/README.md +++ b/aws/ec2/README.md @@ -43,7 +43,7 @@ No modules. | [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:ec2"
]
| no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | -| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | diff --git a/aws/ecs-cluster/README.md b/aws/ecs-cluster/README.md index a118a66..99e2faf 100644 --- a/aws/ecs-cluster/README.md +++ b/aws/ecs-cluster/README.md @@ -65,7 +65,7 @@ No modules. | [cpu\_utilization\_threshold\_critical](#input\_cpu\_utilization\_threshold\_critical) | Critical threshold (percent) | `number` | `90` | no | | [cpu\_utilization\_threshold\_warning](#input\_cpu\_utilization\_threshold\_warning) | Warning threshold (percent) | `number` | `80` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | -| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | | [memory\_reservation\_enabled](#input\_memory\_reservation\_enabled) | Enable cluster memory reservation monitor | `bool` | `false` | no | | [memory\_reservation\_evaluation\_window](#input\_memory\_reservation\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_15m"` | no | diff --git a/aws/ecs-fargate/README.md b/aws/ecs-fargate/README.md index 31f78c5..eefe028 100644 --- a/aws/ecs-fargate/README.md +++ b/aws/ecs-fargate/README.md @@ -60,7 +60,7 @@ No modules. | [cpu\_utilization\_threshold\_critical](#input\_cpu\_utilization\_threshold\_critical) | Critical threshold (percent) | `number` | `90` | no | | [cpu\_utilization\_threshold\_warning](#input\_cpu\_utilization\_threshold\_warning) | Warning threshold (percent) | `number` | `80` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | -| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | | [fargate\_check\_enabled](#input\_fargate\_check\_enabled) | Enable Fargate check monitor | `bool` | `false` | no | | [fargate\_check\_evaluation\_window](#input\_fargate\_check\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | diff --git a/aws/ecs-service/README.md b/aws/ecs-service/README.md index 2c561e9..daa61ab 100644 --- a/aws/ecs-service/README.md +++ b/aws/ecs-service/README.md @@ -60,7 +60,7 @@ No modules. | [cpu\_utilization\_threshold\_critical](#input\_cpu\_utilization\_threshold\_critical) | Critical threshold (percent) | `string` | `90` | no | | [cpu\_utilization\_threshold\_warning](#input\_cpu\_utilization\_threshold\_warning) | Warning threshold (percent) | `number` | `80` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | -| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | | [memory\_utilization\_enabled](#input\_memory\_utilization\_enabled) | Enable Fargate task memory utilization monitor | `bool` | `false` | no | | [memory\_utilization\_evaluation\_window](#input\_memory\_utilization\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_15m"` | no | diff --git a/aws/elasticache/README.md b/aws/elasticache/README.md index 7bc29d2..086b2e9 100644 --- a/aws/elasticache/README.md +++ b/aws/elasticache/README.md @@ -68,7 +68,7 @@ No modules. | [cpu\_utilization\_threshold\_critical](#input\_cpu\_utilization\_threshold\_critical) | Critical threshold (percent) | `number` | `90` | no | | [cpu\_utilization\_threshold\_warning](#input\_cpu\_utilization\_threshold\_warning) | Warning threshold (percent) | `number` | `80` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | -| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | | [evictions\_enabled](#input\_evictions\_enabled) | Enable eviction rate monitor | `bool` | `false` | no | | [evictions\_evaluation\_window](#input\_evictions\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | diff --git a/aws/elasticsearch/README.md b/aws/elasticsearch/README.md index af4b2f6..82c49fc 100644 --- a/aws/elasticsearch/README.md +++ b/aws/elasticsearch/README.md @@ -68,7 +68,7 @@ No modules. | [cpu\_utilization\_threshold\_critical](#input\_cpu\_utilization\_threshold\_critical) | Critical threshold (percent) | `number` | `0.9` | no | | [cpu\_utilization\_threshold\_warning](#input\_cpu\_utilization\_threshold\_warning) | Warning threshold (percent) | `number` | `0.8` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | -| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | | [free\_storage\_enabled](#input\_free\_storage\_enabled) | Enable free storage monitor | `bool` | `true` | no | | [free\_storage\_evaluation\_window](#input\_free\_storage\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | diff --git a/aws/elb/README.md b/aws/elb/README.md index 6a0756a..776a272 100644 --- a/aws/elb/README.md +++ b/aws/elb/README.md @@ -46,7 +46,7 @@ No modules. | [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:lb"
]
| no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | -| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | | [http\_5xx\_backend\_responses\_enabled](#input\_http\_5xx\_backend\_responses\_enabled) | Enable HTTP 5xx response monitor (backend) | `bool` | `false` | no | | [http\_5xx\_backend\_responses\_evaluation\_window](#input\_http\_5xx\_backend\_responses\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | diff --git a/aws/lambda/README.md b/aws/lambda/README.md index f07e953..a7403c1 100644 --- a/aws/lambda/README.md +++ b/aws/lambda/README.md @@ -57,7 +57,7 @@ No modules. | [cold\_starts\_threshold\_warning](#input\_cold\_starts\_threshold\_warning) | Warning threshold (count) | `number` | `null` | no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | -| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [error\_rate\_enabled](#input\_error\_rate\_enabled) | Enable Lambda error rate monitor | `bool` | `false` | no | | [error\_rate\_evaluation\_window](#input\_error\_rate\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [error\_rate\_no\_data\_window](#input\_error\_rate\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | diff --git a/aws/rds/README.md b/aws/rds/README.md index 00f32b6..2f3e192 100644 --- a/aws/rds/README.md +++ b/aws/rds/README.md @@ -72,7 +72,7 @@ No modules. | [cpu\_utilization\_threshold\_critical](#input\_cpu\_utilization\_threshold\_critical) | Critical threshold (percent) | `number` | `90` | no | | [cpu\_utilization\_threshold\_warning](#input\_cpu\_utilization\_threshold\_warning) | Warning threshold (percent) | `number` | `80` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | -| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | diff --git a/aws/sqs/README.md b/aws/sqs/README.md index 10fdd7c..abd566f 100644 --- a/aws/sqs/README.md +++ b/aws/sqs/README.md @@ -42,7 +42,7 @@ No modules. | [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:queue"
]
| no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | -| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | diff --git a/aws/vpn/README.md b/aws/vpn/README.md index 1f355c3..9b9bab1 100644 --- a/aws/vpn/README.md +++ b/aws/vpn/README.md @@ -38,7 +38,7 @@ No modules. | [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:vpn"
]
| no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | -| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | diff --git a/common/common.tf b/common/common.tf index 14461a1..3ef2ead 100644 --- a/common/common.tf +++ b/common/common.tf @@ -10,6 +10,7 @@ variable "cost_center" { } variable "env" { + default = null description = "Environment the monitored resource is in (leave blank to omit tag)" type = string } From e9ac59dca675e5a91a8d045ba4391d1a3071a7c5 Mon Sep 17 00:00:00 2001 From: Kevin Date: Tue, 1 Oct 2024 12:26:37 -0400 Subject: [PATCH 49/77] Changing defaults --- aws/alb/main.tf | 4 ++-- aws/ecs-fargate/variables.tf | 2 +- aws/ecs-service/variables.tf | 8 ++++---- aws/elasticsearch/README.md | 8 ++++---- aws/elasticsearch/variables.tf | 12 ++++++------ aws/lambda/variables.tf | 10 +++++----- aws/rds/variables.tf | 4 ++-- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/aws/alb/main.tf b/aws/alb/main.tf index 30458f7..85d6c4d 100644 --- a/aws/alb/main.tf +++ b/aws/alb/main.tf @@ -72,7 +72,7 @@ END resource "datadog_monitor" "latency" { count = var.latency_enabled ? 1 : 0 - name = join("", [local.title_prefix, "{{loadbalancer.name}} ALB latency - {{value}}s ", local.title_suffix]) + name = join("", [local.title_prefix, "ALB latency - {{loadbalancer.name}} {{value}}s ", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -101,7 +101,7 @@ END resource "datadog_monitor" "no_healthy_instances" { count = var.no_healthy_instances_enabled ? 1 : 0 - name = join("", [local.title_prefix, "{{loadbalancer.name}} ALB healthy instances is at {{value}}%", local.title_suffix]) + name = join("", [local.title_prefix, "ALB available healthy instances - {{loadbalancer.name}} {{value}}%", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) diff --git a/aws/ecs-fargate/variables.tf b/aws/ecs-fargate/variables.tf index 844ddb0..bced0a0 100644 --- a/aws/ecs-fargate/variables.tf +++ b/aws/ecs-fargate/variables.tf @@ -17,7 +17,7 @@ variable "base_tags" { # Fargate Agent Status ######################################## variable "fargate_check_enabled" { - default = false + default = true description = "Enable Fargate check monitor" type = bool } diff --git a/aws/ecs-service/variables.tf b/aws/ecs-service/variables.tf index ba8fd6e..cd07eb5 100644 --- a/aws/ecs-service/variables.tf +++ b/aws/ecs-service/variables.tf @@ -17,7 +17,7 @@ variable "base_tags" { # ECS service running tasks ######################################## variable "running_tasks_enabled" { - default = false + default = true description = "Enable running tasks monitor" type = bool } @@ -35,7 +35,7 @@ variable "running_tasks_no_data_window" { } variable "running_tasks_threshold_critical" { - default = 0.25 + default = 0.50 description = "Critical threshold (percentage)" type = number } @@ -50,7 +50,7 @@ variable "running_tasks_threshold_warning" { # Service CPU Utilization ######################################## variable "cpu_utilization_enabled" { - default = false + default = true description = "Enable Fargate task CPU utilization monitor" type = bool } @@ -131,7 +131,7 @@ variable "cpu_utilization_anomaly_trigger_window" { } variable "cpu_utilization_anomaly_threshold_critical" { - default = null + default = 0.75 description = "Critical threshold (percent)" type = number } diff --git a/aws/elasticsearch/README.md b/aws/elasticsearch/README.md index 82c49fc..ddac429 100644 --- a/aws/elasticsearch/README.md +++ b/aws/elasticsearch/README.md @@ -45,10 +45,10 @@ No modules. | [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | | [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | | [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:elasticsearch"
]
| no | -| [cluster\_health\_red\_enabled](#input\_cluster\_health\_red\_enabled) | Enable cluster health\_red monitor | `bool` | `false` | no | +| [cluster\_health\_red\_enabled](#input\_cluster\_health\_red\_enabled) | Enable cluster health\_red monitor | `bool` | `true` | no | | [cluster\_health\_red\_evaluation\_window](#input\_cluster\_health\_red\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [cluster\_health\_red\_no\_data\_window](#input\_cluster\_health\_red\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [cluster\_health\_yellow\_enabled](#input\_cluster\_health\_yellow\_enabled) | Enable cluster health monitor | `bool` | `false` | no | +| [cluster\_health\_yellow\_enabled](#input\_cluster\_health\_yellow\_enabled) | Enable cluster health monitor | `bool` | `true` | no | | [cluster\_health\_yellow\_evaluation\_window](#input\_cluster\_health\_yellow\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [cluster\_health\_yellow\_no\_data\_window](#input\_cluster\_health\_yellow\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | @@ -73,8 +73,8 @@ No modules. | [free\_storage\_enabled](#input\_free\_storage\_enabled) | Enable free storage monitor | `bool` | `true` | no | | [free\_storage\_evaluation\_window](#input\_free\_storage\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [free\_storage\_no\_data\_window](#input\_free\_storage\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [free\_storage\_threshold\_critical](#input\_free\_storage\_threshold\_critical) | Critical threshold (GB) | `number` | `null` | no | -| [free\_storage\_threshold\_warning](#input\_free\_storage\_threshold\_warning) | Warning threshold (GB) | `number` | `null` | no | +| [free\_storage\_threshold\_critical](#input\_free\_storage\_threshold\_critical) | Critical threshold (%) | `number` | `90` | no | +| [free\_storage\_threshold\_warning](#input\_free\_storage\_threshold\_warning) | Warning threshold (%) | `number` | `80` | no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | diff --git a/aws/elasticsearch/variables.tf b/aws/elasticsearch/variables.tf index 971cdd4..166adfe 100644 --- a/aws/elasticsearch/variables.tf +++ b/aws/elasticsearch/variables.tf @@ -17,7 +17,7 @@ variable "base_tags" { # ElasticSearch cluster health (red) ######################################## variable "cluster_health_red_enabled" { - default = false + default = true description = "Enable cluster health_red monitor" type = bool } @@ -38,7 +38,7 @@ variable "cluster_health_red_no_data_window" { # ElasticSearch cluster health (yellow) ######################################## variable "cluster_health_yellow_enabled" { - default = false + default = true description = "Enable cluster health monitor" type = bool } @@ -173,13 +173,13 @@ variable "free_storage_evaluation_window" { } variable "free_storage_threshold_critical" { - default = null - description = "Critical threshold (GB)" + default = 90 + description = "Critical threshold for used disk space (%)" type = number } variable "free_storage_threshold_warning" { - default = null - description = "Warning threshold (GB)" + default = 80 + description = "Warning threshold for used disk space (%)" type = number } diff --git a/aws/lambda/variables.tf b/aws/lambda/variables.tf index 8aa64cc..c9eaa99 100644 --- a/aws/lambda/variables.tf +++ b/aws/lambda/variables.tf @@ -17,7 +17,7 @@ variable "base_tags" { # Lambda error rate ######################################## variable "error_rate_enabled" { - default = false + default = true description = "Enable Lambda error rate monitor" type = bool } @@ -50,7 +50,7 @@ variable "error_rate_threshold_warning" { # Lambda timeouts ######################################## variable "timeouts_enabled" { - default = false + default = true description = "Enable timeout count monitor" type = bool } @@ -116,7 +116,7 @@ variable "cold_starts_threshold_warning" { # OOM monitor ######################################## variable "out_of_memory_enabled" { - default = false + default = true description = "Enable out of memory monitor (requires enhanced metrics)" type = bool } @@ -134,7 +134,7 @@ variable "out_of_memory_no_data_window" { } variable "out_of_memory_threshold_critical" { - default = null + default = 5 description = "Critical threshold (count)" type = number } @@ -203,7 +203,7 @@ variable "iterator_age_forecast_no_data_window" { # Lambda throttle rate ######################################## variable "throttle_rate_enabled" { - default = false + default = true description = "Enable Lambda throttle rate monitor" type = bool } diff --git a/aws/rds/variables.tf b/aws/rds/variables.tf index 6e74aa4..fe8cabe 100644 --- a/aws/rds/variables.tf +++ b/aws/rds/variables.tf @@ -17,7 +17,7 @@ variable "base_tags" { # Connection Rate (anomaly detection) ######################################## variable "connection_count_anomaly_enabled" { - default = false + default = true description = "Enable CPU utilization anomaly monitor" type = bool } @@ -80,7 +80,7 @@ variable "connection_count_anomaly_threshold_warning" { # Node CPU Utilization ######################################## variable "cpu_utilization_enabled" { - default = false + default = true description = "Enable CPU utilization monitor" type = bool } From 9c677794390a16ba8e9138e630bb7a801a5a3022 Mon Sep 17 00:00:00 2001 From: Kevin Date: Wed, 2 Oct 2024 11:49:13 -0400 Subject: [PATCH 50/77] add datadog_critical, fix monitor names --- aws/alb/main.tf | 16 ++++++++-------- aws/apigateway/main.tf | 10 +++++----- aws/beanstalk/main.tf | 18 +++++++++--------- aws/ec2/main.tf | 8 ++++---- aws/ecs-cluster/main.tf | 8 ++++---- aws/ecs-fargate/main.tf | 14 +++++++------- aws/ecs-service/main.tf | 10 +++++----- aws/elasticache/main.tf | 14 +++++++------- aws/elasticsearch/main.tf | 14 +++++++------- aws/elb/main.tf | 24 ++++++++++++------------ aws/lambda/main.tf | 14 +++++++------- aws/rds/main.tf | 10 +++++----- aws/rds/variables.tf | 2 +- aws/sqs/main.tf | 4 ++-- aws/vpn/main.tf | 2 +- 15 files changed, 84 insertions(+), 84 deletions(-) diff --git a/aws/alb/main.tf b/aws/alb/main.tf index 85d6c4d..fb8d49f 100644 --- a/aws/alb/main.tf +++ b/aws/alb/main.tf @@ -27,8 +27,8 @@ resource "datadog_monitor" "http_5xx_responses" { query = < ${var.http_5xx_responses_threshold_critical} END @@ -57,8 +57,8 @@ resource "datadog_monitor" "http_5xx_tg_responses" { query = < ${var.http_5xx_tg_responses_threshold_critical} END @@ -88,7 +88,7 @@ resource "datadog_monitor" "latency" { query = < ${var.latency_threshold_critical} END @@ -117,9 +117,9 @@ resource "datadog_monitor" "no_healthy_instances" { query = < ${var.http_5xx_responses_threshold_critical} END @@ -41,7 +41,7 @@ END resource "datadog_monitor" "latency" { count = var.latency_enabled ? 1 : 0 - name = join("", [local.title_prefix, "API Gateway latency - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "API Gateway latency - {{apiname.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -57,7 +57,7 @@ resource "datadog_monitor" "latency" { query = < ${var.latency_threshold_critical} END diff --git a/aws/beanstalk/main.tf b/aws/beanstalk/main.tf index f55018b..8f907f9 100644 --- a/aws/beanstalk/main.tf +++ b/aws/beanstalk/main.tf @@ -24,7 +24,7 @@ locals { resource "datadog_monitor" "health" { count = var.health_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Beanstalk Health Events - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "Beanstalk Health Events - {{environmentname.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -40,7 +40,7 @@ resource "datadog_monitor" "health" { query = <= ${var.health_threshold_critical} END @@ -53,7 +53,7 @@ END resource "datadog_monitor" "http_5xx_responses" { count = var.http_5xx_responses_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ALB 5xx Responses - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "ALB 5xx Responses - {{environmentname.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -69,8 +69,8 @@ resource "datadog_monitor" "http_5xx_responses" { query = < ${var.http_5xx_responses_threshold_critical} END @@ -83,7 +83,7 @@ END resource "datadog_monitor" "latency" { count = var.latency_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Beanstalk Latency - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "Beanstalk Latency - {{environmentname.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -98,7 +98,7 @@ resource "datadog_monitor" "latency" { timeout_h = var.timeout_h query = <= ${var.latency_threshold_critical} END @@ -111,7 +111,7 @@ END resource "datadog_monitor" "root_disk_usage" { count = var.root_disk_usage_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Beanstalk Instance Root Disk Usage - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "Beanstalk Instance Root Disk Usage - {{environmentname.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -127,7 +127,7 @@ resource "datadog_monitor" "root_disk_usage" { query = <= ${var.root_disk_usage_threshold_critical} END diff --git a/aws/ec2/main.tf b/aws/ec2/main.tf index 3a75582..4c856e7 100644 --- a/aws/ec2/main.tf +++ b/aws/ec2/main.tf @@ -26,7 +26,7 @@ resource "datadog_monitor" "status_failed_check" { query = <= 1 END @@ -53,7 +53,7 @@ resource "datadog_monitor" "status_failed_instance" { query = <= 1 END @@ -80,7 +80,7 @@ resource "datadog_monitor" "status_failed_system" { query = <= 1 END @@ -107,7 +107,7 @@ resource "datadog_monitor" "status_failed_volume" { query = <= 1 END diff --git a/aws/ecs-cluster/main.tf b/aws/ecs-cluster/main.tf index 82da113..879c368 100644 --- a/aws/ecs-cluster/main.tf +++ b/aws/ecs-cluster/main.tf @@ -27,7 +27,7 @@ resource "datadog_monitor" "agent_status" { timeout_h = var.timeout_h query = < ${var.cpu_utilization_threshold_critical} END @@ -84,7 +84,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { query = <= ${var.cpu_utilization_anomaly_threshold_critical} @@ -120,7 +120,7 @@ resource "datadog_monitor" "memory_reservation" { query = < ${var.memory_reservation_threshold_critical} END diff --git a/aws/ecs-fargate/main.tf b/aws/ecs-fargate/main.tf index 7bd1431..4ff73b6 100644 --- a/aws/ecs-fargate/main.tf +++ b/aws/ecs-fargate/main.tf @@ -40,7 +40,7 @@ END resource "datadog_monitor" "cpu_utilization" { count = var.cpu_utilization_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ECS Fargate task CPU utilization", local.title_suffix]) + name = join("", [local.title_prefix, "ECS Fargate task CPU utilization - {{ecs_cluster}} ({{task_family}})", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -56,7 +56,7 @@ resource "datadog_monitor" "cpu_utilization" { query = < ${var.cpu_utilization_threshold_critical} END @@ -69,7 +69,7 @@ END resource "datadog_monitor" "cpu_utilization_anomaly" { count = var.cpu_utilization_anomaly_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ECS service CPU utilization anomalous activity", local.title_suffix]) + name = join("", [local.title_prefix, "ECS service CPU utilization anomalous activity - {{ecs_cluster}} ({{task_family}})", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -85,7 +85,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { query = <= ${var.cpu_utilization_anomaly_threshold_critical} @@ -105,7 +105,7 @@ END resource "datadog_monitor" "memory_utilization" { count = var.memory_utilization_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ECS Fargate task memory utilization", local.title_suffix]) + name = join("", [local.title_prefix, "ECS Fargate task memory utilization - {{ecs_cluster}} ({{task_family}})", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -121,8 +121,8 @@ resource "datadog_monitor" "memory_utilization" { query = <= ${var.memory_utilization_threshold_critical} END diff --git a/aws/ecs-service/main.tf b/aws/ecs-service/main.tf index 0365e9b..5107c84 100644 --- a/aws/ecs-service/main.tf +++ b/aws/ecs-service/main.tf @@ -28,8 +28,8 @@ resource "datadog_monitor" "running_tasks" { query = <= ${var.cpu_utilization_threshold_critical} END @@ -87,7 +87,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { query = <= ${var.cpu_utilization_anomaly_threshold_critical} @@ -123,7 +123,7 @@ resource "datadog_monitor" "memory_utilization" { query = <= ${var.memory_utilization_threshold_critical} END diff --git a/aws/elasticache/main.tf b/aws/elasticache/main.tf index 3f7c8a5..b2b5007 100644 --- a/aws/elasticache/main.tf +++ b/aws/elasticache/main.tf @@ -27,7 +27,7 @@ resource "datadog_monitor" "cpu_utilization" { query = <= ${var.cpu_utilization_threshold_critical} END @@ -56,7 +56,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { query = <= ${var.cpu_utilization_anomaly_threshold_critical} @@ -86,7 +86,7 @@ resource "datadog_monitor" "evictions" { query = <= ${var.evictions_threshold_critical} END @@ -115,7 +115,7 @@ resource "datadog_monitor" "hit_rate" { query = <= ${var.hit_rate_threshold_critical} END @@ -144,7 +144,7 @@ resource "datadog_monitor" "hit_rate_anomaly" { query = <= ${var.hit_rate_anomaly_threshold_critical} @@ -174,7 +174,7 @@ resource "datadog_monitor" "max_connections" { query = <= ${var.max_connections_threshold_critical} END @@ -203,7 +203,7 @@ resource "datadog_monitor" "swap_usage" { query = <= 1 END @@ -55,7 +55,7 @@ resource "datadog_monitor" "cluster_health_yellow" { query = <= 1 END @@ -83,7 +83,7 @@ resource "datadog_monitor" "cpu_utilization" { query = <= ${var.cpu_utilization_threshold_critical} END @@ -147,10 +147,10 @@ resource "datadog_monitor" "free_storage" { timeout_h = var.timeout_h query = < ${var.free_storage_threshold_critical} EOQ diff --git a/aws/elb/main.tf b/aws/elb/main.tf index 182c7e2..b1a0a9c 100644 --- a/aws/elb/main.tf +++ b/aws/elb/main.tf @@ -11,7 +11,7 @@ locals { resource "datadog_monitor" "http_5xx_responses" { count = var.http_5xx_responses_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ELB 5xx Responses - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "ELB 5xx Responses - {{loadbalancername.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -27,8 +27,8 @@ resource "datadog_monitor" "http_5xx_responses" { query = < ${var.http_5xx_responses_threshold_critical} END @@ -41,7 +41,7 @@ END resource "datadog_monitor" "http_5xx_backend_responses" { count = var.http_5xx_backend_responses_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ELB Backend 5xx Responses - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "ELB Backend 5xx Responses - {{loadbalancername.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -57,8 +57,8 @@ resource "datadog_monitor" "http_5xx_backend_responses" { query = < ${var.http_5xx_backend_responses_threshold_critical} END @@ -72,7 +72,7 @@ END resource "datadog_monitor" "latency" { count = var.latency_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ELB backend latency - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "ELB backend latency - {{loadbalancername.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -88,7 +88,7 @@ resource "datadog_monitor" "latency" { query = < ${var.latency_threshold_critical} END @@ -101,7 +101,7 @@ END resource "datadog_monitor" "no_healthy_instances" { count = var.no_healthy_instances_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ALB healthy instances - {{host.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "ALB healthy instances - {{loadbalancername.name}}", local.title_suffix]) include_tags = true message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -117,9 +117,9 @@ resource "datadog_monitor" "no_healthy_instances" { query = < ${var.error_rate_threshold_critical} END @@ -59,8 +59,8 @@ resource "datadog_monitor" "timeouts" { query = < ${var.timeouts_threshold_critical} END @@ -89,8 +89,8 @@ resource "datadog_monitor" "cold_starts" { query = < ${var.cold_starts_threshold_critical} END @@ -149,7 +149,7 @@ resource "datadog_monitor" "iterator_age" { query = < ${var.iterator_age_threshold_critical} END diff --git a/aws/rds/main.tf b/aws/rds/main.tf index bbb3292..0668c52 100644 --- a/aws/rds/main.tf +++ b/aws/rds/main.tf @@ -27,7 +27,7 @@ resource "datadog_monitor" "connection_count_anomaly" { query = <= ${var.connection_count_anomaly_threshold_critical} @@ -63,7 +63,7 @@ resource "datadog_monitor" "cpu_utilization" { query = <= ${var.cpu_utilization_threshold_critical} END @@ -92,7 +92,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { query = <= ${var.cpu_utilization_anomaly_threshold_critical} @@ -129,8 +129,8 @@ resource "datadog_monitor" "used_storage" { query = <= ${var.used_storage_threshold_critical} END diff --git a/aws/rds/variables.tf b/aws/rds/variables.tf index fe8cabe..1ac8ab5 100644 --- a/aws/rds/variables.tf +++ b/aws/rds/variables.tf @@ -65,7 +65,7 @@ variable "connection_count_anomaly_trigger_window" { } variable "connection_count_anomaly_threshold_critical" { - default = null + default = 0.75 description = "Critical threshold (percent)" type = number } diff --git a/aws/sqs/main.tf b/aws/sqs/main.tf index edbfc91..579f9bd 100644 --- a/aws/sqs/main.tf +++ b/aws/sqs/main.tf @@ -27,7 +27,7 @@ resource "datadog_monitor" "oldest_message" { query = < ${var.oldest_message_threshold_critical} END @@ -56,7 +56,7 @@ resource "datadog_monitor" "queue_depth" { query = < ${var.queue_depth_threshold_critical} END diff --git a/aws/vpn/main.tf b/aws/vpn/main.tf index 304e91b..6d9bfc2 100644 --- a/aws/vpn/main.tf +++ b/aws/vpn/main.tf @@ -27,7 +27,7 @@ resource "datadog_monitor" "tunnel_state" { query = < Date: Thu, 3 Oct 2024 13:16:34 -0400 Subject: [PATCH 51/77] change to datadog_managed tag and don't include tags --- aws/alb/main.tf | 24 ++++++++++++------------ aws/apigateway/main.tf | 10 +++++----- aws/beanstalk/main.tf | 18 +++++++++--------- aws/ec2/main.tf | 16 ++++++++-------- aws/ecs-cluster/main.tf | 16 ++++++++-------- aws/ecs-fargate/main.tf | 16 ++++++++-------- aws/ecs-service/main.tf | 18 +++++++++--------- aws/elasticache/main.tf | 28 ++++++++++++++-------------- aws/elasticsearch/main.tf | 22 +++++++++++----------- aws/elb/main.tf | 24 ++++++++++++------------ aws/lambda/main.tf | 28 ++++++++++++++-------------- aws/rds/main.tf | 18 +++++++++--------- aws/sqs/main.tf | 8 ++++---- aws/vpn/main.tf | 4 ++-- 14 files changed, 125 insertions(+), 125 deletions(-) diff --git a/aws/alb/main.tf b/aws/alb/main.tf index fb8d49f..a771c77 100644 --- a/aws/alb/main.tf +++ b/aws/alb/main.tf @@ -12,7 +12,7 @@ resource "datadog_monitor" "http_5xx_responses" { count = var.http_5xx_responses_enabled ? 1 : 0 name = join("", [local.title_prefix, "ALB 5xx Responses - {{loadbalancer.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -27,8 +27,8 @@ resource "datadog_monitor" "http_5xx_responses" { query = < ${var.http_5xx_responses_threshold_critical} END @@ -42,7 +42,7 @@ resource "datadog_monitor" "http_5xx_tg_responses" { count = var.http_5xx_tg_responses_enabled ? 1 : 0 name = join("", [local.title_prefix, "ALB Target Group 5xx Responses - {{loadbalancer.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -57,8 +57,8 @@ resource "datadog_monitor" "http_5xx_tg_responses" { query = < ${var.http_5xx_tg_responses_threshold_critical} END @@ -73,7 +73,7 @@ resource "datadog_monitor" "latency" { count = var.latency_enabled ? 1 : 0 name = join("", [local.title_prefix, "ALB latency - {{loadbalancer.name}} {{value}}s ", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -88,7 +88,7 @@ resource "datadog_monitor" "latency" { query = < ${var.latency_threshold_critical} END @@ -102,7 +102,7 @@ resource "datadog_monitor" "no_healthy_instances" { count = var.no_healthy_instances_enabled ? 1 : 0 name = join("", [local.title_prefix, "ALB available healthy instances - {{loadbalancer.name}} {{value}}%", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -117,9 +117,9 @@ resource "datadog_monitor" "no_healthy_instances" { query = < ${var.http_5xx_responses_threshold_critical} END @@ -42,7 +42,7 @@ resource "datadog_monitor" "latency" { count = var.latency_enabled ? 1 : 0 name = join("", [local.title_prefix, "API Gateway latency - {{apiname.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -57,7 +57,7 @@ resource "datadog_monitor" "latency" { query = < ${var.latency_threshold_critical} END diff --git a/aws/beanstalk/main.tf b/aws/beanstalk/main.tf index 8f907f9..26bbb60 100644 --- a/aws/beanstalk/main.tf +++ b/aws/beanstalk/main.tf @@ -25,7 +25,7 @@ resource "datadog_monitor" "health" { count = var.health_enabled ? 1 : 0 name = join("", [local.title_prefix, "Beanstalk Health Events - {{environmentname.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "metric alert" @@ -40,7 +40,7 @@ resource "datadog_monitor" "health" { query = <= ${var.health_threshold_critical} END @@ -54,7 +54,7 @@ resource "datadog_monitor" "http_5xx_responses" { count = var.http_5xx_responses_enabled ? 1 : 0 name = join("", [local.title_prefix, "ALB 5xx Responses - {{environmentname.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -69,8 +69,8 @@ resource "datadog_monitor" "http_5xx_responses" { query = < ${var.http_5xx_responses_threshold_critical} END @@ -84,7 +84,7 @@ resource "datadog_monitor" "latency" { count = var.latency_enabled ? 1 : 0 name = join("", [local.title_prefix, "Beanstalk Latency - {{environmentname.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -98,7 +98,7 @@ resource "datadog_monitor" "latency" { timeout_h = var.timeout_h query = <= ${var.latency_threshold_critical} END @@ -112,7 +112,7 @@ resource "datadog_monitor" "root_disk_usage" { count = var.root_disk_usage_enabled ? 1 : 0 name = join("", [local.title_prefix, "Beanstalk Instance Root Disk Usage - {{environmentname.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -127,7 +127,7 @@ resource "datadog_monitor" "root_disk_usage" { query = <= ${var.root_disk_usage_threshold_critical} END diff --git a/aws/ec2/main.tf b/aws/ec2/main.tf index 4c856e7..7772c28 100644 --- a/aws/ec2/main.tf +++ b/aws/ec2/main.tf @@ -12,7 +12,7 @@ resource "datadog_monitor" "status_failed_check" { count = var.status_failed_check_enabled ? 1 : 0 name = join("", [local.title_prefix, "EC2 instance status - status check failure - {{name.name}}({{instance_id.name}})", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -26,7 +26,7 @@ resource "datadog_monitor" "status_failed_check" { query = <= 1 END @@ -39,7 +39,7 @@ resource "datadog_monitor" "status_failed_instance" { count = var.status_failed_instance_enabled ? 1 : 0 name = join("", [local.title_prefix, "EC2 instance status - instance failure - {{name.name}}({{instance_id.name}})", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -53,7 +53,7 @@ resource "datadog_monitor" "status_failed_instance" { query = <= 1 END @@ -66,7 +66,7 @@ resource "datadog_monitor" "status_failed_system" { count = var.status_failed_system_enabled ? 1 : 0 name = join("", [local.title_prefix, "EC2 instance status - host failure - {{name.name}}({{instance_id.name}})", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -80,7 +80,7 @@ resource "datadog_monitor" "status_failed_system" { query = <= 1 END @@ -93,7 +93,7 @@ resource "datadog_monitor" "status_failed_volume" { count = var.status_failed_volume_enabled ? 1 : 0 name = join("", [local.title_prefix, "EC2 instance status - volume failure - {{name.name}}({{instance_id.name}})", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -107,7 +107,7 @@ resource "datadog_monitor" "status_failed_volume" { query = <= 1 END diff --git a/aws/ecs-cluster/main.tf b/aws/ecs-cluster/main.tf index 879c368..28906b1 100644 --- a/aws/ecs-cluster/main.tf +++ b/aws/ecs-cluster/main.tf @@ -13,7 +13,7 @@ resource "datadog_monitor" "agent_status" { count = var.agent_status_enabled ? 1 : 0 name = join("", [local.title_prefix, "ECS Agent disconnected - {{clustername.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "service check" @@ -27,7 +27,7 @@ resource "datadog_monitor" "agent_status" { timeout_h = var.timeout_h query = < ${var.cpu_utilization_threshold_critical} END @@ -69,7 +69,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { count = var.cpu_utilization_anomaly_enabled ? 1 : 0 name = join("", [local.title_prefix, "ECS cluster CPU utilization anomalous activity - {{clustername.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -84,7 +84,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { query = <= ${var.cpu_utilization_anomaly_threshold_critical} @@ -105,7 +105,7 @@ resource "datadog_monitor" "memory_reservation" { count = var.memory_reservation_enabled ? 1 : 0 name = join("", [local.title_prefix, "ECS Cluster Memory Reservation High - {{clustername.name}} - {{value}}%", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -120,7 +120,7 @@ resource "datadog_monitor" "memory_reservation" { query = < ${var.memory_reservation_threshold_critical} END diff --git a/aws/ecs-fargate/main.tf b/aws/ecs-fargate/main.tf index 4ff73b6..1425541 100644 --- a/aws/ecs-fargate/main.tf +++ b/aws/ecs-fargate/main.tf @@ -13,7 +13,7 @@ resource "datadog_monitor" "fargate_check" { count = var.fargate_check_enabled ? 1 : 0 name = join("", [local.title_prefix, "Fargate service not responding", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "service check" @@ -41,7 +41,7 @@ resource "datadog_monitor" "cpu_utilization" { count = var.cpu_utilization_enabled ? 1 : 0 name = join("", [local.title_prefix, "ECS Fargate task CPU utilization - {{ecs_cluster}} ({{task_family}})", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -56,7 +56,7 @@ resource "datadog_monitor" "cpu_utilization" { query = < ${var.cpu_utilization_threshold_critical} END @@ -70,7 +70,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { count = var.cpu_utilization_anomaly_enabled ? 1 : 0 name = join("", [local.title_prefix, "ECS service CPU utilization anomalous activity - {{ecs_cluster}} ({{task_family}})", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -85,7 +85,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { query = <= ${var.cpu_utilization_anomaly_threshold_critical} @@ -106,7 +106,7 @@ resource "datadog_monitor" "memory_utilization" { count = var.memory_utilization_enabled ? 1 : 0 name = join("", [local.title_prefix, "ECS Fargate task memory utilization - {{ecs_cluster}} ({{task_family}})", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -121,8 +121,8 @@ resource "datadog_monitor" "memory_utilization" { query = <= ${var.memory_utilization_threshold_critical} END diff --git a/aws/ecs-service/main.tf b/aws/ecs-service/main.tf index 5107c84..225cb7e 100644 --- a/aws/ecs-service/main.tf +++ b/aws/ecs-service/main.tf @@ -13,7 +13,7 @@ resource "datadog_monitor" "running_tasks" { count = var.running_tasks_enabled ? 1 : 0 name = join("", [local.title_prefix, "ECS service failed tasks - {{servicename.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -28,8 +28,8 @@ resource "datadog_monitor" "running_tasks" { query = <= ${var.cpu_utilization_threshold_critical} END @@ -72,7 +72,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { count = var.cpu_utilization_anomaly_enabled ? 1 : 0 name = join("", [local.title_prefix, "ECS service CPU utilization anomalous activity - {{servicename.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -87,7 +87,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { query = <= ${var.cpu_utilization_anomaly_threshold_critical} @@ -108,7 +108,7 @@ resource "datadog_monitor" "memory_utilization" { count = var.memory_utilization_enabled ? 1 : 0 name = join("", [local.title_prefix, "ECS Service memory utilization - {{servicename.name}} - {{value}}%", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -123,7 +123,7 @@ resource "datadog_monitor" "memory_utilization" { query = <= ${var.memory_utilization_threshold_critical} END diff --git a/aws/elasticache/main.tf b/aws/elasticache/main.tf index b2b5007..5eb5688 100644 --- a/aws/elasticache/main.tf +++ b/aws/elasticache/main.tf @@ -12,7 +12,7 @@ resource "datadog_monitor" "cpu_utilization" { count = var.cpu_utilization_enabled ? 1 : 0 name = join("", [local.title_prefix, "Elasticache CPU Utilization - {{cacheclusterid.name}} - {{value}}%", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -27,7 +27,7 @@ resource "datadog_monitor" "cpu_utilization" { query = <= ${var.cpu_utilization_threshold_critical} END @@ -41,7 +41,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { count = var.cpu_utilization_anomaly_enabled ? 1 : 0 name = join("", [local.title_prefix, "Elasticache CPU utilization anomalous activity - {{cacheclusterid.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -56,7 +56,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { query = <= ${var.cpu_utilization_anomaly_threshold_critical} @@ -71,7 +71,7 @@ resource "datadog_monitor" "evictions" { count = var.evictions_enabled ? 1 : 0 name = join("", [local.title_prefix, "Elasticache evictions - {{cacheclusterid.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -86,7 +86,7 @@ resource "datadog_monitor" "evictions" { query = <= ${var.evictions_threshold_critical} END @@ -100,7 +100,7 @@ resource "datadog_monitor" "hit_rate" { count = var.hit_rate_enabled ? 1 : 0 name = join("", [local.title_prefix, "Elasticache cache hit rate - {{cacheclusterid.name}} - {{value}}% ", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -115,7 +115,7 @@ resource "datadog_monitor" "hit_rate" { query = <= ${var.hit_rate_threshold_critical} END @@ -129,7 +129,7 @@ resource "datadog_monitor" "hit_rate_anomaly" { count = var.hit_rate_anomaly_enabled ? 1 : 0 name = join("", [local.title_prefix, "Elasticache cache hit rate anomalous activity - {{cacheclusterid.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -144,7 +144,7 @@ resource "datadog_monitor" "hit_rate_anomaly" { query = <= ${var.hit_rate_anomaly_threshold_critical} @@ -159,7 +159,7 @@ resource "datadog_monitor" "max_connections" { count = var.max_connections_enabled ? 1 : 0 name = join("", [local.title_prefix, "Elasticache max connections reached - {{cacheclusterid.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -174,7 +174,7 @@ resource "datadog_monitor" "max_connections" { query = <= ${var.max_connections_threshold_critical} END @@ -188,7 +188,7 @@ resource "datadog_monitor" "swap_usage" { count = var.swap_usage_enabled ? 1 : 0 name = join("", [local.title_prefix, "Elasticache swap usage - {{cacheclusterid.name}} - {{value}}MB", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -203,7 +203,7 @@ resource "datadog_monitor" "swap_usage" { query = <= 1 END @@ -40,7 +40,7 @@ resource "datadog_monitor" "cluster_health_yellow" { count = var.cluster_health_yellow_enabled ? 1 : 0 name = join("", [local.title_prefix, "ElasticSearch cluster health yellow - {{name.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -55,7 +55,7 @@ resource "datadog_monitor" "cluster_health_yellow" { query = <= 1 END @@ -68,7 +68,7 @@ resource "datadog_monitor" "cpu_utilization" { count = var.cpu_utilization_enabled ? 1 : 0 name = join("", [local.title_prefix, "ElasticSearch CPU Utilization - {{name.name}} - {{value}}%", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -83,7 +83,7 @@ resource "datadog_monitor" "cpu_utilization" { query = <= ${var.cpu_utilization_threshold_critical} END @@ -97,7 +97,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { count = var.cpu_utilization_anomaly_enabled ? 1 : 0 name = join("", [local.title_prefix, "ElasticSearch CPU utilization anomalous activity - {{name.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -133,7 +133,7 @@ resource "datadog_monitor" "free_storage" { count = var.free_storage_enabled ? 1 : 0 name = join("", [local.title_prefix, "ElasticSearch cluster storage - {{name.name}} - {{value}}% used", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -148,9 +148,9 @@ resource "datadog_monitor" "free_storage" { query = < ${var.free_storage_threshold_critical} EOQ diff --git a/aws/elb/main.tf b/aws/elb/main.tf index b1a0a9c..428a10f 100644 --- a/aws/elb/main.tf +++ b/aws/elb/main.tf @@ -12,7 +12,7 @@ resource "datadog_monitor" "http_5xx_responses" { count = var.http_5xx_responses_enabled ? 1 : 0 name = join("", [local.title_prefix, "ELB 5xx Responses - {{loadbalancername.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -27,8 +27,8 @@ resource "datadog_monitor" "http_5xx_responses" { query = < ${var.http_5xx_responses_threshold_critical} END @@ -42,7 +42,7 @@ resource "datadog_monitor" "http_5xx_backend_responses" { count = var.http_5xx_backend_responses_enabled ? 1 : 0 name = join("", [local.title_prefix, "ELB Backend 5xx Responses - {{loadbalancername.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -57,8 +57,8 @@ resource "datadog_monitor" "http_5xx_backend_responses" { query = < ${var.http_5xx_backend_responses_threshold_critical} END @@ -73,7 +73,7 @@ resource "datadog_monitor" "latency" { count = var.latency_enabled ? 1 : 0 name = join("", [local.title_prefix, "ELB backend latency - {{loadbalancername.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -88,7 +88,7 @@ resource "datadog_monitor" "latency" { query = < ${var.latency_threshold_critical} END @@ -102,7 +102,7 @@ resource "datadog_monitor" "no_healthy_instances" { count = var.no_healthy_instances_enabled ? 1 : 0 name = join("", [local.title_prefix, "ALB healthy instances - {{loadbalancername.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -117,9 +117,9 @@ resource "datadog_monitor" "no_healthy_instances" { query = < ${var.error_rate_threshold_critical} END @@ -44,7 +44,7 @@ resource "datadog_monitor" "timeouts" { count = var.timeouts_enabled ? 1 : 0 name = join("", [local.title_prefix, "Lambda timeouts - {{functionname.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -59,8 +59,8 @@ resource "datadog_monitor" "timeouts" { query = < ${var.timeouts_threshold_critical} END @@ -74,7 +74,7 @@ resource "datadog_monitor" "cold_starts" { count = var.cold_starts_enabled ? 1 : 0 name = join("", [local.title_prefix, "Lambda cold starts - {{functionname.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -89,8 +89,8 @@ resource "datadog_monitor" "cold_starts" { query = < ${var.cold_starts_threshold_critical} END @@ -104,7 +104,7 @@ resource "datadog_monitor" "out_of_memory" { count = var.out_of_memory_enabled ? 1 : 0 name = join("", [local.title_prefix, "Lambda out of memory - {{functionname.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -134,7 +134,7 @@ resource "datadog_monitor" "iterator_age" { count = var.iterator_age_enabled ? 1 : 0 name = join("", [local.title_prefix, "Lambda iterator age - {{functionname.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -149,7 +149,7 @@ resource "datadog_monitor" "iterator_age" { query = < ${var.iterator_age_threshold_critical} END @@ -163,7 +163,7 @@ resource "datadog_monitor" "iterator_age_forecast" { count = var.iterator_age_forecast_enabled ? 1 : 0 name = join("", [local.title_prefix, "Lambda stream data loss forecasted - {{functionname.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -191,7 +191,7 @@ resource "datadog_monitor" "throttle_rate" { count = var.throttle_rate_enabled ? 1 : 0 name = join("", [local.title_prefix, "Lambda throttle rate - {{functionname.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" diff --git a/aws/rds/main.tf b/aws/rds/main.tf index 0668c52..4211915 100644 --- a/aws/rds/main.tf +++ b/aws/rds/main.tf @@ -12,7 +12,7 @@ resource "datadog_monitor" "connection_count_anomaly" { count = var.connection_count_anomaly_enabled ? 1 : 0 name = join("", [local.title_prefix, "RDS connection count anomalous activity - {{dbinstanceidentifier.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -27,7 +27,7 @@ resource "datadog_monitor" "connection_count_anomaly" { query = <= ${var.connection_count_anomaly_threshold_critical} @@ -48,7 +48,7 @@ resource "datadog_monitor" "cpu_utilization" { count = var.cpu_utilization_enabled ? 1 : 0 name = join("", [local.title_prefix, "RDS CPU Utilization - {{dbinstanceidentifier.name}} - {{value}}%", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -63,7 +63,7 @@ resource "datadog_monitor" "cpu_utilization" { query = <= ${var.cpu_utilization_threshold_critical} END @@ -77,7 +77,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { count = var.cpu_utilization_anomaly_enabled ? 1 : 0 name = join("", [local.title_prefix, "RDS CPU utilization anomalous activity - {{dbinstanceidentifier.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -92,7 +92,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { query = <= ${var.cpu_utilization_anomaly_threshold_critical} @@ -113,7 +113,7 @@ resource "datadog_monitor" "used_storage" { count = var.used_storage_enabled ? 1 : 0 name = join("", [local.title_prefix, "RDS instance storage - {{dbinstanceidentifier.name}} - {{value}}% used", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -129,8 +129,8 @@ resource "datadog_monitor" "used_storage" { query = <= ${var.used_storage_threshold_critical} END diff --git a/aws/sqs/main.tf b/aws/sqs/main.tf index 579f9bd..db17ca6 100644 --- a/aws/sqs/main.tf +++ b/aws/sqs/main.tf @@ -12,7 +12,7 @@ resource "datadog_monitor" "oldest_message" { count = var.oldest_message_enabled ? 1 : 0 name = join("", [local.title_prefix, "Oldest queued message - {{queuename.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -27,7 +27,7 @@ resource "datadog_monitor" "oldest_message" { query = < ${var.oldest_message_threshold_critical} END @@ -41,7 +41,7 @@ resource "datadog_monitor" "queue_depth" { count = var.queue_depth_enabled ? 1 : 0 name = join("", [local.title_prefix, "Queue depth - {{queuename.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -56,7 +56,7 @@ resource "datadog_monitor" "queue_depth" { query = < ${var.queue_depth_threshold_critical} END diff --git a/aws/vpn/main.tf b/aws/vpn/main.tf index 6d9bfc2..bd4df6a 100644 --- a/aws/vpn/main.tf +++ b/aws/vpn/main.tf @@ -12,7 +12,7 @@ resource "datadog_monitor" "tunnel_state" { count = var.tunnel_state_enabled ? 1 : 0 name = join("", [local.title_prefix, "VPN tunnel state - {{host.name}}", local.title_suffix]) - include_tags = true + include_tags = false message = local.query_alert_base_message tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -27,7 +27,7 @@ resource "datadog_monitor" "tunnel_state" { query = < Date: Wed, 16 Oct 2024 11:23:38 -0400 Subject: [PATCH 52/77] Add ability to turn off message on AWS monitors --- README.md | 2 +- aws/alb/main.tf | 10 +-- aws/alb/variables.tf | 24 +++++++ aws/apigateway/main.tf | 6 +- aws/apigateway/variables.tf | 12 ++++ aws/beanstalk/main.tf | 10 +-- aws/beanstalk/variables.tf | 24 +++++++ aws/ec2/main.tf | 10 +-- aws/ec2/variables.tf | 24 +++++++ aws/ecs-cluster/main.tf | 12 ++-- aws/ecs-cluster/variables.tf | 24 +++++++ aws/ecs-fargate/main.tf | 10 +-- aws/ecs-fargate/variables.tf | 24 +++++++ aws/ecs-service/main.tf | 10 +-- aws/ecs-service/variables.tf | 25 ++++++++ aws/elasticache/main.tf | 16 ++--- aws/elasticache/variables.tf | 42 ++++++++++++ aws/elasticsearch/main.tf | 16 ++--- aws/elasticsearch/variables.tf | 30 +++++++++ aws/elb/main.tf | 10 +-- aws/elb/variables.tf | 25 ++++++++ aws/lambda/main.tf | 16 ++--- aws/lambda/variables.tf | 42 ++++++++++++ aws/rds/main.tf | 10 +-- aws/rds/variables.tf | 24 +++++++ aws/sqs/.terraform.lock.hcl | 2 + aws/sqs/main.tf | 6 +- aws/sqs/variables.tf | 12 ++++ aws/vpn/.terraform.lock.hcl | 2 + common/common.tf | 114 +++++++++++++++++++++++++++------ 30 files changed, 503 insertions(+), 91 deletions(-) diff --git a/README.md b/README.md index 3c31d8a..80c209f 100644 --- a/README.md +++ b/README.md @@ -52,4 +52,4 @@ No inputs. ## Outputs No outputs. - \ No newline at end of file + diff --git a/aws/alb/main.tf b/aws/alb/main.tf index a771c77..2681e66 100644 --- a/aws/alb/main.tf +++ b/aws/alb/main.tf @@ -4,7 +4,7 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" + title_prefix = var.title_prefix == null ? "" : "[${var.title_prefix}]" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } @@ -13,7 +13,7 @@ resource "datadog_monitor" "http_5xx_responses" { name = join("", [local.title_prefix, "ALB 5xx Responses - {{loadbalancer.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.http_5xx_responses_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -43,7 +43,7 @@ resource "datadog_monitor" "http_5xx_tg_responses" { name = join("", [local.title_prefix, "ALB Target Group 5xx Responses - {{loadbalancer.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.http_5xx_tg_responses_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -74,7 +74,7 @@ resource "datadog_monitor" "latency" { name = join("", [local.title_prefix, "ALB latency - {{loadbalancer.name}} {{value}}s ", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.latency_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -103,7 +103,7 @@ resource "datadog_monitor" "no_healthy_instances" { name = join("", [local.title_prefix, "ALB available healthy instances - {{loadbalancer.name}} {{value}}%", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.no_healthy_instances_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" diff --git a/aws/alb/variables.tf b/aws/alb/variables.tf index 4d2eedf..0637625 100644 --- a/aws/alb/variables.tf +++ b/aws/alb/variables.tf @@ -46,6 +46,12 @@ variable "http_5xx_responses_threshold_warning" { type = number } +variable "http_5xx_responses_use_message" { + description = "Whether to use the query alert base message" + type = bool + default = false +} + ######################################## # HTTP 5xx Response Codes (Target Group) ######################################## @@ -79,6 +85,12 @@ variable "http_5xx_tg_responses_threshold_warning" { type = number } +variable "http_5xx_tg_responses_use_message" { + description = "Whether to use the query alert base message" + type = bool + default = false +} + ######################################## # Latency Instances ######################################## @@ -112,6 +124,12 @@ variable "latency_threshold_warning" { type = number } +variable "latency_use_message" { + description = "Whether to use the query alert base message" + type = bool + default = false +} + ######################################## # No Healthy Instances ######################################## @@ -144,3 +162,9 @@ variable "no_healthy_instances_threshold_warning" { description = "Warning threshold (percentage)" type = number } + +variable "no_healthy_instances_use_message" { + description = "Whether to use the query alert base message" + type = bool + default = true +} diff --git a/aws/apigateway/main.tf b/aws/apigateway/main.tf index 01ac1a7..f624851 100644 --- a/aws/apigateway/main.tf +++ b/aws/apigateway/main.tf @@ -4,7 +4,7 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" + title_prefix = var.title_prefix == null ? "" : "[${var.title_prefix}]" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } @@ -13,7 +13,7 @@ resource "datadog_monitor" "http_5xx_responses" { name = join("", [local.title_prefix, "API Gateway 5xx Responses - {{apiname.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.http_5xx_responses_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -43,7 +43,7 @@ resource "datadog_monitor" "latency" { name = join("", [local.title_prefix, "API Gateway latency - {{apiname.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.latency_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" diff --git a/aws/apigateway/variables.tf b/aws/apigateway/variables.tf index 14d282a..d5eb215 100644 --- a/aws/apigateway/variables.tf +++ b/aws/apigateway/variables.tf @@ -46,6 +46,12 @@ variable "http_5xx_responses_threshold_warning" { type = number } +variable "http_5xx_responses_use_message" { + description = "Whether to use the query alert base message for HTTP 5xx responses monitor" + type = bool + default = false +} + ######################################## # Latency Instances ######################################## @@ -78,3 +84,9 @@ variable "latency_threshold_warning" { description = "Warning threshold (seconds)" type = number } + +variable "latency_use_message" { + description = "Whether to use the query alert base message for the latency monitor" + type = bool + default = false +} diff --git a/aws/beanstalk/main.tf b/aws/beanstalk/main.tf index 26bbb60..7fe3814 100644 --- a/aws/beanstalk/main.tf +++ b/aws/beanstalk/main.tf @@ -17,7 +17,7 @@ locals { latency_metric = local.latency_metric_map[var.latency_measurement] - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" + title_prefix = var.title_prefix == null ? "" : "[${var.title_prefix}]" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } @@ -26,7 +26,7 @@ resource "datadog_monitor" "health" { name = join("", [local.title_prefix, "Beanstalk Health Events - {{environmentname.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.health_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "metric alert" @@ -55,7 +55,7 @@ resource "datadog_monitor" "http_5xx_responses" { name = join("", [local.title_prefix, "ALB 5xx Responses - {{environmentname.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.http_5xx_responses_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -85,7 +85,7 @@ resource "datadog_monitor" "latency" { name = join("", [local.title_prefix, "Beanstalk Latency - {{environmentname.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.latency_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -113,7 +113,7 @@ resource "datadog_monitor" "root_disk_usage" { name = join("", [local.title_prefix, "Beanstalk Instance Root Disk Usage - {{environmentname.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.root_disk_usage_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" diff --git a/aws/beanstalk/variables.tf b/aws/beanstalk/variables.tf index 451d74d..c537346 100644 --- a/aws/beanstalk/variables.tf +++ b/aws/beanstalk/variables.tf @@ -68,6 +68,12 @@ Warning threshold ( END } +variable "health_use_message" { + description = "Whether to use the query alert base message for health monitor" + type = bool + default = false +} + ######################################## # HTTP 5xx Responses ######################################## @@ -101,6 +107,12 @@ variable "http_5xx_responses_threshold_warning" { type = number } +variable "http_5xx_responses_use_message" { + description = "Whether to use the query alert base message for HTTP 5xx responses monitor" + type = bool + default = false +} + ######################################## # Latency Instances ######################################## @@ -153,6 +165,12 @@ variable "latency_threshold_warning" { type = number } +variable "latency_use_message" { + description = "Whether to use the query alert base message for latency monitor" + type = bool + default = false +} + ######################################## # Root FS Disk Usage ######################################## @@ -185,3 +203,9 @@ variable "root_disk_usage_threshold_warning" { description = "Warning threshold (percent)" type = number } + +variable "root_disk_usage_use_message" { + description = "Whether to use the query alert base message for root disk usage monitor" + type = bool + default = false +} diff --git a/aws/ec2/main.tf b/aws/ec2/main.tf index 7772c28..337c979 100644 --- a/aws/ec2/main.tf +++ b/aws/ec2/main.tf @@ -4,7 +4,7 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" + title_prefix = var.title_prefix == null ? "" : "[${var.title_prefix}]" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } @@ -13,7 +13,7 @@ resource "datadog_monitor" "status_failed_check" { name = join("", [local.title_prefix, "EC2 instance status - status check failure - {{name.name}}({{instance_id.name}})", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.status_failed_check_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -40,7 +40,7 @@ resource "datadog_monitor" "status_failed_instance" { name = join("", [local.title_prefix, "EC2 instance status - instance failure - {{name.name}}({{instance_id.name}})", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.status_failed_instance_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -67,7 +67,7 @@ resource "datadog_monitor" "status_failed_system" { name = join("", [local.title_prefix, "EC2 instance status - host failure - {{name.name}}({{instance_id.name}})", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.status_failed_system_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -94,7 +94,7 @@ resource "datadog_monitor" "status_failed_volume" { name = join("", [local.title_prefix, "EC2 instance status - volume failure - {{name.name}}({{instance_id.name}})", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.status_failed_volume_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" diff --git a/aws/ec2/variables.tf b/aws/ec2/variables.tf index b27bf0d..6aaed78 100644 --- a/aws/ec2/variables.tf +++ b/aws/ec2/variables.tf @@ -34,6 +34,12 @@ variable "status_failed_check_no_data_window" { type = number } +variable "status_failed_check_use_message" { + description = "Whether to use the query alert base message for ec2 instance status check monitor" + type = bool + default = false +} + ######################################## # Instance status check ######################################## @@ -55,6 +61,12 @@ variable "status_failed_instance_no_data_window" { type = number } +variable "status_failed_instance_use_message" { + description = "Whether to use the query alert base message for instance status check monitor" + type = bool + default = false +} + ##################################### # system host status check ######################################## @@ -76,6 +88,12 @@ variable "status_failed_system_no_data_window" { type = number } +variable "status_failed_system_use_message" { + description = "Whether to use the query alert base message for instance system failure monitor" + type = bool + default = false +} + ##################################### # Attached volume status check ######################################## @@ -96,3 +114,9 @@ variable "status_failed_volume_no_data_window" { description = "No data threshold (in minutes, 0 to disable)" type = number } + +variable "status_failed_volume_use_message" { + description = "Whether to use the query alert base message for attached volume status monitor" + type = bool + default = false +} diff --git a/aws/ecs-cluster/main.tf b/aws/ecs-cluster/main.tf index 28906b1..60e5208 100644 --- a/aws/ecs-cluster/main.tf +++ b/aws/ecs-cluster/main.tf @@ -5,7 +5,7 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" + title_prefix = var.title_prefix == null ? "" : "[${var.title_prefix}]" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } @@ -14,9 +14,9 @@ resource "datadog_monitor" "agent_status" { name = join("", [local.title_prefix, "ECS Agent disconnected - {{clustername.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.agent_status_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) - type = "service check" + type = "service check" evaluation_delay = var.evaluation_delay new_group_delay = var.new_group_delay @@ -41,7 +41,7 @@ resource "datadog_monitor" "cpu_utilization" { name = join("", [local.title_prefix, "ECS Cluster CPU Utilization - {{clustername.name}} - {{value}}%", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.cpu_utilization_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -70,7 +70,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { name = join("", [local.title_prefix, "ECS cluster CPU utilization anomalous activity - {{clustername.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.cpu_utilization_anomaly_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -106,7 +106,7 @@ resource "datadog_monitor" "memory_reservation" { name = join("", [local.title_prefix, "ECS Cluster Memory Reservation High - {{clustername.name}} - {{value}}%", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.memory_reservation_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" diff --git a/aws/ecs-cluster/variables.tf b/aws/ecs-cluster/variables.tf index e6cd277..6671c12 100644 --- a/aws/ecs-cluster/variables.tf +++ b/aws/ecs-cluster/variables.tf @@ -46,6 +46,12 @@ variable "agent_status_threshold_warning" { type = number } +variable "agent_status_use_message" { + description = "Whether to use the query alert base message for agent status monitor" + type = bool + default = false +} + ######################################## # Cluster CPU Utilization ######################################## @@ -79,6 +85,12 @@ variable "cpu_utilization_threshold_warning" { type = number } +variable "cpu_utilization_use_message" { + description = "Whether to use the query alert base message for CPU utilization monitor" + type = bool + default = false +} + ######################################## # CPU Utilization (anomaly detection) ######################################## @@ -142,6 +154,12 @@ variable "cpu_utilization_anomaly_threshold_warning" { type = number } +variable "cpu_utilization_anomaly_use_message" { + description = "Whether to use the query alert base message for CPU utilization anomaly monitor" + type = bool + default = false +} + ######################################## # Cluster Memory Reservation ######################################## @@ -173,3 +191,9 @@ variable "memory_reservation_threshold_warning" { description = "Warning threshold (percent)" type = number } + +variable "memory_reservation_use_message" { + description = "Whether to use the query alert base message for memory reservation monitor" + type = bool + default = false +} diff --git a/aws/ecs-fargate/main.tf b/aws/ecs-fargate/main.tf index 1425541..5b192a1 100644 --- a/aws/ecs-fargate/main.tf +++ b/aws/ecs-fargate/main.tf @@ -5,7 +5,7 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" + title_prefix = var.title_prefix == null ? "" : "[${var.title_prefix}]" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } @@ -14,7 +14,7 @@ resource "datadog_monitor" "fargate_check" { name = join("", [local.title_prefix, "Fargate service not responding", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.fargate_check_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "service check" @@ -42,7 +42,7 @@ resource "datadog_monitor" "cpu_utilization" { name = join("", [local.title_prefix, "ECS Fargate task CPU utilization - {{ecs_cluster}} ({{task_family}})", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.cpu_utilization_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -71,7 +71,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { name = join("", [local.title_prefix, "ECS service CPU utilization anomalous activity - {{ecs_cluster}} ({{task_family}})", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.cpu_utilization_anomaly_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -107,7 +107,7 @@ resource "datadog_monitor" "memory_utilization" { name = join("", [local.title_prefix, "ECS Fargate task memory utilization - {{ecs_cluster}} ({{task_family}})", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.memory_utilization_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" diff --git a/aws/ecs-fargate/variables.tf b/aws/ecs-fargate/variables.tf index bced0a0..272f46e 100644 --- a/aws/ecs-fargate/variables.tf +++ b/aws/ecs-fargate/variables.tf @@ -52,6 +52,12 @@ variable "fargate_check_threshold_warning" { type = number } +variable "fargate_check_use_message" { + description = "Whether to use the query alert base message for Fargate check monitor" + type = bool + default = false +} + ######################################## # Fargate Task CPU Utilization ######################################## @@ -85,6 +91,12 @@ variable "cpu_utilization_threshold_warning" { type = number } +variable "cpu_utilization_use_message" { + description = "Whether to use the query alert base message for CPU utilization monitor" + type = bool + default = false +} + ######################################## # CPU Utilization (anomaly detection) ######################################## @@ -148,6 +160,12 @@ variable "cpu_utilization_anomaly_threshold_warning" { type = number } +variable "cpu_utilization_anomaly_use_message" { + description = "Whether to use the query alert base message for CPU utilization anomaly monitor" + type = bool + default = false +} + ######################################## # Fargate Task Memory Reservation ######################################## @@ -179,3 +197,9 @@ variable "memory_utilization_threshold_warning" { description = "Warning threshold (percent)" type = number } + +variable "memory_utilization_use_message" { + description = "Whether to use the query alert base message for memory utilization monitor" + type = bool + default = false +} diff --git a/aws/ecs-service/main.tf b/aws/ecs-service/main.tf index 225cb7e..677893b 100644 --- a/aws/ecs-service/main.tf +++ b/aws/ecs-service/main.tf @@ -5,7 +5,7 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" + title_prefix = var.title_prefix == null ? "" : "[${var.title_prefix}]" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } @@ -14,7 +14,7 @@ resource "datadog_monitor" "running_tasks" { name = join("", [local.title_prefix, "ECS service failed tasks - {{servicename.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.running_tasks_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -44,7 +44,7 @@ resource "datadog_monitor" "cpu_utilization" { name = join("", [local.title_prefix, "ECS Service CPU Utilization - {{servicename.name}} - {{value}}%", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.cpu_utilization_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -73,7 +73,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { name = join("", [local.title_prefix, "ECS service CPU utilization anomalous activity - {{servicename.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.cpu_utilization_anomaly_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -109,7 +109,7 @@ resource "datadog_monitor" "memory_utilization" { name = join("", [local.title_prefix, "ECS Service memory utilization - {{servicename.name}} - {{value}}%", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.memory_utilization_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" diff --git a/aws/ecs-service/variables.tf b/aws/ecs-service/variables.tf index cd07eb5..0c7baef 100644 --- a/aws/ecs-service/variables.tf +++ b/aws/ecs-service/variables.tf @@ -46,6 +46,12 @@ variable "running_tasks_threshold_warning" { type = number } +variable "running_tasks_use_message" { + description = "Whether to use the query alert base message for running tasks monitor" + type = bool + default = true +} + ######################################## # Service CPU Utilization ######################################## @@ -79,6 +85,12 @@ variable "cpu_utilization_threshold_warning" { type = number } +variable "cpu_utilization_use_message" { + description = "Whether to use the query alert base message for CPU utilization monitor" + type = bool + default = false +} + ######################################## # CPU Utilization (anomaly detection) ######################################## @@ -142,6 +154,13 @@ variable "cpu_utilization_anomaly_threshold_warning" { type = number } + +variable "cpu_utilization_anomaly_use_message" { + description = "Whether to use the query alert base message for CPU utilization anomaly monitor" + type = bool + default = false +} + ######################################## # Service Memory Reservation ######################################## @@ -173,3 +192,9 @@ variable "memory_utilization_threshold_warning" { description = "Warning threshold (percent)" type = number } + +variable "memory_utilization_use_message" { + description = "Whether to use the query alert base message for memory utilization monitor" + type = bool + default = false +} diff --git a/aws/elasticache/main.tf b/aws/elasticache/main.tf index 5eb5688..2ad69b1 100644 --- a/aws/elasticache/main.tf +++ b/aws/elasticache/main.tf @@ -4,7 +4,7 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" + title_prefix = var.title_prefix == null ? "" : "[${var.title_prefix}]" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } @@ -13,7 +13,7 @@ resource "datadog_monitor" "cpu_utilization" { name = join("", [local.title_prefix, "Elasticache CPU Utilization - {{cacheclusterid.name}} - {{value}}%", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.cpu_utilization_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -42,7 +42,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { name = join("", [local.title_prefix, "Elasticache CPU utilization anomalous activity - {{cacheclusterid.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.cpu_utilization_anomaly_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -72,7 +72,7 @@ resource "datadog_monitor" "evictions" { name = join("", [local.title_prefix, "Elasticache evictions - {{cacheclusterid.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.evictions_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -101,7 +101,7 @@ resource "datadog_monitor" "hit_rate" { name = join("", [local.title_prefix, "Elasticache cache hit rate - {{cacheclusterid.name}} - {{value}}% ", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.hit_rate_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -130,7 +130,7 @@ resource "datadog_monitor" "hit_rate_anomaly" { name = join("", [local.title_prefix, "Elasticache cache hit rate anomalous activity - {{cacheclusterid.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.hit_rate_anomaly_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -160,7 +160,7 @@ resource "datadog_monitor" "max_connections" { name = join("", [local.title_prefix, "Elasticache max connections reached - {{cacheclusterid.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.max_connections_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -189,7 +189,7 @@ resource "datadog_monitor" "swap_usage" { name = join("", [local.title_prefix, "Elasticache swap usage - {{cacheclusterid.name}} - {{value}}MB", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.swap_usage_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" diff --git a/aws/elasticache/variables.tf b/aws/elasticache/variables.tf index 0ef1148..da5dd70 100644 --- a/aws/elasticache/variables.tf +++ b/aws/elasticache/variables.tf @@ -46,6 +46,12 @@ variable "cpu_utilization_threshold_warning" { type = number } +variable "cpu_utilization_use_message" { + description = "Whether to use the query alert base message for CPU utilization monitor" + type = bool + default = false +} + ######################################## # CPU Utilization (anomaly detection) ######################################## @@ -109,6 +115,12 @@ variable "cpu_utilization_anomaly_threshold_warning" { type = number } +variable "cpu_utilization_anomaly_use_message" { + description = "Whether to use the query alert base message for CPU utilization anomaly monitor" + type = bool + default = false +} + ######################################## # Elasticache Evictions ######################################## @@ -142,6 +154,12 @@ variable "evictions_threshold_warning" { type = number } +variable "evictions_use_message" { + description = "Whether to use the query alert base message for evictions monitor" + type = bool + default = false +} + ######################################## # Cache hit rate ######################################## @@ -175,6 +193,12 @@ variable "hit_rate_threshold_warning" { type = number } +variable "hit_rate_use_message" { + description = "Whether to use the query alert base message for hit rate monitor" + type = bool + default = false +} + ######################################## # Cache hit rate (anomaly detection) ######################################## @@ -214,6 +238,12 @@ variable "hit_rate_anomaly_threshold_critical" { type = number } +variable "hit_rate_anomaly_use_message" { + description = "Whether to use the query alert base message for hit rate anomaly monitor" + type = bool + default = false +} + ######################################## # Max Connections ######################################## @@ -247,6 +277,12 @@ variable "max_connections_threshold_warning" { type = number } +variable "max_connections_use_message" { + description = "Whether to use the query alert base message for max connections monitor" + type = bool + default = false +} + ######################################## # Swap usage (by node) ######################################## @@ -279,3 +315,9 @@ variable "swap_usage_threshold_warning" { description = "Warning threshold (bytes)" type = number } + +variable "swap_usage_use_message" { + description = "Whether to use the query alert base message for swap usage monitor" + type = bool + default = false +} diff --git a/aws/elasticsearch/main.tf b/aws/elasticsearch/main.tf index 8dab8dd..479754c 100644 --- a/aws/elasticsearch/main.tf +++ b/aws/elasticsearch/main.tf @@ -4,7 +4,7 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" + title_prefix = var.title_prefix == null ? "" : "[${var.title_prefix}]" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } @@ -13,7 +13,7 @@ resource "datadog_monitor" "cluster_health_red" { name = join("", [local.title_prefix, "ElasticSearch cluster health red - {{name.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.cluster_health_red_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -41,7 +41,7 @@ resource "datadog_monitor" "cluster_health_yellow" { name = join("", [local.title_prefix, "ElasticSearch cluster health yellow - {{name.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.cluster_health_yellow_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -69,7 +69,7 @@ resource "datadog_monitor" "cpu_utilization" { name = join("", [local.title_prefix, "ElasticSearch CPU Utilization - {{name.name}} - {{value}}%", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.cpu_utilization_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -98,7 +98,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { name = join("", [local.title_prefix, "ElasticSearch CPU utilization anomalous activity - {{name.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.cpu_utilization_anomaly_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -134,7 +134,7 @@ resource "datadog_monitor" "free_storage" { name = join("", [local.title_prefix, "ElasticSearch cluster storage - {{name.name}} - {{value}}% used", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.free_storage_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -148,8 +148,8 @@ resource "datadog_monitor" "free_storage" { query = < ${var.free_storage_threshold_critical} EOQ diff --git a/aws/elasticsearch/variables.tf b/aws/elasticsearch/variables.tf index 166adfe..9cc6ab5 100644 --- a/aws/elasticsearch/variables.tf +++ b/aws/elasticsearch/variables.tf @@ -34,6 +34,12 @@ variable "cluster_health_red_no_data_window" { type = number } +variable "cluster_health_red_use_message" { + description = "Whether to use the query alert base message for cluster health red monitor" + type = bool + default = true +} + ####################################### # ElasticSearch cluster health (yellow) ######################################## @@ -55,6 +61,12 @@ variable "cluster_health_yellow_no_data_window" { type = number } +variable "cluster_health_yellow_use_message" { + description = "Whether to use the query alert base message for cluster health yellow monitor" + type = bool + default = false +} + ######################################## # Node CPU Utilization ######################################## @@ -88,6 +100,12 @@ variable "cpu_utilization_threshold_warning" { type = number } +variable "cpu_utilization_use_message" { + description = "Whether to use the query alert base message for CPU utilization monitor" + type = bool + default = false +} + ######################################## # CPU Utilization (anomaly detection) ######################################## @@ -151,6 +169,12 @@ variable "cpu_utilization_anomaly_threshold_warning" { type = number } +variable "cpu_utilization_anomaly_use_message" { + description = "Whether to use the query alert base message for CPU utilization anomaly monitor" + type = bool + default = false +} + ######################################## # ElasticSearch cluster free storage ######################################## @@ -183,3 +207,9 @@ variable "free_storage_threshold_warning" { description = "Warning threshold for used disk space (%)" type = number } + +variable "free_storage_use_message" { + description = "Whether to use the query alert base message for free storage monitor" + type = bool + default = true +} diff --git a/aws/elb/main.tf b/aws/elb/main.tf index 428a10f..dfce887 100644 --- a/aws/elb/main.tf +++ b/aws/elb/main.tf @@ -4,7 +4,7 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" + title_prefix = var.title_prefix == null ? "" : "[${var.title_prefix}]" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } @@ -13,7 +13,7 @@ resource "datadog_monitor" "http_5xx_responses" { name = join("", [local.title_prefix, "ELB 5xx Responses - {{loadbalancername.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.http_5xx_responses_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -43,7 +43,7 @@ resource "datadog_monitor" "http_5xx_backend_responses" { name = join("", [local.title_prefix, "ELB Backend 5xx Responses - {{loadbalancername.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.http_5xx_backend_responses_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -74,7 +74,7 @@ resource "datadog_monitor" "latency" { name = join("", [local.title_prefix, "ELB backend latency - {{loadbalancername.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.latency_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -103,7 +103,7 @@ resource "datadog_monitor" "no_healthy_instances" { name = join("", [local.title_prefix, "ALB healthy instances - {{loadbalancername.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.no_healthy_instances_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" diff --git a/aws/elb/variables.tf b/aws/elb/variables.tf index d2235be..13357e9 100644 --- a/aws/elb/variables.tf +++ b/aws/elb/variables.tf @@ -46,6 +46,12 @@ variable "http_5xx_responses_threshold_warning" { type = number } +variable "http_5xx_responses_use_message" { + description = "Whether to use the query alert base message for HTTP 5xx responses monitor" + type = bool + default = false +} + ######################################## # HTTP 5xx Response Codes (backend) ######################################## @@ -79,6 +85,12 @@ variable "http_5xx_backend_responses_threshold_warning" { type = number } +variable "http_5xx_backend_responses_use_message" { + description = "Whether to use the query alert base message for HTTP 5xx backend responses monitor" + type = bool + default = false +} + ######################################## # Latency (backend) ######################################## @@ -112,6 +124,12 @@ variable "latency_threshold_warning" { type = number } +variable "latency_use_message" { + description = "Whether to use the query alert base message for latency monitor" + type = bool + default = false +} + ######################################## # No Healthy Instances ######################################## @@ -144,3 +162,10 @@ variable "no_healthy_instances_threshold_warning" { description = "Warning threshold (percentage)" type = number } + + +variable "no_healthy_instances_use_message" { + description = "Whether to use the query alert base message for no healthy instances monitor" + type = bool + default = true +} diff --git a/aws/lambda/main.tf b/aws/lambda/main.tf index b6ddf13..e37a8f4 100644 --- a/aws/lambda/main.tf +++ b/aws/lambda/main.tf @@ -4,7 +4,7 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" + title_prefix = var.title_prefix == null ? "" : "[${var.title_prefix}]" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" cold_start_query_filter = local.query_filter == "{*}" ? "{cold_start:true}" : replace(local.query_filter, "{", "{cold_star:true,") @@ -15,7 +15,7 @@ resource "datadog_monitor" "error_rate" { name = join("", [local.title_prefix, "Lambda error rate - {{functionname.name}} - {{value}}%", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.error_rate_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -45,7 +45,7 @@ resource "datadog_monitor" "timeouts" { name = join("", [local.title_prefix, "Lambda timeouts - {{functionname.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.timeouts_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -75,7 +75,7 @@ resource "datadog_monitor" "cold_starts" { name = join("", [local.title_prefix, "Lambda cold starts - {{functionname.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.cold_starts_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -105,7 +105,7 @@ resource "datadog_monitor" "out_of_memory" { name = join("", [local.title_prefix, "Lambda out of memory - {{functionname.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.out_of_memory_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -135,7 +135,7 @@ resource "datadog_monitor" "iterator_age" { name = join("", [local.title_prefix, "Lambda iterator age - {{functionname.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.iterator_age_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -164,7 +164,7 @@ resource "datadog_monitor" "iterator_age_forecast" { name = join("", [local.title_prefix, "Lambda stream data loss forecasted - {{functionname.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.iterator_age_forecast_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -192,7 +192,7 @@ resource "datadog_monitor" "throttle_rate" { name = join("", [local.title_prefix, "Lambda throttle rate - {{functionname.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.throttle_rate_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" diff --git a/aws/lambda/variables.tf b/aws/lambda/variables.tf index c9eaa99..4332d90 100644 --- a/aws/lambda/variables.tf +++ b/aws/lambda/variables.tf @@ -46,6 +46,12 @@ variable "error_rate_threshold_warning" { type = number } +variable "error_rate_use_message" { + description = "Whether to use the query alert base message for error rate monitor" + type = bool + default = true +} + ######################################## # Lambda timeouts ######################################## @@ -79,6 +85,12 @@ variable "timeouts_threshold_warning" { type = number } +variable "timeouts_use_message" { + description = "Whether to use the query alert base message for timeouts monitor" + type = bool + default = false +} + ######################################## # Cold start monitor ######################################## @@ -112,6 +124,12 @@ variable "cold_starts_threshold_warning" { type = number } +variable "cold_starts_use_message" { + description = "Whether to use the query alert base message for cold starts monitor" + type = bool + default = false +} + ######################################## # OOM monitor ######################################## @@ -145,6 +163,12 @@ variable "out_of_memory_threshold_warning" { type = number } +variable "out_of_memory_use_message" { + description = "Whether to use the query alert base message for out of memory monitor" + type = bool + default = false +} + ######################################## # Iterator Age monitor ######################################## @@ -178,6 +202,12 @@ variable "iterator_age_threshold_warning" { type = number } +variable "iterator_age_use_message" { + description = "Whether to use the query alert base message for iterator age monitor" + type = bool + default = false +} + ######################################## # Iterator Age forecast data loss ######################################## @@ -199,6 +229,12 @@ variable "iterator_age_forecast_no_data_window" { type = number } +variable "iterator_age_forecast_use_message" { + description = "Whether to use the query alert base message for iterator age forecast monitor" + type = bool + default = false +} + ######################################## # Lambda throttle rate ######################################## @@ -231,3 +267,9 @@ variable "throttle_rate_threshold_warning" { description = "Warning threshold (percentage, 0-100)" type = number } + +variable "throttle_rate_use_message" { + description = "Whether to use the query alert base message for throttle rate monitor" + type = bool + default = false +} diff --git a/aws/rds/main.tf b/aws/rds/main.tf index 4211915..c64956c 100644 --- a/aws/rds/main.tf +++ b/aws/rds/main.tf @@ -4,7 +4,7 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" + title_prefix = var.title_prefix == null ? "" : "[${var.title_prefix}]" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } @@ -13,7 +13,7 @@ resource "datadog_monitor" "connection_count_anomaly" { name = join("", [local.title_prefix, "RDS connection count anomalous activity - {{dbinstanceidentifier.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.connection_count_anomaly_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -49,7 +49,7 @@ resource "datadog_monitor" "cpu_utilization" { name = join("", [local.title_prefix, "RDS CPU Utilization - {{dbinstanceidentifier.name}} - {{value}}%", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.cpu_utilization_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -78,7 +78,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { name = join("", [local.title_prefix, "RDS CPU utilization anomalous activity - {{dbinstanceidentifier.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.cpu_utilization_anomaly_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -114,7 +114,7 @@ resource "datadog_monitor" "used_storage" { name = join("", [local.title_prefix, "RDS instance storage - {{dbinstanceidentifier.name}} - {{value}}% used", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.used_storage_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" diff --git a/aws/rds/variables.tf b/aws/rds/variables.tf index 1ac8ab5..64f2191 100644 --- a/aws/rds/variables.tf +++ b/aws/rds/variables.tf @@ -76,6 +76,12 @@ variable "connection_count_anomaly_threshold_warning" { type = number } +variable "connection_count_anomaly_use_message" { + description = "Whether to use the query alert base message for connection count anomaly monitor" + type = bool + default = true +} + ######################################## # Node CPU Utilization ######################################## @@ -109,6 +115,12 @@ variable "cpu_utilization_threshold_warning" { type = number } +variable "cpu_utilization_use_message" { + description = "Whether to use the query alert base message for CPU utilization monitor" + type = bool + default = false +} + ######################################## # CPU Utilization (anomaly detection) ######################################## @@ -172,6 +184,12 @@ variable "cpu_utilization_anomaly_threshold_warning" { type = number } +variable "cpu_utilization_anomaly_use_message" { + description = "Whether to use the query alert base message for CPU utilization anomaly monitor" + type = bool + default = false +} + ######################################## # ElasticSearch cluster used storage ######################################## @@ -204,3 +222,9 @@ variable "used_storage_threshold_warning" { description = "Warning threshold (percentage, 0-100)" type = number } + +variable "used_storage_use_message" { + description = "Whether to use the query alert base message for used storage monitor" + type = bool + default = true +} diff --git a/aws/sqs/.terraform.lock.hcl b/aws/sqs/.terraform.lock.hcl index 5fa8913..f4429ee 100644 --- a/aws/sqs/.terraform.lock.hcl +++ b/aws/sqs/.terraform.lock.hcl @@ -5,6 +5,7 @@ provider "registry.terraform.io/datadog/datadog" { version = "3.44.0" constraints = ">= 3.37.0" hashes = [ + "h1:gapxzCRcnTGm4HLO1zuoelGC15+0LEYceGNWGh69JLE=", "h1:neJ/si/8CotiW8ulfjU6dFmb1bpzbTjhfHLTlCvdynw=", "zh:12119fe0cafbe7e05c32d4101a804d479ae756e19512c789c67cb3c51420ac98", "zh:35267ecc27de00e449893df9a37481f38b8fe24d14fe94198cd68966f1aa586f", @@ -27,6 +28,7 @@ provider "registry.terraform.io/hashicorp/null" { version = "3.2.2" constraints = ">= 3.1.0" hashes = [ + "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", diff --git a/aws/sqs/main.tf b/aws/sqs/main.tf index db17ca6..6c98447 100644 --- a/aws/sqs/main.tf +++ b/aws/sqs/main.tf @@ -4,7 +4,7 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}" + title_prefix = var.title_prefix == null ? "" : "[${var.title_prefix}]" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } @@ -13,7 +13,7 @@ resource "datadog_monitor" "oldest_message" { name = join("", [local.title_prefix, "Oldest queued message - {{queuename.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.oldest_message_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -42,7 +42,7 @@ resource "datadog_monitor" "queue_depth" { name = join("", [local.title_prefix, "Queue depth - {{queuename.name}}", local.title_suffix]) include_tags = false - message = local.query_alert_base_message + message = var.queue_depth_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" diff --git a/aws/sqs/variables.tf b/aws/sqs/variables.tf index 0a4b1c5..4bb5de0 100644 --- a/aws/sqs/variables.tf +++ b/aws/sqs/variables.tf @@ -46,6 +46,12 @@ variable "oldest_message_threshold_warning" { type = number } +variable "oldest_message_use_message" { + description = "Whether to use the query alert base message for oldest message monitor" + type = bool + default = false +} + ######################################## # Lambda queue_depth ######################################## @@ -78,3 +84,9 @@ variable "queue_depth_threshold_warning" { description = "Warning threshold (count)" type = number } + +variable "queue_depth_use_message" { + description = "Whether to use the query alert base message for queue depth monitor" + type = bool + default = false +} diff --git a/aws/vpn/.terraform.lock.hcl b/aws/vpn/.terraform.lock.hcl index 5fa8913..f4429ee 100644 --- a/aws/vpn/.terraform.lock.hcl +++ b/aws/vpn/.terraform.lock.hcl @@ -5,6 +5,7 @@ provider "registry.terraform.io/datadog/datadog" { version = "3.44.0" constraints = ">= 3.37.0" hashes = [ + "h1:gapxzCRcnTGm4HLO1zuoelGC15+0LEYceGNWGh69JLE=", "h1:neJ/si/8CotiW8ulfjU6dFmb1bpzbTjhfHLTlCvdynw=", "zh:12119fe0cafbe7e05c32d4101a804d479ae756e19512c789c67cb3c51420ac98", "zh:35267ecc27de00e449893df9a37481f38b8fe24d14fe94198cd68966f1aa586f", @@ -27,6 +28,7 @@ provider "registry.terraform.io/hashicorp/null" { version = "3.2.2" constraints = ">= 3.1.0" hashes = [ + "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", diff --git a/common/common.tf b/common/common.tf index 3ef2ead..6d90a63 100644 --- a/common/common.tf +++ b/common/common.tf @@ -161,6 +161,24 @@ variable "notify_recovery_override" { type = list(string) } +variable "notify_crit_override" { + default = [] + description = "List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise)" + type = list(string) +} + +variable "notify_nonprod_override" { + default = [] + description = "List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise)" + type = list(string) +} + +variable "notify_prod_override" { + default = [] + description = "List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise)" + type = list(string) +} + locals { # tag related locals @@ -214,14 +232,17 @@ locals { var.runbook_link != null ? ["**Runbook**: ${var.runbook_link}"] : [] )) - alert_priority = coalesce(var.alert_critical_priority, local.monitor_alert_default_priority, "P2") - warn_priority = coalesce(var.alert_critical_priority, local.monitor_warn_default_priority, "P2") - nodata_priority = coalesce(var.alert_critical_priority, local.monitor_nodata_default_priority, "P2") + alert_priority = coalesce(var.alert_critical_priority, "P2") + warn_priority = coalesce(var.warn_priority, "P2") + nodata_priority = coalesce(var.alert_nodata_priority, "P2") notify_on_alert = join(" ", coalescelist(var.notify_alert_override, var.notify_default)) notify_on_warn = join(" ", coalescelist(var.notify_warn_override, var.notify_default)) notify_on_nodata = join(" ", coalescelist(var.notify_nodata_override, var.notify_default)) notify_on_recovery = join(" ", coalescelist(var.notify_recovery_override, var.notify_default)) + notify_on_crit = join(" ", coalescelist(var.notify_crit_override, var.notify_default)) + notify_on_nonprod = join(" ", coalescelist(var.notify_nonprod_override, var.notify_default)) + notify_on_prod = join(" ", coalescelist(var.notify_prod_override, var.notify_default)) log_alert_base_message = < Date: Wed, 16 Oct 2024 11:27:03 -0400 Subject: [PATCH 53/77] readme updates --- aws/alb/README.md | 7 +++++++ aws/apigateway/README.md | 5 +++++ aws/beanstalk/README.md | 7 +++++++ aws/ec2/README.md | 7 +++++++ aws/ecs-cluster/README.md | 7 +++++++ aws/ecs-fargate/README.md | 9 ++++++++- aws/ecs-service/README.md | 15 +++++++++++---- aws/elasticache/README.md | 10 ++++++++++ aws/elasticsearch/README.md | 12 ++++++++++-- aws/elb/README.md | 7 +++++++ aws/lambda/README.md | 20 +++++++++++++++----- aws/rds/README.md | 13 ++++++++++--- aws/sqs/README.md | 5 +++++ aws/vpn/README.md | 3 +++ 14 files changed, 112 insertions(+), 15 deletions(-) diff --git a/aws/alb/README.md b/aws/alb/README.md index f3df56a..039a2bb 100644 --- a/aws/alb/README.md +++ b/aws/alb/README.md @@ -53,16 +53,19 @@ No modules. | [http\_5xx\_responses\_no\_data\_window](#input\_http\_5xx\_responses\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [http\_5xx\_responses\_threshold\_critical](#input\_http\_5xx\_responses\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | | [http\_5xx\_responses\_threshold\_warning](#input\_http\_5xx\_responses\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | +| [http\_5xx\_responses\_use\_message](#input\_http\_5xx\_responses\_use\_message) | Whether to use the query alert base message | `bool` | `false` | no | | [http\_5xx\_tg\_responses\_enabled](#input\_http\_5xx\_tg\_responses\_enabled) | Enable HTTP 5xx response monitor (target group) | `bool` | `false` | no | | [http\_5xx\_tg\_responses\_evaluation\_window](#input\_http\_5xx\_tg\_responses\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [http\_5xx\_tg\_responses\_no\_data\_window](#input\_http\_5xx\_tg\_responses\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [http\_5xx\_tg\_responses\_threshold\_critical](#input\_http\_5xx\_tg\_responses\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | | [http\_5xx\_tg\_responses\_threshold\_warning](#input\_http\_5xx\_tg\_responses\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | +| [http\_5xx\_tg\_responses\_use\_message](#input\_http\_5xx\_tg\_responses\_use\_message) | Whether to use the query alert base message | `bool` | `false` | no | | [latency\_enabled](#input\_latency\_enabled) | Enable latency monitor | `bool` | `false` | no | | [latency\_evaluation\_window](#input\_latency\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [latency\_no\_data\_window](#input\_latency\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [latency\_threshold\_critical](#input\_latency\_threshold\_critical) | Critical threshold (seconds) | `number` | `null` | no | | [latency\_threshold\_warning](#input\_latency\_threshold\_warning) | Warning threshold (seconds) | `number` | `null` | no | +| [latency\_use\_message](#input\_latency\_use\_message) | Whether to use the query alert base message | `bool` | `false` | no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | @@ -71,10 +74,14 @@ No modules. | [no\_healthy\_instances\_no\_data\_window](#input\_no\_healthy\_instances\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [no\_healthy\_instances\_threshold\_critical](#input\_no\_healthy\_instances\_threshold\_critical) | Critical threshold (percentage) | `number` | `0` | no | | [no\_healthy\_instances\_threshold\_warning](#input\_no\_healthy\_instances\_threshold\_warning) | Warning threshold (percentage) | `number` | `null` | no | +| [no\_healthy\_instances\_use\_message](#input\_no\_healthy\_instances\_use\_message) | Whether to use the query alert base message | `bool` | `true` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_crit\_override](#input\_notify\_crit\_override) | List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | | [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_nonprod\_override](#input\_notify\_nonprod\_override) | List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | diff --git a/aws/apigateway/README.md b/aws/apigateway/README.md index 5acf4df..52cd15d 100644 --- a/aws/apigateway/README.md +++ b/aws/apigateway/README.md @@ -49,18 +49,23 @@ No modules. | [http\_5xx\_responses\_no\_data\_window](#input\_http\_5xx\_responses\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [http\_5xx\_responses\_threshold\_critical](#input\_http\_5xx\_responses\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `0.75` | no | | [http\_5xx\_responses\_threshold\_warning](#input\_http\_5xx\_responses\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `0.25` | no | +| [http\_5xx\_responses\_use\_message](#input\_http\_5xx\_responses\_use\_message) | Whether to use the query alert base message for HTTP 5xx responses monitor | `bool` | `false` | no | | [latency\_enabled](#input\_latency\_enabled) | Enable latency monitor | `bool` | `false` | no | | [latency\_evaluation\_window](#input\_latency\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [latency\_no\_data\_window](#input\_latency\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [latency\_threshold\_critical](#input\_latency\_threshold\_critical) | Critical threshold (seconds) | `number` | `null` | no | | [latency\_threshold\_warning](#input\_latency\_threshold\_warning) | Warning threshold (seconds) | `number` | `null` | no | +| [latency\_use\_message](#input\_latency\_use\_message) | Whether to use the query alert base message for the latency monitor | `bool` | `false` | no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_crit\_override](#input\_notify\_crit\_override) | List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | | [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_nonprod\_override](#input\_notify\_nonprod\_override) | List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | diff --git a/aws/beanstalk/README.md b/aws/beanstalk/README.md index 15156eb..84f314b 100644 --- a/aws/beanstalk/README.md +++ b/aws/beanstalk/README.md @@ -53,24 +53,30 @@ No modules. | [health\_no\_data\_window](#input\_health\_no\_data\_window) | No date threshold (minutes) | `number` | `20` | no | | [health\_threshold\_critical](#input\_health\_threshold\_critical) | Critical threshold (
0 = OK
1 = Info
5 = Unknown
10 = No data
15 = Warning
20 = Degraded
25 = Severe
) | `number` | `25` | no | | [health\_threshold\_warning](#input\_health\_threshold\_warning) | Warning threshold (
0 = OK
1 = Info
5 = Unknown
10 = No data
15 = Warning
20 = Degraded
25 = Severe
) | `number` | `20` | no | +| [health\_use\_message](#input\_health\_use\_message) | Whether to use the query alert base message for health monitor | `bool` | `false` | no | | [http\_5xx\_responses\_enabled](#input\_http\_5xx\_responses\_enabled) | Enable HTTP 5xx response monitor | `bool` | `false` | no | | [http\_5xx\_responses\_evaluation\_window](#input\_http\_5xx\_responses\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [http\_5xx\_responses\_no\_data\_window](#input\_http\_5xx\_responses\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [http\_5xx\_responses\_threshold\_critical](#input\_http\_5xx\_responses\_threshold\_critical) | Critical threshold (percentage) | `number` | `75` | no | | [http\_5xx\_responses\_threshold\_warning](#input\_http\_5xx\_responses\_threshold\_warning) | Warning threshold (percentage) | `number` | `25` | no | +| [http\_5xx\_responses\_use\_message](#input\_http\_5xx\_responses\_use\_message) | Whether to use the query alert base message for HTTP 5xx responses monitor | `bool` | `false` | no | | [latency\_enabled](#input\_latency\_enabled) | Enable latency monitor | `bool` | `false` | no | | [latency\_evaluation\_window](#input\_latency\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [latency\_measurement](#input\_latency\_measurement) | Latency Measurement

Valid options:
* p10
* p50
* p75
* p85
* p90
* p95
* p99
* p99\_9 | `string` | `"p50"` | no | | [latency\_no\_data\_window](#input\_latency\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [latency\_threshold\_critical](#input\_latency\_threshold\_critical) | Critical threshold (seconds) | `number` | `null` | no | | [latency\_threshold\_warning](#input\_latency\_threshold\_warning) | Warning threshold (seconds) | `number` | `null` | no | +| [latency\_use\_message](#input\_latency\_use\_message) | Whether to use the query alert base message for latency monitor | `bool` | `false` | no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_crit\_override](#input\_notify\_crit\_override) | List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | | [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_nonprod\_override](#input\_notify\_nonprod\_override) | List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | @@ -79,6 +85,7 @@ No modules. | [root\_disk\_usage\_no\_data\_window](#input\_root\_disk\_usage\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [root\_disk\_usage\_threshold\_critical](#input\_root\_disk\_usage\_threshold\_critical) | Critical threshold (percent) | `number` | `90` | no | | [root\_disk\_usage\_threshold\_warning](#input\_root\_disk\_usage\_threshold\_warning) | Warning threshold (percent) | `number` | `80` | no | +| [root\_disk\_usage\_use\_message](#input\_root\_disk\_usage\_use\_message) | Whether to use the query alert base message for root disk usage monitor | `bool` | `false` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | diff --git a/aws/ec2/README.md b/aws/ec2/README.md index de24d42..7679e19 100644 --- a/aws/ec2/README.md +++ b/aws/ec2/README.md @@ -49,9 +49,12 @@ No modules. | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_crit\_override](#input\_notify\_crit\_override) | List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | | [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_nonprod\_override](#input\_notify\_nonprod\_override) | List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | @@ -60,15 +63,19 @@ No modules. | [status\_failed\_check\_enabled](#input\_status\_failed\_check\_enabled) | Enable ec2 instance status check monitor | `bool` | `true` | no | | [status\_failed\_check\_evaluation\_window](#input\_status\_failed\_check\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [status\_failed\_check\_no\_data\_window](#input\_status\_failed\_check\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | +| [status\_failed\_check\_use\_message](#input\_status\_failed\_check\_use\_message) | Whether to use the query alert base message for ec2 instance status check monitor | `bool` | `false` | no | | [status\_failed\_instance\_enabled](#input\_status\_failed\_instance\_enabled) | Enable instance status check monitor | `bool` | `true` | no | | [status\_failed\_instance\_evaluation\_window](#input\_status\_failed\_instance\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [status\_failed\_instance\_no\_data\_window](#input\_status\_failed\_instance\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | +| [status\_failed\_instance\_use\_message](#input\_status\_failed\_instance\_use\_message) | Whether to use the query alert base message for instance status check monitor | `bool` | `false` | no | | [status\_failed\_system\_enabled](#input\_status\_failed\_system\_enabled) | Enable instance system failure monitor | `bool` | `true` | no | | [status\_failed\_system\_evaluation\_window](#input\_status\_failed\_system\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [status\_failed\_system\_no\_data\_window](#input\_status\_failed\_system\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | +| [status\_failed\_system\_use\_message](#input\_status\_failed\_system\_use\_message) | Whether to use the query alert base message for instance system failure monitor | `bool` | `false` | no | | [status\_failed\_volume\_enabled](#input\_status\_failed\_volume\_enabled) | Enable attached volume status monitor | `bool` | `true` | no | | [status\_failed\_volume\_evaluation\_window](#input\_status\_failed\_volume\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [status\_failed\_volume\_no\_data\_window](#input\_status\_failed\_volume\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | +| [status\_failed\_volume\_use\_message](#input\_status\_failed\_volume\_use\_message) | Whether to use the query alert base message for attached volume status monitor | `bool` | `false` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [timeout\_h](#input\_timeout\_h) | Auto-resolve alert in specified hours if condition no longer matches | `number` | `0` | no | | [title\_prefix](#input\_title\_prefix) | Prefix all alerts with specified value in brackets | `string` | `null` | no | diff --git a/aws/ecs-cluster/README.md b/aws/ecs-cluster/README.md index 99e2faf..cdbab68 100644 --- a/aws/ecs-cluster/README.md +++ b/aws/ecs-cluster/README.md @@ -44,6 +44,7 @@ No modules. | [agent\_status\_no\_data\_window](#input\_agent\_status\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [agent\_status\_threshold\_critical](#input\_agent\_status\_threshold\_critical) | Critical threshold | `number` | `5` | no | | [agent\_status\_threshold\_warning](#input\_agent\_status\_threshold\_warning) | Warning threshold | `number` | `3` | no | +| [agent\_status\_use\_message](#input\_agent\_status\_use\_message) | Whether to use the query alert base message for agent status monitor | `bool` | `false` | no | | [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | | [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | | [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | @@ -59,11 +60,13 @@ No modules. | [cpu\_utilization\_anomaly\_threshold\_critical](#input\_cpu\_utilization\_anomaly\_threshold\_critical) | Critical threshold (percent) | `number` | `null` | no | | [cpu\_utilization\_anomaly\_threshold\_warning](#input\_cpu\_utilization\_anomaly\_threshold\_warning) | Warning threshold (percent) | `number` | `null` | no | | [cpu\_utilization\_anomaly\_trigger\_window](#input\_cpu\_utilization\_anomaly\_trigger\_window) | Trigger window for anomaly monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_1h"` | no | +| [cpu\_utilization\_anomaly\_use\_message](#input\_cpu\_utilization\_anomaly\_use\_message) | Whether to use the query alert base message for CPU utilization anomaly monitor | `bool` | `false` | no | | [cpu\_utilization\_enabled](#input\_cpu\_utilization\_enabled) | Enable cluster CPU utilization monitor | `bool` | `false` | no | | [cpu\_utilization\_evaluation\_window](#input\_cpu\_utilization\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [cpu\_utilization\_no\_data\_window](#input\_cpu\_utilization\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [cpu\_utilization\_threshold\_critical](#input\_cpu\_utilization\_threshold\_critical) | Critical threshold (percent) | `number` | `90` | no | | [cpu\_utilization\_threshold\_warning](#input\_cpu\_utilization\_threshold\_warning) | Warning threshold (percent) | `number` | `80` | no | +| [cpu\_utilization\_use\_message](#input\_cpu\_utilization\_use\_message) | Whether to use the query alert base message for CPU utilization monitor | `bool` | `false` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | | [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | @@ -72,13 +75,17 @@ No modules. | [memory\_reservation\_no\_data\_window](#input\_memory\_reservation\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [memory\_reservation\_threshold\_critical](#input\_memory\_reservation\_threshold\_critical) | Critical threshold (percent) | `number` | `90` | no | | [memory\_reservation\_threshold\_warning](#input\_memory\_reservation\_threshold\_warning) | Warning threshold (percent) | `number` | `80` | no | +| [memory\_reservation\_use\_message](#input\_memory\_reservation\_use\_message) | Whether to use the query alert base message for memory reservation monitor | `bool` | `false` | no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_crit\_override](#input\_notify\_crit\_override) | List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | | [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_nonprod\_override](#input\_notify\_nonprod\_override) | List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | diff --git a/aws/ecs-fargate/README.md b/aws/ecs-fargate/README.md index eefe028..9977961 100644 --- a/aws/ecs-fargate/README.md +++ b/aws/ecs-fargate/README.md @@ -54,32 +54,39 @@ No modules. | [cpu\_utilization\_anomaly\_threshold\_critical](#input\_cpu\_utilization\_anomaly\_threshold\_critical) | Critical threshold (percent) | `number` | `null` | no | | [cpu\_utilization\_anomaly\_threshold\_warning](#input\_cpu\_utilization\_anomaly\_threshold\_warning) | Warning threshold (percent) | `number` | `null` | no | | [cpu\_utilization\_anomaly\_trigger\_window](#input\_cpu\_utilization\_anomaly\_trigger\_window) | Trigger window for anomaly monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_1h"` | no | +| [cpu\_utilization\_anomaly\_use\_message](#input\_cpu\_utilization\_anomaly\_use\_message) | Whether to use the query alert base message for CPU utilization anomaly monitor | `bool` | `false` | no | | [cpu\_utilization\_enabled](#input\_cpu\_utilization\_enabled) | Enable Fargate task CPU utilization monitor | `bool` | `false` | no | | [cpu\_utilization\_evaluation\_window](#input\_cpu\_utilization\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [cpu\_utilization\_no\_data\_window](#input\_cpu\_utilization\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [cpu\_utilization\_threshold\_critical](#input\_cpu\_utilization\_threshold\_critical) | Critical threshold (percent) | `number` | `90` | no | | [cpu\_utilization\_threshold\_warning](#input\_cpu\_utilization\_threshold\_warning) | Warning threshold (percent) | `number` | `80` | no | +| [cpu\_utilization\_use\_message](#input\_cpu\_utilization\_use\_message) | Whether to use the query alert base message for CPU utilization monitor | `bool` | `false` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | | [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | -| [fargate\_check\_enabled](#input\_fargate\_check\_enabled) | Enable Fargate check monitor | `bool` | `false` | no | +| [fargate\_check\_enabled](#input\_fargate\_check\_enabled) | Enable Fargate check monitor | `bool` | `true` | no | | [fargate\_check\_evaluation\_window](#input\_fargate\_check\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [fargate\_check\_group\_by](#input\_fargate\_check\_group\_by) | Tag to group alerts by (will result in multiple alerts being generated based on tag cardinality) | `string` | `"*"` | no | | [fargate\_check\_no\_data\_window](#input\_fargate\_check\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [fargate\_check\_threshold\_critical](#input\_fargate\_check\_threshold\_critical) | Critical threshold | `number` | `5` | no | | [fargate\_check\_threshold\_warning](#input\_fargate\_check\_threshold\_warning) | Warning threshold | `number` | `3` | no | +| [fargate\_check\_use\_message](#input\_fargate\_check\_use\_message) | Whether to use the query alert base message for Fargate check monitor | `bool` | `false` | no | | [memory\_utilization\_enabled](#input\_memory\_utilization\_enabled) | Enable Fargate task memory utilization monitor | `bool` | `false` | no | | [memory\_utilization\_evaluation\_window](#input\_memory\_utilization\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_15m"` | no | | [memory\_utilization\_no\_data\_window](#input\_memory\_utilization\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [memory\_utilization\_threshold\_critical](#input\_memory\_utilization\_threshold\_critical) | Critical threshold (percent) | `number` | `90` | no | | [memory\_utilization\_threshold\_warning](#input\_memory\_utilization\_threshold\_warning) | Warning threshold (percent) | `number` | `80` | no | +| [memory\_utilization\_use\_message](#input\_memory\_utilization\_use\_message) | Whether to use the query alert base message for memory utilization monitor | `bool` | `false` | no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_crit\_override](#input\_notify\_crit\_override) | List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | | [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_nonprod\_override](#input\_notify\_nonprod\_override) | List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | diff --git a/aws/ecs-service/README.md b/aws/ecs-service/README.md index daa61ab..c7db7ba 100644 --- a/aws/ecs-service/README.md +++ b/aws/ecs-service/README.md @@ -51,14 +51,16 @@ No modules. | [cpu\_utilization\_anomaly\_recovery\_window](#input\_cpu\_utilization\_anomaly\_recovery\_window) | Recovery window for anomaly monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_15m"` | no | | [cpu\_utilization\_anomaly\_rollup](#input\_cpu\_utilization\_anomaly\_rollup) | Rollup interval (must be sized based on evaluation window/span and seasonaility) | `number` | `60` | no | | [cpu\_utilization\_anomaly\_seasonality](#input\_cpu\_utilization\_anomaly\_seasonality) | Seasonaility (hourly, daily, weekly) | `string` | `"weekly"` | no | -| [cpu\_utilization\_anomaly\_threshold\_critical](#input\_cpu\_utilization\_anomaly\_threshold\_critical) | Critical threshold (percent) | `number` | `null` | no | +| [cpu\_utilization\_anomaly\_threshold\_critical](#input\_cpu\_utilization\_anomaly\_threshold\_critical) | Critical threshold (percent) | `number` | `0.75` | no | | [cpu\_utilization\_anomaly\_threshold\_warning](#input\_cpu\_utilization\_anomaly\_threshold\_warning) | Warning threshold (percent) | `number` | `null` | no | | [cpu\_utilization\_anomaly\_trigger\_window](#input\_cpu\_utilization\_anomaly\_trigger\_window) | Trigger window for anomaly monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_1h"` | no | -| [cpu\_utilization\_enabled](#input\_cpu\_utilization\_enabled) | Enable Fargate task CPU utilization monitor | `bool` | `false` | no | +| [cpu\_utilization\_anomaly\_use\_message](#input\_cpu\_utilization\_anomaly\_use\_message) | Whether to use the query alert base message for CPU utilization anomaly monitor | `bool` | `false` | no | +| [cpu\_utilization\_enabled](#input\_cpu\_utilization\_enabled) | Enable Fargate task CPU utilization monitor | `bool` | `true` | no | | [cpu\_utilization\_evaluation\_window](#input\_cpu\_utilization\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [cpu\_utilization\_no\_data\_window](#input\_cpu\_utilization\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [cpu\_utilization\_threshold\_critical](#input\_cpu\_utilization\_threshold\_critical) | Critical threshold (percent) | `string` | `90` | no | | [cpu\_utilization\_threshold\_warning](#input\_cpu\_utilization\_threshold\_warning) | Warning threshold (percent) | `number` | `80` | no | +| [cpu\_utilization\_use\_message](#input\_cpu\_utilization\_use\_message) | Whether to use the query alert base message for CPU utilization monitor | `bool` | `false` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | | [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | @@ -67,22 +69,27 @@ No modules. | [memory\_utilization\_no\_data\_window](#input\_memory\_utilization\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [memory\_utilization\_threshold\_critical](#input\_memory\_utilization\_threshold\_critical) | Critical threshold (percent) | `string` | `0.9` | no | | [memory\_utilization\_threshold\_warning](#input\_memory\_utilization\_threshold\_warning) | Warning threshold (percent) | `number` | `0.8` | no | +| [memory\_utilization\_use\_message](#input\_memory\_utilization\_use\_message) | Whether to use the query alert base message for memory utilization monitor | `bool` | `false` | no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_crit\_override](#input\_notify\_crit\_override) | List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | | [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_nonprod\_override](#input\_notify\_nonprod\_override) | List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | -| [running\_tasks\_enabled](#input\_running\_tasks\_enabled) | Enable running tasks monitor | `bool` | `false` | no | +| [running\_tasks\_enabled](#input\_running\_tasks\_enabled) | Enable running tasks monitor | `bool` | `true` | no | | [running\_tasks\_evaluation\_window](#input\_running\_tasks\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [running\_tasks\_no\_data\_window](#input\_running\_tasks\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [running\_tasks\_threshold\_critical](#input\_running\_tasks\_threshold\_critical) | Critical threshold (percentage) | `number` | `0.25` | no | +| [running\_tasks\_threshold\_critical](#input\_running\_tasks\_threshold\_critical) | Critical threshold (percentage) | `number` | `0.5` | no | | [running\_tasks\_threshold\_warning](#input\_running\_tasks\_threshold\_warning) | Warning threshold (percentage) | `number` | `null` | no | +| [running\_tasks\_use\_message](#input\_running\_tasks\_use\_message) | Whether to use the query alert base message for running tasks monitor | `bool` | `true` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [timeout\_h](#input\_timeout\_h) | Auto-resolve alert in specified hours if condition no longer matches | `number` | `0` | no | diff --git a/aws/elasticache/README.md b/aws/elasticache/README.md index 086b2e9..67890f6 100644 --- a/aws/elasticache/README.md +++ b/aws/elasticache/README.md @@ -62,11 +62,13 @@ No modules. | [cpu\_utilization\_anomaly\_threshold\_critical](#input\_cpu\_utilization\_anomaly\_threshold\_critical) | Critical threshold (percent) | `number` | `null` | no | | [cpu\_utilization\_anomaly\_threshold\_warning](#input\_cpu\_utilization\_anomaly\_threshold\_warning) | Warning threshold (percent) | `number` | `null` | no | | [cpu\_utilization\_anomaly\_trigger\_window](#input\_cpu\_utilization\_anomaly\_trigger\_window) | Trigger window for anomaly monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_1h"` | no | +| [cpu\_utilization\_anomaly\_use\_message](#input\_cpu\_utilization\_anomaly\_use\_message) | Whether to use the query alert base message for CPU utilization anomaly monitor | `bool` | `false` | no | | [cpu\_utilization\_enabled](#input\_cpu\_utilization\_enabled) | Enable CPU utilization monitor | `bool` | `false` | no | | [cpu\_utilization\_evaluation\_window](#input\_cpu\_utilization\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [cpu\_utilization\_no\_data\_window](#input\_cpu\_utilization\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [cpu\_utilization\_threshold\_critical](#input\_cpu\_utilization\_threshold\_critical) | Critical threshold (percent) | `number` | `90` | no | | [cpu\_utilization\_threshold\_warning](#input\_cpu\_utilization\_threshold\_warning) | Warning threshold (percent) | `number` | `80` | no | +| [cpu\_utilization\_use\_message](#input\_cpu\_utilization\_use\_message) | Whether to use the query alert base message for CPU utilization monitor | `bool` | `false` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | | [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | @@ -75,29 +77,36 @@ No modules. | [evictions\_no\_data\_window](#input\_evictions\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [evictions\_threshold\_critical](#input\_evictions\_threshold\_critical) | Critical threshold (count) | `number` | `null` | no | | [evictions\_threshold\_warning](#input\_evictions\_threshold\_warning) | Warning threshold (count) | `number` | `null` | no | +| [evictions\_use\_message](#input\_evictions\_use\_message) | Whether to use the query alert base message for evictions monitor | `bool` | `false` | no | | [hit\_rate\_anomaly\_deviations](#input\_hit\_rate\_anomaly\_deviations) | Standard deviations | `number` | `2` | no | | [hit\_rate\_anomaly\_enabled](#input\_hit\_rate\_anomaly\_enabled) | Enable cache hit rate anomaly monitor | `bool` | `false` | no | | [hit\_rate\_anomaly\_evaluation\_window](#input\_hit\_rate\_anomaly\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_1h"` | no | | [hit\_rate\_anomaly\_no\_data\_window](#input\_hit\_rate\_anomaly\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [hit\_rate\_anomaly\_seasonality](#input\_hit\_rate\_anomaly\_seasonality) | Seasonaility (hourly, daily, weekly) | `string` | `"daily"` | no | | [hit\_rate\_anomaly\_threshold\_critical](#input\_hit\_rate\_anomaly\_threshold\_critical) | Critical threshold (percentage) | `number` | `null` | no | +| [hit\_rate\_anomaly\_use\_message](#input\_hit\_rate\_anomaly\_use\_message) | Whether to use the query alert base message for hit rate anomaly monitor | `bool` | `false` | no | | [hit\_rate\_enabled](#input\_hit\_rate\_enabled) | Enable cache hit rate monitor | `bool` | `false` | no | | [hit\_rate\_evaluation\_window](#input\_hit\_rate\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [hit\_rate\_no\_data\_window](#input\_hit\_rate\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [hit\_rate\_threshold\_critical](#input\_hit\_rate\_threshold\_critical) | Critical threshold (percentage) | `number` | `null` | no | | [hit\_rate\_threshold\_warning](#input\_hit\_rate\_threshold\_warning) | Warning threshold (percentage) | `number` | `null` | no | +| [hit\_rate\_use\_message](#input\_hit\_rate\_use\_message) | Whether to use the query alert base message for hit rate monitor | `bool` | `false` | no | | [max\_connections\_enabled](#input\_max\_connections\_enabled) | Enable max connections monitor | `bool` | `false` | no | | [max\_connections\_evaluation\_window](#input\_max\_connections\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [max\_connections\_no\_data\_window](#input\_max\_connections\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [max\_connections\_threshold\_critical](#input\_max\_connections\_threshold\_critical) | Critical threshold (connections) | `number` | `64000` | no | | [max\_connections\_threshold\_warning](#input\_max\_connections\_threshold\_warning) | Warning threshold (connections) | `number` | `60000` | no | +| [max\_connections\_use\_message](#input\_max\_connections\_use\_message) | Whether to use the query alert base message for max connections monitor | `bool` | `false` | no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_crit\_override](#input\_notify\_crit\_override) | List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | | [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_nonprod\_override](#input\_notify\_nonprod\_override) | List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | @@ -108,6 +117,7 @@ No modules. | [swap\_usage\_no\_data\_window](#input\_swap\_usage\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [swap\_usage\_threshold\_critical](#input\_swap\_usage\_threshold\_critical) | Critical threshold (bytes) | `number` | `52428800` | no | | [swap\_usage\_threshold\_warning](#input\_swap\_usage\_threshold\_warning) | Warning threshold (bytes) | `number` | `null` | no | +| [swap\_usage\_use\_message](#input\_swap\_usage\_use\_message) | Whether to use the query alert base message for swap usage monitor | `bool` | `false` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [timeout\_h](#input\_timeout\_h) | Auto-resolve alert in specified hours if condition no longer matches | `number` | `0` | no | | [title\_prefix](#input\_title\_prefix) | Prefix all alerts with specified value in brackets | `string` | `null` | no | diff --git a/aws/elasticsearch/README.md b/aws/elasticsearch/README.md index ddac429..20ad716 100644 --- a/aws/elasticsearch/README.md +++ b/aws/elasticsearch/README.md @@ -48,9 +48,11 @@ No modules. | [cluster\_health\_red\_enabled](#input\_cluster\_health\_red\_enabled) | Enable cluster health\_red monitor | `bool` | `true` | no | | [cluster\_health\_red\_evaluation\_window](#input\_cluster\_health\_red\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [cluster\_health\_red\_no\_data\_window](#input\_cluster\_health\_red\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | +| [cluster\_health\_red\_use\_message](#input\_cluster\_health\_red\_use\_message) | Whether to use the query alert base message for cluster health red monitor | `bool` | `true` | no | | [cluster\_health\_yellow\_enabled](#input\_cluster\_health\_yellow\_enabled) | Enable cluster health monitor | `bool` | `true` | no | | [cluster\_health\_yellow\_evaluation\_window](#input\_cluster\_health\_yellow\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [cluster\_health\_yellow\_no\_data\_window](#input\_cluster\_health\_yellow\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | +| [cluster\_health\_yellow\_use\_message](#input\_cluster\_health\_yellow\_use\_message) | Whether to use the query alert base message for cluster health yellow monitor | `bool` | `false` | no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [cpu\_utilization\_anomaly\_deviations](#input\_cpu\_utilization\_anomaly\_deviations) | Standard deviations | `number` | `4` | no | | [cpu\_utilization\_anomaly\_enabled](#input\_cpu\_utilization\_anomaly\_enabled) | Enable CPU utilization anomaly monitor | `bool` | `false` | no | @@ -62,26 +64,32 @@ No modules. | [cpu\_utilization\_anomaly\_threshold\_critical](#input\_cpu\_utilization\_anomaly\_threshold\_critical) | Critical threshold (percent) | `number` | `null` | no | | [cpu\_utilization\_anomaly\_threshold\_warning](#input\_cpu\_utilization\_anomaly\_threshold\_warning) | Warning threshold (percent) | `number` | `null` | no | | [cpu\_utilization\_anomaly\_trigger\_window](#input\_cpu\_utilization\_anomaly\_trigger\_window) | Trigger window for anomaly monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_1h"` | no | +| [cpu\_utilization\_anomaly\_use\_message](#input\_cpu\_utilization\_anomaly\_use\_message) | Whether to use the query alert base message for CPU utilization anomaly monitor | `bool` | `false` | no | | [cpu\_utilization\_enabled](#input\_cpu\_utilization\_enabled) | Enable CPU utilization monitor | `bool` | `false` | no | | [cpu\_utilization\_evaluation\_window](#input\_cpu\_utilization\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [cpu\_utilization\_no\_data\_window](#input\_cpu\_utilization\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [cpu\_utilization\_threshold\_critical](#input\_cpu\_utilization\_threshold\_critical) | Critical threshold (percent) | `number` | `0.9` | no | | [cpu\_utilization\_threshold\_warning](#input\_cpu\_utilization\_threshold\_warning) | Warning threshold (percent) | `number` | `0.8` | no | +| [cpu\_utilization\_use\_message](#input\_cpu\_utilization\_use\_message) | Whether to use the query alert base message for CPU utilization monitor | `bool` | `false` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | | [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | | [free\_storage\_enabled](#input\_free\_storage\_enabled) | Enable free storage monitor | `bool` | `true` | no | | [free\_storage\_evaluation\_window](#input\_free\_storage\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [free\_storage\_no\_data\_window](#input\_free\_storage\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [free\_storage\_threshold\_critical](#input\_free\_storage\_threshold\_critical) | Critical threshold (%) | `number` | `90` | no | -| [free\_storage\_threshold\_warning](#input\_free\_storage\_threshold\_warning) | Warning threshold (%) | `number` | `80` | no | +| [free\_storage\_threshold\_critical](#input\_free\_storage\_threshold\_critical) | Critical threshold for used disk space (%) | `number` | `90` | no | +| [free\_storage\_threshold\_warning](#input\_free\_storage\_threshold\_warning) | Warning threshold for used disk space (%) | `number` | `80` | no | +| [free\_storage\_use\_message](#input\_free\_storage\_use\_message) | Whether to use the query alert base message for free storage monitor | `bool` | `true` | no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_crit\_override](#input\_notify\_crit\_override) | List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | | [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_nonprod\_override](#input\_notify\_nonprod\_override) | List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | diff --git a/aws/elb/README.md b/aws/elb/README.md index 776a272..a0edca2 100644 --- a/aws/elb/README.md +++ b/aws/elb/README.md @@ -53,16 +53,19 @@ No modules. | [http\_5xx\_backend\_responses\_no\_data\_window](#input\_http\_5xx\_backend\_responses\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [http\_5xx\_backend\_responses\_threshold\_critical](#input\_http\_5xx\_backend\_responses\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | | [http\_5xx\_backend\_responses\_threshold\_warning](#input\_http\_5xx\_backend\_responses\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | +| [http\_5xx\_backend\_responses\_use\_message](#input\_http\_5xx\_backend\_responses\_use\_message) | Whether to use the query alert base message for HTTP 5xx backend responses monitor | `bool` | `false` | no | | [http\_5xx\_responses\_enabled](#input\_http\_5xx\_responses\_enabled) | Enable HTTP 5xx response monitor | `bool` | `false` | no | | [http\_5xx\_responses\_evaluation\_window](#input\_http\_5xx\_responses\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [http\_5xx\_responses\_no\_data\_window](#input\_http\_5xx\_responses\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [http\_5xx\_responses\_threshold\_critical](#input\_http\_5xx\_responses\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | | [http\_5xx\_responses\_threshold\_warning](#input\_http\_5xx\_responses\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | +| [http\_5xx\_responses\_use\_message](#input\_http\_5xx\_responses\_use\_message) | Whether to use the query alert base message for HTTP 5xx responses monitor | `bool` | `false` | no | | [latency\_enabled](#input\_latency\_enabled) | Enable latency monitor | `bool` | `false` | no | | [latency\_evaluation\_window](#input\_latency\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [latency\_no\_data\_window](#input\_latency\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [latency\_threshold\_critical](#input\_latency\_threshold\_critical) | Critical threshold (seconds) | `number` | `null` | no | | [latency\_threshold\_warning](#input\_latency\_threshold\_warning) | Warning threshold (seconds) | `number` | `null` | no | +| [latency\_use\_message](#input\_latency\_use\_message) | Whether to use the query alert base message for latency monitor | `bool` | `false` | no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | @@ -71,10 +74,14 @@ No modules. | [no\_healthy\_instances\_no\_data\_window](#input\_no\_healthy\_instances\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [no\_healthy\_instances\_threshold\_critical](#input\_no\_healthy\_instances\_threshold\_critical) | Warning threshold (percentage) | `number` | `0` | no | | [no\_healthy\_instances\_threshold\_warning](#input\_no\_healthy\_instances\_threshold\_warning) | Warning threshold (percentage) | `number` | `null` | no | +| [no\_healthy\_instances\_use\_message](#input\_no\_healthy\_instances\_use\_message) | Whether to use the query alert base message for no healthy instances monitor | `bool` | `true` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_crit\_override](#input\_notify\_crit\_override) | List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | | [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_nonprod\_override](#input\_notify\_nonprod\_override) | List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | diff --git a/aws/lambda/README.md b/aws/lambda/README.md index a7403c1..77489b5 100644 --- a/aws/lambda/README.md +++ b/aws/lambda/README.md @@ -55,52 +55,62 @@ No modules. | [cold\_starts\_no\_data\_window](#input\_cold\_starts\_no\_data\_window) | No data threshold (in minutes, null to disable) | `number` | `null` | no | | [cold\_starts\_threshold\_critical](#input\_cold\_starts\_threshold\_critical) | Critical threshold (count) | `number` | `null` | no | | [cold\_starts\_threshold\_warning](#input\_cold\_starts\_threshold\_warning) | Warning threshold (count) | `number` | `null` | no | +| [cold\_starts\_use\_message](#input\_cold\_starts\_use\_message) | Whether to use the query alert base message for cold starts monitor | `bool` | `false` | no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | | [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | -| [error\_rate\_enabled](#input\_error\_rate\_enabled) | Enable Lambda error rate monitor | `bool` | `false` | no | +| [error\_rate\_enabled](#input\_error\_rate\_enabled) | Enable Lambda error rate monitor | `bool` | `true` | no | | [error\_rate\_evaluation\_window](#input\_error\_rate\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [error\_rate\_no\_data\_window](#input\_error\_rate\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [error\_rate\_threshold\_critical](#input\_error\_rate\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | | [error\_rate\_threshold\_warning](#input\_error\_rate\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | +| [error\_rate\_use\_message](#input\_error\_rate\_use\_message) | Whether to use the query alert base message for error rate monitor | `bool` | `true` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | | [iterator\_age\_enabled](#input\_iterator\_age\_enabled) | Enable iterator age monitor | `bool` | `false` | no | | [iterator\_age\_evaluation\_window](#input\_iterator\_age\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_1h"` | no | | [iterator\_age\_forecast\_enabled](#input\_iterator\_age\_forecast\_enabled) | Enable iterator age monitor | `bool` | `false` | no | | [iterator\_age\_forecast\_evaluation\_window](#input\_iterator\_age\_forecast\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_1d"` | no | | [iterator\_age\_forecast\_no\_data\_window](#input\_iterator\_age\_forecast\_no\_data\_window) | No data threshold (in minutes, null to disable) | `number` | `null` | no | +| [iterator\_age\_forecast\_use\_message](#input\_iterator\_age\_forecast\_use\_message) | Whether to use the query alert base message for iterator age forecast monitor | `bool` | `false` | no | | [iterator\_age\_no\_data\_window](#input\_iterator\_age\_no\_data\_window) | No data threshold (in minutes, null to disable) | `number` | `null` | no | | [iterator\_age\_threshold\_critical](#input\_iterator\_age\_threshold\_critical) | Critical threshold (milliseconds) | `number` | `86400000` | no | | [iterator\_age\_threshold\_warning](#input\_iterator\_age\_threshold\_warning) | Warning threshold (milliseconds) | `number` | `null` | no | +| [iterator\_age\_use\_message](#input\_iterator\_age\_use\_message) | Whether to use the query alert base message for iterator age monitor | `bool` | `false` | no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_crit\_override](#input\_notify\_crit\_override) | List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | | [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_nonprod\_override](#input\_notify\_nonprod\_override) | List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | -| [out\_of\_memory\_enabled](#input\_out\_of\_memory\_enabled) | Enable out of memory monitor (requires enhanced metrics) | `bool` | `false` | no | +| [out\_of\_memory\_enabled](#input\_out\_of\_memory\_enabled) | Enable out of memory monitor (requires enhanced metrics) | `bool` | `true` | no | | [out\_of\_memory\_evaluation\_window](#input\_out\_of\_memory\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_4h"` | no | | [out\_of\_memory\_no\_data\_window](#input\_out\_of\_memory\_no\_data\_window) | No data threshold (in minutes, null to disable) | `number` | `null` | no | -| [out\_of\_memory\_threshold\_critical](#input\_out\_of\_memory\_threshold\_critical) | Critical threshold (count) | `number` | `null` | no | +| [out\_of\_memory\_threshold\_critical](#input\_out\_of\_memory\_threshold\_critical) | Critical threshold (count) | `number` | `5` | no | | [out\_of\_memory\_threshold\_warning](#input\_out\_of\_memory\_threshold\_warning) | Warning threshold (count) | `number` | `null` | no | +| [out\_of\_memory\_use\_message](#input\_out\_of\_memory\_use\_message) | Whether to use the query alert base message for out of memory monitor | `bool` | `false` | no | | [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | -| [throttle\_rate\_enabled](#input\_throttle\_rate\_enabled) | Enable Lambda throttle rate monitor | `bool` | `false` | no | +| [throttle\_rate\_enabled](#input\_throttle\_rate\_enabled) | Enable Lambda throttle rate monitor | `bool` | `true` | no | | [throttle\_rate\_evaluation\_window](#input\_throttle\_rate\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [throttle\_rate\_no\_data\_window](#input\_throttle\_rate\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [throttle\_rate\_threshold\_critical](#input\_throttle\_rate\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | | [throttle\_rate\_threshold\_warning](#input\_throttle\_rate\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | +| [throttle\_rate\_use\_message](#input\_throttle\_rate\_use\_message) | Whether to use the query alert base message for throttle rate monitor | `bool` | `false` | no | | [timeout\_h](#input\_timeout\_h) | Auto-resolve alert in specified hours if condition no longer matches | `number` | `0` | no | -| [timeouts\_enabled](#input\_timeouts\_enabled) | Enable timeout count monitor | `bool` | `false` | no | +| [timeouts\_enabled](#input\_timeouts\_enabled) | Enable timeout count monitor | `bool` | `true` | no | | [timeouts\_evaluation\_window](#input\_timeouts\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [timeouts\_no\_data\_window](#input\_timeouts\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [timeouts\_threshold\_critical](#input\_timeouts\_threshold\_critical) | Critical threshold (count) | `number` | `75` | no | | [timeouts\_threshold\_warning](#input\_timeouts\_threshold\_warning) | Warning threshold (count) | `number` | `25` | no | +| [timeouts\_use\_message](#input\_timeouts\_use\_message) | Whether to use the query alert base message for timeouts monitor | `bool` | `false` | no | | [title\_prefix](#input\_title\_prefix) | Prefix all alerts with specified value in brackets | `string` | `null` | no | | [title\_suffix](#input\_title\_suffix) | Suffix all alerts with specified value in parenthesis | `string` | `null` | no | | [warn\_priority](#input\_warn\_priority) | Priority for alerts with no data (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | diff --git a/aws/rds/README.md b/aws/rds/README.md index 2f3e192..130995c 100644 --- a/aws/rds/README.md +++ b/aws/rds/README.md @@ -46,15 +46,16 @@ No modules. | [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | | [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:rds"
]
| no | | [connection\_count\_anomaly\_deviations](#input\_connection\_count\_anomaly\_deviations) | Standard deviations | `number` | `3` | no | -| [connection\_count\_anomaly\_enabled](#input\_connection\_count\_anomaly\_enabled) | Enable CPU utilization anomaly monitor | `bool` | `false` | no | +| [connection\_count\_anomaly\_enabled](#input\_connection\_count\_anomaly\_enabled) | Enable CPU utilization anomaly monitor | `bool` | `true` | no | | [connection\_count\_anomaly\_evaluation\_window](#input\_connection\_count\_anomaly\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_1h"` | no | | [connection\_count\_anomaly\_no\_data\_window](#input\_connection\_count\_anomaly\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [connection\_count\_anomaly\_recovery\_window](#input\_connection\_count\_anomaly\_recovery\_window) | Recovery window for anomaly monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_15m"` | no | | [connection\_count\_anomaly\_rollup](#input\_connection\_count\_anomaly\_rollup) | Rollup interval (must be sized based on evaluation window/span and seasonaility) | `number` | `60` | no | | [connection\_count\_anomaly\_seasonality](#input\_connection\_count\_anomaly\_seasonality) | Seasonaility (hourly, daily, weekly) | `string` | `"weekly"` | no | -| [connection\_count\_anomaly\_threshold\_critical](#input\_connection\_count\_anomaly\_threshold\_critical) | Critical threshold (percent) | `number` | `null` | no | +| [connection\_count\_anomaly\_threshold\_critical](#input\_connection\_count\_anomaly\_threshold\_critical) | Critical threshold (percent) | `number` | `0.75` | no | | [connection\_count\_anomaly\_threshold\_warning](#input\_connection\_count\_anomaly\_threshold\_warning) | Warning threshold (percent) | `number` | `null` | no | | [connection\_count\_anomaly\_trigger\_window](#input\_connection\_count\_anomaly\_trigger\_window) | Trigger window for anomaly monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_1h"` | no | +| [connection\_count\_anomaly\_use\_message](#input\_connection\_count\_anomaly\_use\_message) | Whether to use the query alert base message for connection count anomaly monitor | `bool` | `true` | no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [cpu\_utilization\_anomaly\_deviations](#input\_cpu\_utilization\_anomaly\_deviations) | Standard deviations | `number` | `4` | no | | [cpu\_utilization\_anomaly\_enabled](#input\_cpu\_utilization\_anomaly\_enabled) | Enable CPU utilization anomaly monitor | `bool` | `false` | no | @@ -66,11 +67,13 @@ No modules. | [cpu\_utilization\_anomaly\_threshold\_critical](#input\_cpu\_utilization\_anomaly\_threshold\_critical) | Critical threshold (percent) | `number` | `null` | no | | [cpu\_utilization\_anomaly\_threshold\_warning](#input\_cpu\_utilization\_anomaly\_threshold\_warning) | Warning threshold (percent) | `number` | `null` | no | | [cpu\_utilization\_anomaly\_trigger\_window](#input\_cpu\_utilization\_anomaly\_trigger\_window) | Trigger window for anomaly monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_1h"` | no | -| [cpu\_utilization\_enabled](#input\_cpu\_utilization\_enabled) | Enable CPU utilization monitor | `bool` | `false` | no | +| [cpu\_utilization\_anomaly\_use\_message](#input\_cpu\_utilization\_anomaly\_use\_message) | Whether to use the query alert base message for CPU utilization anomaly monitor | `bool` | `false` | no | +| [cpu\_utilization\_enabled](#input\_cpu\_utilization\_enabled) | Enable CPU utilization monitor | `bool` | `true` | no | | [cpu\_utilization\_evaluation\_window](#input\_cpu\_utilization\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [cpu\_utilization\_no\_data\_window](#input\_cpu\_utilization\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [cpu\_utilization\_threshold\_critical](#input\_cpu\_utilization\_threshold\_critical) | Critical threshold (percent) | `number` | `90` | no | | [cpu\_utilization\_threshold\_warning](#input\_cpu\_utilization\_threshold\_warning) | Warning threshold (percent) | `number` | `80` | no | +| [cpu\_utilization\_use\_message](#input\_cpu\_utilization\_use\_message) | Whether to use the query alert base message for CPU utilization monitor | `bool` | `false` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | | [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | @@ -78,9 +81,12 @@ No modules. | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_crit\_override](#input\_notify\_crit\_override) | List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | | [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_nonprod\_override](#input\_notify\_nonprod\_override) | List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | @@ -95,6 +101,7 @@ No modules. | [used\_storage\_no\_data\_window](#input\_used\_storage\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [used\_storage\_threshold\_critical](#input\_used\_storage\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `90` | no | | [used\_storage\_threshold\_warning](#input\_used\_storage\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `80` | no | +| [used\_storage\_use\_message](#input\_used\_storage\_use\_message) | Whether to use the query alert base message for used storage monitor | `bool` | `true` | no | | [warn\_priority](#input\_warn\_priority) | Priority for alerts with no data (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | ## Outputs diff --git a/aws/sqs/README.md b/aws/sqs/README.md index abd566f..2d27fa4 100644 --- a/aws/sqs/README.md +++ b/aws/sqs/README.md @@ -48,9 +48,12 @@ No modules. | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_crit\_override](#input\_notify\_crit\_override) | List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | | [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_nonprod\_override](#input\_notify\_nonprod\_override) | List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [oldest\_message\_enabled](#input\_oldest\_message\_enabled) | Enable oldest queued message monitor | `bool` | `false` | no | @@ -58,11 +61,13 @@ No modules. | [oldest\_message\_no\_data\_window](#input\_oldest\_message\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [oldest\_message\_threshold\_critical](#input\_oldest\_message\_threshold\_critical) | Critical threshold (seconds) | `number` | `75` | no | | [oldest\_message\_threshold\_warning](#input\_oldest\_message\_threshold\_warning) | Warning threshold (seconds) | `number` | `null` | no | +| [oldest\_message\_use\_message](#input\_oldest\_message\_use\_message) | Whether to use the query alert base message for oldest message monitor | `bool` | `false` | no | | [queue\_depth\_enabled](#input\_queue\_depth\_enabled) | Enable queue depth count monitor | `bool` | `false` | no | | [queue\_depth\_evaluation\_window](#input\_queue\_depth\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [queue\_depth\_no\_data\_window](#input\_queue\_depth\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [queue\_depth\_threshold\_critical](#input\_queue\_depth\_threshold\_critical) | Critical threshold (count) | `number` | `null` | no | | [queue\_depth\_threshold\_warning](#input\_queue\_depth\_threshold\_warning) | Warning threshold (count) | `number` | `null` | no | +| [queue\_depth\_use\_message](#input\_queue\_depth\_use\_message) | Whether to use the query alert base message for queue depth monitor | `bool` | `false` | no | | [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | diff --git a/aws/vpn/README.md b/aws/vpn/README.md index 9b9bab1..662a44a 100644 --- a/aws/vpn/README.md +++ b/aws/vpn/README.md @@ -44,9 +44,12 @@ No modules. | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_crit\_override](#input\_notify\_crit\_override) | List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | | [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_nonprod\_override](#input\_notify\_nonprod\_override) | List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | From 2dcfd553e3c0dbd8502d7deab51d765968c8f717 Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 17 Oct 2024 11:03:02 -0400 Subject: [PATCH 54/77] changing some defaults --- aws/alb/variables.tf | 6 +++--- aws/elasticsearch/variables.tf | 2 +- common/common.tf | 6 +----- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/aws/alb/variables.tf b/aws/alb/variables.tf index 0637625..dff2e8d 100644 --- a/aws/alb/variables.tf +++ b/aws/alb/variables.tf @@ -17,7 +17,7 @@ variable "base_tags" { # HTTP 5xx Response Codes (ALB) ######################################## variable "http_5xx_responses_enabled" { - default = false + default = true description = "Enable HTTP 5xx response monitor" type = bool } @@ -56,7 +56,7 @@ variable "http_5xx_responses_use_message" { # HTTP 5xx Response Codes (Target Group) ######################################## variable "http_5xx_tg_responses_enabled" { - default = false + default = true description = "Enable HTTP 5xx response monitor (target group)" type = bool } @@ -95,7 +95,7 @@ variable "http_5xx_tg_responses_use_message" { # Latency Instances ######################################## variable "latency_enabled" { - default = false + default = true description = "Enable latency monitor" type = bool } diff --git a/aws/elasticsearch/variables.tf b/aws/elasticsearch/variables.tf index 9cc6ab5..d251705 100644 --- a/aws/elasticsearch/variables.tf +++ b/aws/elasticsearch/variables.tf @@ -71,7 +71,7 @@ variable "cluster_health_yellow_use_message" { # Node CPU Utilization ######################################## variable "cpu_utilization_enabled" { - default = false + default = true description = "Enable CPU utilization monitor" type = bool } diff --git a/common/common.tf b/common/common.tf index 6d90a63..878a37c 100644 --- a/common/common.tf +++ b/common/common.tf @@ -286,9 +286,6 @@ END query_alert_base_message = < Date: Mon, 21 Oct 2024 12:50:14 -0400 Subject: [PATCH 55/77] ALB latency default --- aws/alb/variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/alb/variables.tf b/aws/alb/variables.tf index dff2e8d..e9e4912 100644 --- a/aws/alb/variables.tf +++ b/aws/alb/variables.tf @@ -113,7 +113,7 @@ variable "latency_no_data_window" { } variable "latency_threshold_critical" { - default = null + default = 3 description = "Critical threshold (seconds)" type = number } From 370d8c5ae5176d45d71c85026e7e6dc215b93f6f Mon Sep 17 00:00:00 2001 From: Kevin Date: Mon, 21 Oct 2024 15:08:07 -0400 Subject: [PATCH 56/77] errant space --- aws/alb/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/alb/main.tf b/aws/alb/main.tf index 2681e66..e5449ca 100644 --- a/aws/alb/main.tf +++ b/aws/alb/main.tf @@ -72,7 +72,7 @@ END resource "datadog_monitor" "latency" { count = var.latency_enabled ? 1 : 0 - name = join("", [local.title_prefix, "ALB latency - {{loadbalancer.name}} {{value}}s ", local.title_suffix]) + name = join("", [local.title_prefix, "ALB latency - {{loadbalancer.name}} {{value}}s", local.title_suffix]) include_tags = false message = var.latency_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) From 17405b7420426598c915bf22f6be73883bbf2101 Mon Sep 17 00:00:00 2001 From: Kevin Date: Mon, 11 Nov 2024 13:41:15 -0500 Subject: [PATCH 57/77] monitor updates --- aws/elasticsearch/variables.tf | 4 ++-- aws/rds/variables.tf | 2 +- host/agent/main.tf | 14 ++++++----- host/agent/variables.tf | 6 +++++ host/clock/main.tf | 11 +++++---- host/clock/variables.tf | 6 +++++ host/cpu/main.tf | 12 ++++++---- host/cpu/variables.tf | 6 +++++ host/disk/main.tf | 24 +++++++++---------- host/disk/variables.tf | 18 ++++++++++++++ host/memory/main.tf | 12 +++++----- host/memory/variables.tf | 6 +++++ host/process/main.tf | 6 ++--- host/process/variables.tf | 6 +++++ host/swap/main.tf | 10 ++++---- host/swap/variables.tf | 6 +++++ synthetics/ssl/main.tf | 43 +++++++++++++++++++++++++--------- synthetics/ssl/variables.tf | 22 +++++++++++++++-- 18 files changed, 156 insertions(+), 58 deletions(-) diff --git a/aws/elasticsearch/variables.tf b/aws/elasticsearch/variables.tf index d251705..66172c2 100644 --- a/aws/elasticsearch/variables.tf +++ b/aws/elasticsearch/variables.tf @@ -89,13 +89,13 @@ variable "cpu_utilization_evaluation_window" { } variable "cpu_utilization_threshold_critical" { - default = 0.90 + default = 90 description = "Critical threshold (percent)" type = number } variable "cpu_utilization_threshold_warning" { - default = 0.80 + default = 80 description = "Warning threshold (percent)" type = number } diff --git a/aws/rds/variables.tf b/aws/rds/variables.tf index 64f2191..2f085d9 100644 --- a/aws/rds/variables.tf +++ b/aws/rds/variables.tf @@ -23,7 +23,7 @@ variable "connection_count_anomaly_enabled" { } variable "connection_count_anomaly_evaluation_window" { - default = "last_1h" + default = "last_4h" description = "Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`]" type = string } diff --git a/host/agent/main.tf b/host/agent/main.tf index 7377cdb..dc54b4d 100644 --- a/host/agent/main.tf +++ b/host/agent/main.tf @@ -4,32 +4,34 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}[${var.env}] " + title_prefix = var.title_prefix == null ? "" : "[${var.title_prefix}]" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } resource "datadog_monitor" "host_unreachable" { count = var.host_unreachable_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Host Unreachable - {{host.name}}", local.title_suffix]) - message = local.query_alert_base_message + name = join("", [local.title_prefix, "Datadog Agent Status - {{name.name}}", local.title_suffix]) + include_tags = false + message = var.host_unreachable_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "service check" evaluation_delay = var.evaluation_delay new_group_delay = var.new_group_delay - notify_no_data = var.notify_no_data + no_data_timeframe = "5" + notify_no_data = true renotify_interval = var.renotify_interval require_full_window = true timeout_h = var.timeout_h query = < ${var.cpu_utilization_threshold_critical} EOQ diff --git a/host/cpu/variables.tf b/host/cpu/variables.tf index 049e904..69e1f30 100644 --- a/host/cpu/variables.tf +++ b/host/cpu/variables.tf @@ -51,3 +51,9 @@ variable "cpu_utilization_threshold_warning" { description = "Warning threshold (percent)" type = number } + +variable "cpu_utilization_use_message" { + default = false + description = "Flag to enable CPU Utilitzation alerting" + type = bool +} \ No newline at end of file diff --git a/host/disk/main.tf b/host/disk/main.tf index ca4ce0f..e6e4c4c 100644 --- a/host/disk/main.tf +++ b/host/disk/main.tf @@ -4,15 +4,15 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}[${var.env}] " + title_prefix = var.title_prefix == null ? "" : "[${var.title_prefix}]" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } resource "datadog_monitor" "disk_space" { count = var.disk_space_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Disk Space - {{host.name}}", local.title_suffix]) - message = local.query_alert_base_message + name = join("", [local.title_prefix, "Disk Space - {{name.name}}", local.title_suffix]) + message = var.disk_space_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -26,7 +26,7 @@ resource "datadog_monitor" "disk_space" { query = < ${var.disk_space_threshold_critical} EOQ @@ -39,8 +39,9 @@ resource "datadog_monitor" "disk_space" { resource "datadog_monitor" "disk_space_forecast" { count = var.disk_space_forecast_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Disk Space Forecast - {{host.name}}", local.title_suffix]) - message = local.query_alert_base_message + name = join("", [local.title_prefix, "Disk Space Forecast - {{name.name}}", local.title_suffix]) + include_tags = false + message = var.disk_space_forecast_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -48,14 +49,13 @@ resource "datadog_monitor" "disk_space_forecast" { new_group_delay = var.new_group_delay notify_audit = false timeout_h = var.timeout_h - include_tags = true require_full_window = true notify_no_data = false renotify_interval = 0 query = < ${var.disk_inodes_threshold_critical} EOQ @@ -90,7 +91,6 @@ resource "datadog_monitor" "disk_inodes" { notify_no_data = false notify_audit = false timeout_h = var.timeout_h - include_tags = true require_full_window = true monitor_thresholds { diff --git a/host/disk/variables.tf b/host/disk/variables.tf index b9c36fa..7b6e21a 100644 --- a/host/disk/variables.tf +++ b/host/disk/variables.tf @@ -46,6 +46,12 @@ variable "disk_space_threshold_critical" { default = 90 } +variable "disk_space_use_message" { + description = "Flag to enable Free diskspace alerting" + type = string + default = "true" +} + ######################################## # Disk Space Forecast ######################################## @@ -115,6 +121,12 @@ variable "disk_space_forecast_threshold_critical" { default = 80 } +variable "disk_space_forecast_use_message" { + description = "Flag to enable Free diskspace forecast alerting" + type = string + default = "false" +} + ######################################## # Disk Inodes ######################################## @@ -147,3 +159,9 @@ variable "disk_inodes_threshold_critical" { type = number default = 95 } + +variable "disk_inodes_use_message" { + description = "Flag to enable Free disk inodes alerting" + type = string + default = "true" +} \ No newline at end of file diff --git a/host/memory/main.tf b/host/memory/main.tf index 129bd45..d5e1ac5 100644 --- a/host/memory/main.tf +++ b/host/memory/main.tf @@ -4,22 +4,23 @@ locals { monitor_warn_default_priority = null monitor_nodata_default_priority = null - title_prefix = "${var.title_prefix == null ? "" : "[${var.title_prefix}]"}[${var.env}] " + title_prefix = var.title_prefix == null ? "" : "[${var.title_prefix}]" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" } resource "datadog_monitor" "memory" { count = var.memory_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Usable Memory - {{host.name}}", local.title_suffix]) - message = local.query_alert_base_message + name = join("", [local.title_prefix, "Usable Memory - {{name.name}}", local.title_suffix]) + include_tags = false + message = var.memory_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" query = < Date: Wed, 5 Mar 2025 08:57:22 -0500 Subject: [PATCH 58/77] Set default renotify interval to 1 hour --- common/common.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/common.tf b/common/common.tf index 878a37c..84135b5 100644 --- a/common/common.tf +++ b/common/common.tf @@ -64,7 +64,7 @@ variable "notify_no_data" { } variable "renotify_interval" { - default = 0 + default = 60 description = "Interval in minutes to re-send notifications about an alert" type = number } From fd02a5fbf0734f1b19c683a2faa5dc20cd2393c3 Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Thu, 13 Mar 2025 12:35:47 -0600 Subject: [PATCH 59/77] ensure rds used_storage monitor excludes aurora instances --- .pre-commit-config.yaml | 2 +- .tflint.hcl | 2 +- aws/rds/README.md | 6 +++--- aws/rds/main.tf | 14 ++++++++++---- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c2b3f6d..d2bcbd4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: - id: terraform_validate exclude: common args: - - --hook-config=--retry-once-with-cleanup=true + - --hook-config=--retry-once-with-cleanup=true - id: terraform_tflint alias: terraform_tflint_nocreds name: terraform_tflint_nocreds diff --git a/.tflint.hcl b/.tflint.hcl index 5379e3b..8224c09 100644 --- a/.tflint.hcl +++ b/.tflint.hcl @@ -1,5 +1,5 @@ config { - module = true + call_module_type = "all" } plugin "aws" { diff --git a/aws/rds/README.md b/aws/rds/README.md index 130995c..4cdccc4 100644 --- a/aws/rds/README.md +++ b/aws/rds/README.md @@ -44,10 +44,10 @@ No modules. | [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | | [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | | [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | -| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:rds"
]
| no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:rds"
]
| no | | [connection\_count\_anomaly\_deviations](#input\_connection\_count\_anomaly\_deviations) | Standard deviations | `number` | `3` | no | | [connection\_count\_anomaly\_enabled](#input\_connection\_count\_anomaly\_enabled) | Enable CPU utilization anomaly monitor | `bool` | `true` | no | -| [connection\_count\_anomaly\_evaluation\_window](#input\_connection\_count\_anomaly\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_1h"` | no | +| [connection\_count\_anomaly\_evaluation\_window](#input\_connection\_count\_anomaly\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_4h"` | no | | [connection\_count\_anomaly\_no\_data\_window](#input\_connection\_count\_anomaly\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [connection\_count\_anomaly\_recovery\_window](#input\_connection\_count\_anomaly\_recovery\_window) | Recovery window for anomaly monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_15m"` | no | | [connection\_count\_anomaly\_rollup](#input\_connection\_count\_anomaly\_rollup) | Rollup interval (must be sized based on evaluation window/span and seasonaility) | `number` | `60` | no | @@ -89,7 +89,7 @@ No modules. | [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | -| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `60` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | diff --git a/aws/rds/main.tf b/aws/rds/main.tf index c64956c..1d4f125 100644 --- a/aws/rds/main.tf +++ b/aws/rds/main.tf @@ -1,11 +1,17 @@ locals { # these must be defined but do not need to be overridden - monitor_alert_default_priority = null - monitor_warn_default_priority = null + # tflint-ignore: terraform_unused_declarations + monitor_alert_default_priority = null + # tflint-ignore: terraform_unused_declarations + monitor_warn_default_priority = null + # tflint-ignore: terraform_unused_declarations monitor_nodata_default_priority = null title_prefix = var.title_prefix == null ? "" : "[${var.title_prefix}]" title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" + + # Add RDS-specific query filter to exclude + rds_query_filter = "{!engine:aurora*,${trimprefix(local.query_filter, "{")}" } resource "datadog_monitor" "connection_count_anomaly" { @@ -129,8 +135,8 @@ resource "datadog_monitor" "used_storage" { query = <= ${var.used_storage_threshold_critical} END From 7bfee9d3ac10eaa9ef06ccf101e87e76278564d7 Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 27 Mar 2025 13:06:15 -0400 Subject: [PATCH 60/77] add windows_service service monitor --- host/windows/README.md | 69 +++++++++++++++++++++++++++++++++++++++ host/windows/common.tf | 1 + host/windows/main.tf | 35 ++++++++++++++++++++ host/windows/variables.tf | 47 ++++++++++++++++++++++++++ host/windows/versions.tf | 1 + 5 files changed, 153 insertions(+) create mode 100644 host/windows/README.md create mode 120000 host/windows/common.tf create mode 100644 host/windows/main.tf create mode 100644 host/windows/variables.tf create mode 120000 host/windows/versions.tf diff --git a/host/windows/README.md b/host/windows/README.md new file mode 100644 index 0000000..91e385b --- /dev/null +++ b/host/windows/README.md @@ -0,0 +1,69 @@ + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | ~> 1.5 | +| [datadog](#requirement\_datadog) | >= 3.37 | +| [null](#requirement\_null) | >= 3.1.0 | + +## Providers + +| Name | Version | +|------|---------| +| [datadog](#provider\_datadog) | >= 3.37 | + +## Modules + +No modules. + +## Resources + +| Name | Type | +|------|------| +| [datadog_monitor.windows_service](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [additional\_tags](#input\_additional\_tags) | Additional tags to apply to all monitors | `list(string)` | `[]` | no | +| [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | +| [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [base\_tags](#input\_base\_tags) | Base tags to apply to all monitors | `list(string)` | `[]` | no | +| [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | +| [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | +| [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | +| [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_crit\_override](#input\_notify\_crit\_override) | List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | +| [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | +| [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_nonprod\_override](#input\_notify\_nonprod\_override) | List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `60` | no | +| [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | +| [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [timeout\_h](#input\_timeout\_h) | Auto-resolve alert in specified hours if condition no longer matches | `number` | `0` | no | +| [title\_prefix](#input\_title\_prefix) | Prefix all alerts with specified value in brackets | `string` | `null` | no | +| [title\_suffix](#input\_title\_suffix) | Suffix all alerts with specified value in parenthesis | `string` | `null` | no | +| [warn\_priority](#input\_warn\_priority) | Priority for alerts with no data (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [windows\_service\_alert\_enabled](#input\_windows\_service\_alert\_enabled) | Enable or disable the Windows service alert monitor | `bool` | `true` | no | +| [windows\_service\_alert\_operator](#input\_windows\_service\_alert\_operator) | Operator for the Windows service alert threshold comparison | `string` | `"<"` | no | +| [windows\_service\_alert\_threshold\_critical](#input\_windows\_service\_alert\_threshold\_critical) | Critical threshold for the Windows service alert | `number` | `1` | no | +| [windows\_service\_alert\_threshold\_warning](#input\_windows\_service\_alert\_threshold\_warning) | Warning threshold for the Windows service alert | `number` | `2` | no | +| [windows\_service\_alert\_timeframe](#input\_windows\_service\_alert\_timeframe) | Timeframe for the Windows service alert evaluation | `string` | `"5m"` | no | +| [windows\_service\_alert\_use\_message](#input\_windows\_service\_alert\_use\_message) | Whether to use the base message for the Windows service alert | `bool` | `true` | no | + +## Outputs + +No outputs. + \ No newline at end of file diff --git a/host/windows/common.tf b/host/windows/common.tf new file mode 120000 index 0000000..47c0063 --- /dev/null +++ b/host/windows/common.tf @@ -0,0 +1 @@ +../../common/common.tf \ No newline at end of file diff --git a/host/windows/main.tf b/host/windows/main.tf new file mode 100644 index 0000000..07b0573 --- /dev/null +++ b/host/windows/main.tf @@ -0,0 +1,35 @@ +locals { + # these must be defined but do not need to be overridden + monitor_alert_default_priority = null + monitor_warn_default_priority = null + monitor_nodata_default_priority = null + + title_prefix = var.title_prefix == null ? "" : "[${var.title_prefix}]" + title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" +} + +resource "datadog_monitor" "windows_service" { + count = var.windows_service_alert_enabled ? 1 : 0 + + name = join("", [local.title_prefix, "Windows Service Alert - {{host.name}}", local.title_suffix]) + message = var.windows_service_alert_use_message ? local.query_alert_base_message : "" + tags = concat(local.common_tags, var.base_tags, var.additional_tags) + type = "service check" + + evaluation_delay = var.evaluation_delay + notify_no_data = false + renotify_interval = 0 + notify_audit = false + timeout_h = var.timeout_h + include_tags = false + require_full_window = true + + query = < Date: Wed, 9 Apr 2025 12:55:47 -0400 Subject: [PATCH 61/77] update windows service query --- host/windows/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/windows/main.tf b/host/windows/main.tf index 07b0573..73ce626 100644 --- a/host/windows/main.tf +++ b/host/windows/main.tf @@ -25,7 +25,7 @@ resource "datadog_monitor" "windows_service" { require_full_window = true query = < Date: Mon, 14 Apr 2025 12:26:32 -0400 Subject: [PATCH 62/77] add elasticache memory monitor --- aws/elasticache/README.md | 9 ++++++++- aws/elasticache/main.tf | 29 +++++++++++++++++++++++++++ aws/elasticache/variables.tf | 39 ++++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+), 1 deletion(-) diff --git a/aws/elasticache/README.md b/aws/elasticache/README.md index 67890f6..e55b60c 100644 --- a/aws/elasticache/README.md +++ b/aws/elasticache/README.md @@ -40,6 +40,7 @@ No modules. | [datadog_monitor.hit_rate](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | | [datadog_monitor.hit_rate_anomaly](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | | [datadog_monitor.max_connections](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | +| [datadog_monitor.memory_utilization](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | | [datadog_monitor.swap_usage](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | ## Inputs @@ -97,6 +98,12 @@ No modules. | [max\_connections\_threshold\_critical](#input\_max\_connections\_threshold\_critical) | Critical threshold (connections) | `number` | `64000` | no | | [max\_connections\_threshold\_warning](#input\_max\_connections\_threshold\_warning) | Warning threshold (connections) | `number` | `60000` | no | | [max\_connections\_use\_message](#input\_max\_connections\_use\_message) | Whether to use the query alert base message for max connections monitor | `bool` | `false` | no | +| [memory\_utilization\_enabled](#input\_memory\_utilization\_enabled) | Enable memory utilization monitor | `bool` | `false` | no | +| [memory\_utilization\_evaluation\_window](#input\_memory\_utilization\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`) | `string` | `"last_1h"` | no | +| [memory\_utilization\_no\_data\_window](#input\_memory\_utilization\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `15` | no | +| [memory\_utilization\_threshold\_critical](#input\_memory\_utilization\_threshold\_critical) | Critical threshold (percentage) | `number` | `80` | no | +| [memory\_utilization\_threshold\_warning](#input\_memory\_utilization\_threshold\_warning) | Warning threshold (percentage) | `number` | `70` | no | +| [memory\_utilization\_use\_message](#input\_memory\_utilization\_use\_message) | Whether to use the query alert base message for memory utilization monitor | `bool` | `false` | no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | @@ -109,7 +116,7 @@ No modules. | [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | -| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `60` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [swap\_usage\_enabled](#input\_swap\_usage\_enabled) | Enable swap usage monitor | `bool` | `false` | no | diff --git a/aws/elasticache/main.tf b/aws/elasticache/main.tf index 2ad69b1..b214f3d 100644 --- a/aws/elasticache/main.tf +++ b/aws/elasticache/main.tf @@ -212,3 +212,32 @@ END warning = var.swap_usage_threshold_warning } } + +resource "datadog_monitor" "memory_utilization" { + count = var.memory_utilization_enabled ? 1 : 0 + + name = join("", [local.title_prefix, "Elasticache Memory Utilization - {{replication_group.name}} - {{value}}%", local.title_suffix]) + include_tags = false + message = var.memory_utilization_use_message ? local.query_alert_base_message : "" + tags = concat(local.common_tags, var.base_tags, var.additional_tags) + type = "query alert" + + evaluation_delay = var.evaluation_delay + new_group_delay = var.new_group_delay + notify_no_data = var.notify_no_data + no_data_timeframe = var.memory_utilization_no_data_window + renotify_interval = var.renotify_interval + require_full_window = true + timeout_h = var.timeout_h + + query = <= ${var.memory_utilization_threshold_critical} +END + + monitor_thresholds { + critical = var.memory_utilization_threshold_critical + warning = var.memory_utilization_threshold_warning + } +} diff --git a/aws/elasticache/variables.tf b/aws/elasticache/variables.tf index da5dd70..f4e163d 100644 --- a/aws/elasticache/variables.tf +++ b/aws/elasticache/variables.tf @@ -321,3 +321,42 @@ variable "swap_usage_use_message" { type = bool default = false } + +######################################## +# Memory Utilization +######################################## +variable "memory_utilization_enabled" { + default = false + description = "Enable memory utilization monitor" + type = bool +} + +variable "memory_utilization_evaluation_window" { + default = "last_1h" + description = "Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`)" + type = string +} + +variable "memory_utilization_no_data_window" { + default = 15 + description = "No data threshold (in minutes, 0 to disable)" + type = number +} + +variable "memory_utilization_threshold_critical" { + default = 80 + description = "Critical threshold (percentage)" + type = number +} + +variable "memory_utilization_threshold_warning" { + default = 70 + description = "Warning threshold (percentage)" + type = number +} + +variable "memory_utilization_use_message" { + description = "Whether to use the query alert base message for memory utilization monitor" + type = bool + default = false +} From b9149c2d9b72c5a65e6c217b62a88d66e0751087 Mon Sep 17 00:00:00 2001 From: Kevin Date: Mon, 14 Apr 2025 12:26:44 -0400 Subject: [PATCH 63/77] update READMEs --- aws/alb/README.md | 10 +++++----- aws/apigateway/README.md | 2 +- aws/beanstalk/README.md | 2 +- aws/ec2/README.md | 2 +- aws/ecs-cluster/README.md | 2 +- aws/ecs-fargate/README.md | 2 +- aws/ecs-service/README.md | 2 +- aws/elasticsearch/README.md | 8 ++++---- aws/elb/README.md | 2 +- aws/lambda/README.md | 2 +- aws/rds/README.md | 2 +- aws/sqs/README.md | 2 +- aws/vpn/README.md | 2 +- 13 files changed, 20 insertions(+), 20 deletions(-) diff --git a/aws/alb/README.md b/aws/alb/README.md index 039a2bb..44f2709 100644 --- a/aws/alb/README.md +++ b/aws/alb/README.md @@ -48,22 +48,22 @@ No modules. | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | | [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | -| [http\_5xx\_responses\_enabled](#input\_http\_5xx\_responses\_enabled) | Enable HTTP 5xx response monitor | `bool` | `false` | no | +| [http\_5xx\_responses\_enabled](#input\_http\_5xx\_responses\_enabled) | Enable HTTP 5xx response monitor | `bool` | `true` | no | | [http\_5xx\_responses\_evaluation\_window](#input\_http\_5xx\_responses\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [http\_5xx\_responses\_no\_data\_window](#input\_http\_5xx\_responses\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [http\_5xx\_responses\_threshold\_critical](#input\_http\_5xx\_responses\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | | [http\_5xx\_responses\_threshold\_warning](#input\_http\_5xx\_responses\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | | [http\_5xx\_responses\_use\_message](#input\_http\_5xx\_responses\_use\_message) | Whether to use the query alert base message | `bool` | `false` | no | -| [http\_5xx\_tg\_responses\_enabled](#input\_http\_5xx\_tg\_responses\_enabled) | Enable HTTP 5xx response monitor (target group) | `bool` | `false` | no | +| [http\_5xx\_tg\_responses\_enabled](#input\_http\_5xx\_tg\_responses\_enabled) | Enable HTTP 5xx response monitor (target group) | `bool` | `true` | no | | [http\_5xx\_tg\_responses\_evaluation\_window](#input\_http\_5xx\_tg\_responses\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [http\_5xx\_tg\_responses\_no\_data\_window](#input\_http\_5xx\_tg\_responses\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | | [http\_5xx\_tg\_responses\_threshold\_critical](#input\_http\_5xx\_tg\_responses\_threshold\_critical) | Critical threshold (percentage, 0-100) | `number` | `75` | no | | [http\_5xx\_tg\_responses\_threshold\_warning](#input\_http\_5xx\_tg\_responses\_threshold\_warning) | Warning threshold (percentage, 0-100) | `number` | `25` | no | | [http\_5xx\_tg\_responses\_use\_message](#input\_http\_5xx\_tg\_responses\_use\_message) | Whether to use the query alert base message | `bool` | `false` | no | -| [latency\_enabled](#input\_latency\_enabled) | Enable latency monitor | `bool` | `false` | no | +| [latency\_enabled](#input\_latency\_enabled) | Enable latency monitor | `bool` | `true` | no | | [latency\_evaluation\_window](#input\_latency\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [latency\_no\_data\_window](#input\_latency\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [latency\_threshold\_critical](#input\_latency\_threshold\_critical) | Critical threshold (seconds) | `number` | `null` | no | +| [latency\_threshold\_critical](#input\_latency\_threshold\_critical) | Critical threshold (seconds) | `number` | `3` | no | | [latency\_threshold\_warning](#input\_latency\_threshold\_warning) | Warning threshold (seconds) | `number` | `null` | no | | [latency\_use\_message](#input\_latency\_use\_message) | Whether to use the query alert base message | `bool` | `false` | no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | @@ -84,7 +84,7 @@ No modules. | [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | -| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `60` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | diff --git a/aws/apigateway/README.md b/aws/apigateway/README.md index 52cd15d..f4069f2 100644 --- a/aws/apigateway/README.md +++ b/aws/apigateway/README.md @@ -68,7 +68,7 @@ No modules. | [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | -| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `60` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | diff --git a/aws/beanstalk/README.md b/aws/beanstalk/README.md index 84f314b..403c541 100644 --- a/aws/beanstalk/README.md +++ b/aws/beanstalk/README.md @@ -79,7 +79,7 @@ No modules. | [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | -| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `60` | no | | [root\_disk\_usage\_enabled](#input\_root\_disk\_usage\_enabled) | Enable root disk usage monitor | `bool` | `false` | no | | [root\_disk\_usage\_evaluation\_window](#input\_root\_disk\_usage\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [root\_disk\_usage\_no\_data\_window](#input\_root\_disk\_usage\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | diff --git a/aws/ec2/README.md b/aws/ec2/README.md index 7679e19..312a5fa 100644 --- a/aws/ec2/README.md +++ b/aws/ec2/README.md @@ -57,7 +57,7 @@ No modules. | [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | -| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `60` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [status\_failed\_check\_enabled](#input\_status\_failed\_check\_enabled) | Enable ec2 instance status check monitor | `bool` | `true` | no | diff --git a/aws/ecs-cluster/README.md b/aws/ecs-cluster/README.md index cdbab68..4477ed6 100644 --- a/aws/ecs-cluster/README.md +++ b/aws/ecs-cluster/README.md @@ -88,7 +88,7 @@ No modules. | [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | -| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `60` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | diff --git a/aws/ecs-fargate/README.md b/aws/ecs-fargate/README.md index 9977961..f62b479 100644 --- a/aws/ecs-fargate/README.md +++ b/aws/ecs-fargate/README.md @@ -89,7 +89,7 @@ No modules. | [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | -| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `60` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | diff --git a/aws/ecs-service/README.md b/aws/ecs-service/README.md index c7db7ba..12f42b3 100644 --- a/aws/ecs-service/README.md +++ b/aws/ecs-service/README.md @@ -82,7 +82,7 @@ No modules. | [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | -| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `60` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [running\_tasks\_enabled](#input\_running\_tasks\_enabled) | Enable running tasks monitor | `bool` | `true` | no | | [running\_tasks\_evaluation\_window](#input\_running\_tasks\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | diff --git a/aws/elasticsearch/README.md b/aws/elasticsearch/README.md index 20ad716..8153ec2 100644 --- a/aws/elasticsearch/README.md +++ b/aws/elasticsearch/README.md @@ -65,11 +65,11 @@ No modules. | [cpu\_utilization\_anomaly\_threshold\_warning](#input\_cpu\_utilization\_anomaly\_threshold\_warning) | Warning threshold (percent) | `number` | `null` | no | | [cpu\_utilization\_anomaly\_trigger\_window](#input\_cpu\_utilization\_anomaly\_trigger\_window) | Trigger window for anomaly monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_1h"` | no | | [cpu\_utilization\_anomaly\_use\_message](#input\_cpu\_utilization\_anomaly\_use\_message) | Whether to use the query alert base message for CPU utilization anomaly monitor | `bool` | `false` | no | -| [cpu\_utilization\_enabled](#input\_cpu\_utilization\_enabled) | Enable CPU utilization monitor | `bool` | `false` | no | +| [cpu\_utilization\_enabled](#input\_cpu\_utilization\_enabled) | Enable CPU utilization monitor | `bool` | `true` | no | | [cpu\_utilization\_evaluation\_window](#input\_cpu\_utilization\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | | [cpu\_utilization\_no\_data\_window](#input\_cpu\_utilization\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | -| [cpu\_utilization\_threshold\_critical](#input\_cpu\_utilization\_threshold\_critical) | Critical threshold (percent) | `number` | `0.9` | no | -| [cpu\_utilization\_threshold\_warning](#input\_cpu\_utilization\_threshold\_warning) | Warning threshold (percent) | `number` | `0.8` | no | +| [cpu\_utilization\_threshold\_critical](#input\_cpu\_utilization\_threshold\_critical) | Critical threshold (percent) | `number` | `90` | no | +| [cpu\_utilization\_threshold\_warning](#input\_cpu\_utilization\_threshold\_warning) | Warning threshold (percent) | `number` | `80` | no | | [cpu\_utilization\_use\_message](#input\_cpu\_utilization\_use\_message) | Whether to use the query alert base message for CPU utilization monitor | `bool` | `false` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | | [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | @@ -92,7 +92,7 @@ No modules. | [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | -| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `60` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | diff --git a/aws/elb/README.md b/aws/elb/README.md index a0edca2..cae1ad0 100644 --- a/aws/elb/README.md +++ b/aws/elb/README.md @@ -84,7 +84,7 @@ No modules. | [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | -| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `60` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | diff --git a/aws/lambda/README.md b/aws/lambda/README.md index 77489b5..2fe5b4a 100644 --- a/aws/lambda/README.md +++ b/aws/lambda/README.md @@ -94,7 +94,7 @@ No modules. | [out\_of\_memory\_threshold\_critical](#input\_out\_of\_memory\_threshold\_critical) | Critical threshold (count) | `number` | `5` | no | | [out\_of\_memory\_threshold\_warning](#input\_out\_of\_memory\_threshold\_warning) | Warning threshold (count) | `number` | `null` | no | | [out\_of\_memory\_use\_message](#input\_out\_of\_memory\_use\_message) | Whether to use the query alert base message for out of memory monitor | `bool` | `false` | no | -| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `60` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | diff --git a/aws/rds/README.md b/aws/rds/README.md index 4cdccc4..498cca1 100644 --- a/aws/rds/README.md +++ b/aws/rds/README.md @@ -44,7 +44,7 @@ No modules. | [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | | [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | | [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | -| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:rds"
]
| no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:rds"
]
| no | | [connection\_count\_anomaly\_deviations](#input\_connection\_count\_anomaly\_deviations) | Standard deviations | `number` | `3` | no | | [connection\_count\_anomaly\_enabled](#input\_connection\_count\_anomaly\_enabled) | Enable CPU utilization anomaly monitor | `bool` | `true` | no | | [connection\_count\_anomaly\_evaluation\_window](#input\_connection\_count\_anomaly\_evaluation\_window) | Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`] | `string` | `"last_4h"` | no | diff --git a/aws/sqs/README.md b/aws/sqs/README.md index 2d27fa4..0b81d28 100644 --- a/aws/sqs/README.md +++ b/aws/sqs/README.md @@ -68,7 +68,7 @@ No modules. | [queue\_depth\_threshold\_critical](#input\_queue\_depth\_threshold\_critical) | Critical threshold (count) | `number` | `null` | no | | [queue\_depth\_threshold\_warning](#input\_queue\_depth\_threshold\_warning) | Warning threshold (count) | `number` | `null` | no | | [queue\_depth\_use\_message](#input\_queue\_depth\_use\_message) | Whether to use the query alert base message for queue depth monitor | `bool` | `false` | no | -| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `60` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | diff --git a/aws/vpn/README.md b/aws/vpn/README.md index 662a44a..d5b9978 100644 --- a/aws/vpn/README.md +++ b/aws/vpn/README.md @@ -52,7 +52,7 @@ No modules. | [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | -| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `60` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | From ae6a68a590b59401ee5f01eee834148f39dd0ee4 Mon Sep 17 00:00:00 2001 From: Kevin Date: Wed, 16 Apr 2025 15:47:09 -0400 Subject: [PATCH 64/77] add default elasticache monitors --- aws/elasticache/variables.tf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aws/elasticache/variables.tf b/aws/elasticache/variables.tf index f4e163d..33ce2eb 100644 --- a/aws/elasticache/variables.tf +++ b/aws/elasticache/variables.tf @@ -17,7 +17,7 @@ variable "base_tags" { # Node CPU Utilization ######################################## variable "cpu_utilization_enabled" { - default = false + default = true description = "Enable CPU utilization monitor" type = bool } @@ -29,7 +29,7 @@ variable "cpu_utilization_no_data_window" { } variable "cpu_utilization_evaluation_window" { - default = "last_5m" + default = "last_15m" description = "Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`]" type = string } @@ -49,7 +49,7 @@ variable "cpu_utilization_threshold_warning" { variable "cpu_utilization_use_message" { description = "Whether to use the query alert base message for CPU utilization monitor" type = bool - default = false + default = true } ######################################## @@ -326,7 +326,7 @@ variable "swap_usage_use_message" { # Memory Utilization ######################################## variable "memory_utilization_enabled" { - default = false + default = true description = "Enable memory utilization monitor" type = bool } @@ -358,5 +358,5 @@ variable "memory_utilization_threshold_warning" { variable "memory_utilization_use_message" { description = "Whether to use the query alert base message for memory utilization monitor" type = bool - default = false + default = true } From 492ec5cb69d41627f7b0b31b4bbbeec45212f405 Mon Sep 17 00:00:00 2001 From: Kevin Date: Wed, 16 Apr 2025 16:29:03 -0400 Subject: [PATCH 65/77] Change elasticache monitor to use name --- aws/elasticache/main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/elasticache/main.tf b/aws/elasticache/main.tf index b214f3d..5eabbde 100644 --- a/aws/elasticache/main.tf +++ b/aws/elasticache/main.tf @@ -216,7 +216,7 @@ END resource "datadog_monitor" "memory_utilization" { count = var.memory_utilization_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Elasticache Memory Utilization - {{replication_group.name}} - {{value}}%", local.title_suffix]) + name = join("", [local.title_prefix, "Elasticache Memory Utilization - {{name.name}} - {{value}}%", local.title_suffix]) include_tags = false message = var.memory_utilization_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) @@ -232,7 +232,7 @@ resource "datadog_monitor" "memory_utilization" { query = <= ${var.memory_utilization_threshold_critical} END From b67838eafb052081218804debe713f7dc88704c8 Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 18 Apr 2025 08:42:33 -0400 Subject: [PATCH 66/77] Added systemd unit monitor --- host/systemd/README.md | 68 +++++++++++++++++++++++++++++++++++++++ host/systemd/common.tf | 1 + host/systemd/main.tf | 34 ++++++++++++++++++++ host/systemd/variables.tf | 41 +++++++++++++++++++++++ host/systemd/versions.tf | 1 + host/windows/main.tf | 2 +- 6 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 host/systemd/README.md create mode 120000 host/systemd/common.tf create mode 100644 host/systemd/main.tf create mode 100644 host/systemd/variables.tf create mode 120000 host/systemd/versions.tf diff --git a/host/systemd/README.md b/host/systemd/README.md new file mode 100644 index 0000000..d19e5ac --- /dev/null +++ b/host/systemd/README.md @@ -0,0 +1,68 @@ + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | ~> 1.5 | +| [datadog](#requirement\_datadog) | >= 3.37 | +| [null](#requirement\_null) | >= 3.1.0 | + +## Providers + +| Name | Version | +|------|---------| +| [datadog](#provider\_datadog) | >= 3.37 | + +## Modules + +No modules. + +## Resources + +| Name | Type | +|------|------| +| [datadog_monitor.systemd_unit](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [additional\_tags](#input\_additional\_tags) | Additional tags to apply to all monitors | `list(string)` | `[]` | no | +| [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | +| [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [base\_tags](#input\_base\_tags) | Base tags to apply to all monitors | `list(string)` | `[]` | no | +| [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | +| [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | +| [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | +| [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_crit\_override](#input\_notify\_crit\_override) | List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | +| [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | +| [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_nonprod\_override](#input\_notify\_nonprod\_override) | List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `60` | no | +| [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | +| [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [systemd\_unit\_alert\_enabled](#input\_systemd\_unit\_alert\_enabled) | Enable or disable the Systemd service alert monitor | `bool` | `true` | no | +| [systemd\_unit\_alert\_threshold\_critical](#input\_systemd\_unit\_alert\_threshold\_critical) | Critical threshold for the Systemd service alert (count of services not running/failed) | `number` | `2` | no | +| [systemd\_unit\_alert\_threshold\_warning](#input\_systemd\_unit\_alert\_threshold\_warning) | Warning threshold for the Systemd service alert (count of services not running/failed) | `number` | `1` | no | +| [systemd\_unit\_alert\_use\_message](#input\_systemd\_unit\_alert\_use\_message) | Whether to use the base message for the Systemd service alert | `bool` | `true` | no | +| [systemd\_units\_filter](#input\_systemd\_units\_filter) | List of specific systemd units (services) to monitor. If empty, monitors all. | `list(string)` | `[]` | no | +| [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [timeout\_h](#input\_timeout\_h) | Auto-resolve alert in specified hours if condition no longer matches | `number` | `0` | no | +| [title\_prefix](#input\_title\_prefix) | Prefix all alerts with specified value in brackets | `string` | `null` | no | +| [title\_suffix](#input\_title\_suffix) | Suffix all alerts with specified value in parenthesis | `string` | `null` | no | +| [warn\_priority](#input\_warn\_priority) | Priority for alerts with no data (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | + +## Outputs + +No outputs. + \ No newline at end of file diff --git a/host/systemd/common.tf b/host/systemd/common.tf new file mode 120000 index 0000000..47c0063 --- /dev/null +++ b/host/systemd/common.tf @@ -0,0 +1 @@ +../../common/common.tf \ No newline at end of file diff --git a/host/systemd/main.tf b/host/systemd/main.tf new file mode 100644 index 0000000..8e826e2 --- /dev/null +++ b/host/systemd/main.tf @@ -0,0 +1,34 @@ +locals { + monitor_alert_default_priority = null + monitor_warn_default_priority = null + monitor_nodata_default_priority = null + + title_prefix = var.title_prefix == null ? "" : "[${var.title_prefix}]" + title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" +} + +resource "datadog_monitor" "systemd_unit" { + count = var.systemd_unit_alert_enabled ? 1 : 0 + + name = join("", [local.title_prefix, "Systemd Unit Status - {{host.name}}", local.title_suffix]) + type = "service check" + message = var.systemd_unit_alert_use_message ? local.query_alert_base_message : "" + tags = concat(local.common_tags, var.base_tags, var.additional_tags) + + evaluation_delay = var.evaluation_delay + notify_no_data = false + notify_audit = false + renotify_interval = 60 + timeout_h = var.timeout_h + include_tags = false + require_full_window = false + + query = < Date: Tue, 17 Jun 2025 17:50:48 -0400 Subject: [PATCH 67/77] Change default state for rds connection count anomaly alarms to not alert --- aws/rds/variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/rds/variables.tf b/aws/rds/variables.tf index 2f085d9..d46452c 100644 --- a/aws/rds/variables.tf +++ b/aws/rds/variables.tf @@ -79,7 +79,7 @@ variable "connection_count_anomaly_threshold_warning" { variable "connection_count_anomaly_use_message" { description = "Whether to use the query alert base message for connection count anomaly monitor" type = bool - default = true + default = false } ######################################## From f2107cc665941bb350448a696e51371d6026528e Mon Sep 17 00:00:00 2001 From: david goodell Date: Thu, 26 Jun 2025 16:41:19 -0400 Subject: [PATCH 68/77] aws/elasticache: allow customization of the organize by fields in monitor queries --- aws/elasticache/main.tf | 14 +++++++------- aws/elasticache/variables.tf | 5 +++++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/aws/elasticache/main.tf b/aws/elasticache/main.tf index 5eabbde..c321ae1 100644 --- a/aws/elasticache/main.tf +++ b/aws/elasticache/main.tf @@ -27,7 +27,7 @@ resource "datadog_monitor" "cpu_utilization" { query = <= ${var.cpu_utilization_threshold_critical} END @@ -56,7 +56,7 @@ resource "datadog_monitor" "cpu_utilization_anomaly" { query = <= ${var.cpu_utilization_anomaly_threshold_critical} @@ -86,7 +86,7 @@ resource "datadog_monitor" "evictions" { query = <= ${var.evictions_threshold_critical} END @@ -115,7 +115,7 @@ resource "datadog_monitor" "hit_rate" { query = <= ${var.hit_rate_threshold_critical} END @@ -144,7 +144,7 @@ resource "datadog_monitor" "hit_rate_anomaly" { query = <= ${var.hit_rate_anomaly_threshold_critical} @@ -174,7 +174,7 @@ resource "datadog_monitor" "max_connections" { query = <= ${var.max_connections_threshold_critical} END @@ -203,7 +203,7 @@ resource "datadog_monitor" "swap_usage" { query = < Date: Mon, 21 Jul 2025 11:29:21 -0600 Subject: [PATCH 69/77] make the monitor queries grouping variable --- common/common.tf | 9 +++++++++ host/agent/README.md | 11 ++++++++--- host/agent/main.tf | 10 +++++----- host/clock/README.md | 11 ++++++++--- host/clock/main.tf | 8 ++++---- host/cpu/README.md | 11 ++++++++--- host/cpu/main.tf | 6 +++--- host/disk/README.md | 13 ++++++++++--- host/disk/main.tf | 20 ++++++++++---------- host/memory/README.md | 11 ++++++++--- host/memory/main.tf | 10 +++++----- host/process/README.md | 11 ++++++++--- host/process/main.tf | 2 +- host/swap/README.md | 11 ++++++++--- host/swap/main.tf | 4 ++-- host/systemd/main.tf | 4 ++-- host/systemd/variables.tf | 8 +------- 17 files changed, 100 insertions(+), 60 deletions(-) diff --git a/common/common.tf b/common/common.tf index 84135b5..9d69640 100644 --- a/common/common.tf +++ b/common/common.tf @@ -179,6 +179,12 @@ variable "notify_prod_override" { type = list(string) } +variable "group_by" { + default = ["name", "aws_account", "env", "datadog_managed"] + description = "List of tags to group by" + type = list(string) +} + locals { # tag related locals @@ -336,4 +342,7 @@ ${local.alert_context} {{#is_alert}} ${local.notify_on_alert} {{/is_alert}} {{#is_recovery}} ${local.notify_on_recovery} {{/is_recovery}} END + + service_group_by = join(",", formatlist("\"%s\"", var.group_by)) + query_group_by = join(",", var.group_by) } diff --git a/host/agent/README.md b/host/agent/README.md index b71562a..f3af365 100644 --- a/host/agent/README.md +++ b/host/agent/README.md @@ -35,22 +35,27 @@ No modules. | [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | | [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | | [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | -| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:apigateway"
]
| no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:ec2"
]
| no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | -| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | +| [group\_by](#input\_group\_by) | List of tags to group by | `list(string)` |
[
"name",
"aws_account",
"env",
"datadog_managed"
]
| no | | [host\_unreachable\_enabled](#input\_host\_unreachable\_enabled) | Flag to enable Host unreachable monitor | `bool` | `true` | no | +| [host\_unreachable\_use\_message](#input\_host\_unreachable\_use\_message) | Flag to enable Host unreachable alerting | `bool` | `true` | no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_crit\_override](#input\_notify\_crit\_override) | List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | | [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_nonprod\_override](#input\_notify\_nonprod\_override) | List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | -| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `60` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | diff --git a/host/agent/main.tf b/host/agent/main.tf index dc54b4d..1d28ecc 100644 --- a/host/agent/main.tf +++ b/host/agent/main.tf @@ -11,22 +11,22 @@ locals { resource "datadog_monitor" "host_unreachable" { count = var.host_unreachable_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Datadog Agent Status - {{name.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "Datadog Agent Status - {{name.name}}", local.title_suffix]) include_tags = false message = var.host_unreachable_use_message ? local.query_alert_base_message : "" - tags = concat(local.common_tags, var.base_tags, var.additional_tags) - type = "service check" + tags = concat(local.common_tags, var.base_tags, var.additional_tags) + type = "service check" evaluation_delay = var.evaluation_delay new_group_delay = var.new_group_delay - no_data_timeframe = "5" + no_data_timeframe = "5" notify_no_data = true renotify_interval = var.renotify_interval require_full_window = true timeout_h = var.timeout_h query = < [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | | [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | | [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | -| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:apigateway"
]
| no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:ec2"
]
| no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | -| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | +| [group\_by](#input\_group\_by) | List of tags to group by | `list(string)` |
[
"name",
"aws_account",
"env",
"datadog_managed"
]
| no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_crit\_override](#input\_notify\_crit\_override) | List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | | [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_nonprod\_override](#input\_notify\_nonprod\_override) | List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | -| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `60` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [system\_clock\_enabled](#input\_system\_clock\_enabled) | Flag to enable Host unreachable monitor | `bool` | `true` | no | +| [system\_clock\_use\_message](#input\_system\_clock\_use\_message) | Flag to enable Host unreachable alerting | `bool` | `false` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [timeout\_h](#input\_timeout\_h) | Auto-resolve alert in specified hours if condition no longer matches | `number` | `0` | no | | [title\_prefix](#input\_title\_prefix) | Prefix all alerts with specified value in brackets | `string` | `null` | no | diff --git a/host/clock/main.tf b/host/clock/main.tf index 94ce70c..be6e892 100644 --- a/host/clock/main.tf +++ b/host/clock/main.tf @@ -11,11 +11,11 @@ locals { resource "datadog_monitor" "system_clock" { count = var.system_clock_enabled ? 1 : 0 - name = join("", [local.title_prefix, "System Clock - {{name.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "System Clock - {{name.name}}", local.title_suffix]) include_tags = false message = var.system_clock_use_message ? local.query_alert_base_message : "" - tags = concat(local.common_tags, var.base_tags, var.additional_tags) - type = "service check" + tags = concat(local.common_tags, var.base_tags, var.additional_tags) + type = "service check" evaluation_delay = var.evaluation_delay new_group_delay = var.new_group_delay @@ -25,7 +25,7 @@ resource "datadog_monitor" "system_clock" { timeout_h = var.timeout_h query = < [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | | [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | | [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | -| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:apigateway"
]
| no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:ec2"
]
| no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [cpu\_utilization\_enabled](#input\_cpu\_utilization\_enabled) | Flag to enable CPU Utilitzation monitor | `bool` | `true` | no | | [cpu\_utilization\_no\_data\_window](#input\_cpu\_utilization\_no\_data\_window) | No data threshold (in minutes, 0 to disable) | `number` | `10` | no | @@ -43,19 +43,24 @@ No modules. | [cpu\_utilization\_threshold\_warning](#input\_cpu\_utilization\_threshold\_warning) | Warning threshold (percent) | `number` | `80` | no | | [cpu\_utilization\_time\_aggregator](#input\_cpu\_utilization\_time\_aggregator) | Monitor aggregator for CPU high [available values: min, max or avg] | `string` | `"min"` | no | | [cpu\_utilization\_timeframe](#input\_cpu\_utilization\_timeframe) | Monitor timeframe for CPU high [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | `string` | `"last_1h"` | no | +| [cpu\_utilization\_use\_message](#input\_cpu\_utilization\_use\_message) | Flag to enable CPU Utilitzation alerting | `bool` | `false` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | -| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | +| [group\_by](#input\_group\_by) | List of tags to group by | `list(string)` |
[
"name",
"aws_account",
"env",
"datadog_managed"
]
| no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_crit\_override](#input\_notify\_crit\_override) | List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | | [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_nonprod\_override](#input\_notify\_nonprod\_override) | List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | -| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `60` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | diff --git a/host/cpu/main.tf b/host/cpu/main.tf index 88fc47e..faa5e9a 100644 --- a/host/cpu/main.tf +++ b/host/cpu/main.tf @@ -12,7 +12,7 @@ resource "datadog_monitor" "cpu_utilization" { count = var.cpu_utilization_enabled ? 1 : 0 name = join("", [local.title_prefix, "CPU Utilization - {{name.name}}", local.title_suffix]) - message = var.cpu_utilization_use_message ? local.query_alert_base_message : "" + message = var.cpu_utilization_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -23,12 +23,12 @@ resource "datadog_monitor" "cpu_utilization" { renotify_interval = var.renotify_interval require_full_window = true timeout_h = var.timeout_h - include_tags = false + include_tags = false query = < ${var.cpu_utilization_threshold_critical} EOQ diff --git a/host/disk/README.md b/host/disk/README.md index 9f8c82a..f3344c2 100644 --- a/host/disk/README.md +++ b/host/disk/README.md @@ -37,7 +37,7 @@ No modules. | [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | | [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | | [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | -| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:apigateway"
]
| no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:ec2"
]
| no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | | [disk\_inodes\_enabled](#input\_disk\_inodes\_enabled) | Flag to enable Free disk inodes monitor | `string` | `"true"` | no | @@ -45,6 +45,7 @@ No modules. | [disk\_inodes\_threshold\_warning](#input\_disk\_inodes\_threshold\_warning) | Free disk space warning threshold | `number` | `90` | no | | [disk\_inodes\_time\_aggregator](#input\_disk\_inodes\_time\_aggregator) | Monitor aggregator for Free disk inodes [available values: min, max or avg] | `string` | `"min"` | no | | [disk\_inodes\_timeframe](#input\_disk\_inodes\_timeframe) | Monitor timeframe for Free disk inodes [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | +| [disk\_inodes\_use\_message](#input\_disk\_inodes\_use\_message) | Flag to enable Free disk inodes alerting | `string` | `"true"` | no | | [disk\_space\_enabled](#input\_disk\_space\_enabled) | Flag to enable Free diskspace monitor | `string` | `"true"` | no | | [disk\_space\_forecast\_algorithm](#input\_disk\_space\_forecast\_algorithm) | Algorithm for the Free diskspace Forecast monitor [available values: `linear` or `seasonal`] | `string` | `"linear"` | no | | [disk\_space\_forecast\_deviations](#input\_disk\_space\_forecast\_deviations) | Deviations for the Free diskspace Forecast monitor [available values: `1`, `2`, `3`, `4` or `5`] | `string` | `1` | no | @@ -57,22 +58,28 @@ No modules. | [disk\_space\_forecast\_threshold\_critical\_recovery](#input\_disk\_space\_forecast\_threshold\_critical\_recovery) | Free disk space forecast recovery threshold | `number` | `72` | no | | [disk\_space\_forecast\_time\_aggregator](#input\_disk\_space\_forecast\_time\_aggregator) | Monitor aggregator for Free diskspace forecast [available values: min, max or avg] | `string` | `"max"` | no | | [disk\_space\_forecast\_timeframe](#input\_disk\_space\_forecast\_timeframe) | Monitor timeframe for Free diskspace forecast [available values: `next_12h`, `next_#d` (1, 2, or 3), `next_#w` (1 or 2) or `next_#mo` (1, 2 or 3)] | `string` | `"next_1w"` | no | +| [disk\_space\_forecast\_use\_message](#input\_disk\_space\_forecast\_use\_message) | Flag to enable Free diskspace forecast alerting | `string` | `"false"` | no | | [disk\_space\_threshold\_critical](#input\_disk\_space\_threshold\_critical) | Free disk space critical threshold | `number` | `90` | no | | [disk\_space\_threshold\_warning](#input\_disk\_space\_threshold\_warning) | Free disk space warning threshold | `number` | `80` | no | | [disk\_space\_time\_aggregator](#input\_disk\_space\_time\_aggregator) | Monitor aggregator for Free diskspace [available values: min, max or avg] | `string` | `"max"` | no | | [disk\_space\_timeframe](#input\_disk\_space\_timeframe) | Monitor timeframe for Free diskspace [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | -| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [disk\_space\_use\_message](#input\_disk\_space\_use\_message) | Flag to enable Free diskspace alerting | `string` | `"true"` | no | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | +| [group\_by](#input\_group\_by) | List of tags to group by | `list(string)` |
[
"name",
"aws_account",
"env",
"datadog_managed"
]
| no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_crit\_override](#input\_notify\_crit\_override) | List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | | [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_nonprod\_override](#input\_notify\_nonprod\_override) | List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | -| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `60` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | diff --git a/host/disk/main.tf b/host/disk/main.tf index e6e4c4c..dd5ec36 100644 --- a/host/disk/main.tf +++ b/host/disk/main.tf @@ -12,7 +12,7 @@ resource "datadog_monitor" "disk_space" { count = var.disk_space_enabled ? 1 : 0 name = join("", [local.title_prefix, "Disk Space - {{name.name}}", local.title_suffix]) - message = var.disk_space_use_message ? local.query_alert_base_message : "" + message = var.disk_space_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" @@ -26,7 +26,7 @@ resource "datadog_monitor" "disk_space" { query = < ${var.disk_space_threshold_critical} EOQ @@ -39,11 +39,11 @@ resource "datadog_monitor" "disk_space" { resource "datadog_monitor" "disk_space_forecast" { count = var.disk_space_forecast_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Disk Space Forecast - {{name.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "Disk Space Forecast - {{name.name}}", local.title_suffix]) include_tags = false message = var.disk_space_forecast_use_message ? local.query_alert_base_message : "" - tags = concat(local.common_tags, var.base_tags, var.additional_tags) - type = "query alert" + tags = concat(local.common_tags, var.base_tags, var.additional_tags) + type = "query alert" evaluation_delay = var.evaluation_delay new_group_delay = var.new_group_delay @@ -55,7 +55,7 @@ resource "datadog_monitor" "disk_space_forecast" { query = < ${var.disk_inodes_threshold_critical} EOQ diff --git a/host/memory/README.md b/host/memory/README.md index c4cb6c6..f6ca8bc 100644 --- a/host/memory/README.md +++ b/host/memory/README.md @@ -35,26 +35,31 @@ No modules. | [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | | [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | | [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | -| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:apigateway"
]
| no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:ec2"
]
| no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | -| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | +| [group\_by](#input\_group\_by) | List of tags to group by | `list(string)` |
[
"name",
"aws_account",
"env",
"datadog_managed"
]
| no | | [memory\_enabled](#input\_memory\_enabled) | Flag to enable Free memory monitor | `string` | `"true"` | no | | [memory\_threshold\_critical](#input\_memory\_threshold\_critical) | Free disk space critical threshold | `number` | `5` | no | | [memory\_threshold\_warning](#input\_memory\_threshold\_warning) | Free disk space warning threshold | `number` | `10` | no | | [memory\_time\_aggregator](#input\_memory\_time\_aggregator) | Monitor aggregator for Free memory [available values: min, max or avg] | `string` | `"max"` | no | | [memory\_timeframe](#input\_memory\_timeframe) | Monitor timeframe for Free memory [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | +| [memory\_use\_message](#input\_memory\_use\_message) | Flag to enable Free memory alerting | `string` | `"true"` | no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_crit\_override](#input\_notify\_crit\_override) | List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | | [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_nonprod\_override](#input\_notify\_nonprod\_override) | List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | -| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `60` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | diff --git a/host/memory/main.tf b/host/memory/main.tf index d5e1ac5..4bc8ffb 100644 --- a/host/memory/main.tf +++ b/host/memory/main.tf @@ -11,16 +11,16 @@ locals { resource "datadog_monitor" "memory" { count = var.memory_enabled ? 1 : 0 - name = join("", [local.title_prefix, "Usable Memory - {{name.name}}", local.title_suffix]) + name = join("", [local.title_prefix, "Usable Memory - {{name.name}}", local.title_suffix]) include_tags = false message = var.memory_use_message ? local.query_alert_base_message : "" - tags = concat(local.common_tags, var.base_tags, var.additional_tags) - type = "query alert" + tags = concat(local.common_tags, var.base_tags, var.additional_tags) + type = "query alert" query = < [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | | [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | | [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | -| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:apigateway"
]
| no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:ec2"
]
| no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | -| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | +| [group\_by](#input\_group\_by) | List of tags to group by | `list(string)` |
[
"name",
"aws_account",
"env",
"datadog_managed"
]
| no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_crit\_override](#input\_notify\_crit\_override) | List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | | [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_nonprod\_override](#input\_notify\_nonprod\_override) | List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [process\_alert\_enabled](#input\_process\_alert\_enabled) | Flag to enable Process Check monitor | `string` | `"true"` | no | @@ -55,7 +59,8 @@ No modules. | [process\_alert\_threshold\_critical](#input\_process\_alert\_threshold\_critical) | Process Alert critical threshold | `number` | `1` | no | | [process\_alert\_threshold\_warning](#input\_process\_alert\_threshold\_warning) | Process Alert warning threshold | `number` | `null` | no | | [process\_alert\_timeframe](#input\_process\_alert\_timeframe) | Monitor timeframe for Process Alert [available values: `#m` (1, 5, 10, 15, or 30), `#h` (1, 2, or 4), or `1d`] | `string` | `"5m"` | no | -| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [process\_alert\_use\_message](#input\_process\_alert\_use\_message) | Flag to enable Process Check alerting | `string` | `"true"` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `60` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | diff --git a/host/process/main.tf b/host/process/main.tf index c0ddd76..5acbf0a 100644 --- a/host/process/main.tf +++ b/host/process/main.tf @@ -12,7 +12,7 @@ resource "datadog_monitor" "process_alert" { count = var.process_alert_enabled ? 1 : 0 name = join("", [local.title_prefix, "Process Alert - {{host.name}}", local.title_suffix]) - message = var.process_alert_use_message ? local.query_alert_base_message : "" + message = var.process_alert_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "process alert" diff --git a/host/swap/README.md b/host/swap/README.md index 4632a84..5ac490b 100644 --- a/host/swap/README.md +++ b/host/swap/README.md @@ -35,21 +35,25 @@ No modules. | [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | | [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | | [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | -| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:apigateway"
]
| no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:ec2"
]
| no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | -| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | n/a | yes | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | | [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | +| [group\_by](#input\_group\_by) | List of tags to group by | `list(string)` |
[
"name",
"aws_account",
"env",
"datadog_managed"
]
| no | | [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | | [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | | [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_crit\_override](#input\_notify\_crit\_override) | List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | | [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | | [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_nonprod\_override](#input\_notify\_nonprod\_override) | List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | | [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | -| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `0` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `60` | no | | [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | | [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [swap\_enabled](#input\_swap\_enabled) | Flag to enable Swap monitor | `string` | `"true"` | no | @@ -57,6 +61,7 @@ No modules. | [swap\_threshold\_warning](#input\_swap\_threshold\_warning) | Free Swap warning threshold as percentage | `number` | `0.3` | no | | [swap\_time\_aggregator](#input\_swap\_time\_aggregator) | Monitor aggregator for Free Swap [available values: min, max or avg] | `string` | `"max"` | no | | [swap\_timeframe](#input\_swap\_timeframe) | Monitor timeframe for Free Swap [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | `string` | `"last_5m"` | no | +| [swap\_use\_message](#input\_swap\_use\_message) | Flag to enable Swap alerting | `string` | `"false"` | no | | [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [timeout\_h](#input\_timeout\_h) | Auto-resolve alert in specified hours if condition no longer matches | `number` | `0` | no | | [title\_prefix](#input\_title\_prefix) | Prefix all alerts with specified value in brackets | `string` | `null` | no | diff --git a/host/swap/main.tf b/host/swap/main.tf index 211a957..0e097e7 100644 --- a/host/swap/main.tf +++ b/host/swap/main.tf @@ -12,13 +12,13 @@ resource "datadog_monitor" "swap" { count = var.swap_enabled ? 1 : 0 name = join("", [local.title_prefix, "Usable Swap - {{name.name}}", local.title_suffix]) - message = var.swap_use_message ? local.query_alert_base_message : "" + message = var.swap_use_message ? local.query_alert_base_message : "" tags = concat(local.common_tags, var.base_tags, var.additional_tags) type = "query alert" query = < Date: Tue, 22 Jul 2025 06:12:10 -0600 Subject: [PATCH 70/77] no empty strings allowed --- synthetics/ssl/variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synthetics/ssl/variables.tf b/synthetics/ssl/variables.tf index bceaf7e..16a61c7 100644 --- a/synthetics/ssl/variables.tf +++ b/synthetics/ssl/variables.tf @@ -8,7 +8,7 @@ variable "additional_tags" { } variable "base_tags" { - default = [""] + default = [] description = "Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this)" type = list(string) } From 2e0b49d46f05a5badce814bc51c0b61b4d67031d Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Tue, 22 Jul 2025 06:16:15 -0600 Subject: [PATCH 71/77] no empty strings allowed --- synthetics/browser/variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synthetics/browser/variables.tf b/synthetics/browser/variables.tf index e42eeb0..8353930 100644 --- a/synthetics/browser/variables.tf +++ b/synthetics/browser/variables.tf @@ -8,7 +8,7 @@ variable "additional_tags" { } variable "base_tags" { - default = [""] + default = [] description = "Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this)" type = list(string) } From 25e5f269eeb1cc33a51a31a3de39048b7d64949f Mon Sep 17 00:00:00 2001 From: Kevin Date: Tue, 22 Jul 2025 15:52:11 -0400 Subject: [PATCH 72/77] add claude action --- .github/workflows/claude.yml | 36 ++++ CLAUDE.md | 321 +++++++++++++++++++++++++++++++++++ 2 files changed, 357 insertions(+) create mode 100644 .github/workflows/claude.yml create mode 100644 CLAUDE.md diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml new file mode 100644 index 0000000..d4a716b --- /dev/null +++ b/.github/workflows/claude.yml @@ -0,0 +1,36 @@ +name: Claude PR Assistant + +on: + issue_comment: + types: [created] + pull_request_review_comment: + types: [created] + issues: + types: [opened, assigned] + pull_request_review: + types: [submitted] + +jobs: + claude-code-action: + if: | + (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || + (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || + (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || + (github.event_name == 'issues' && contains(github.event.issue.body, '@claude')) + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + issues: read + id-token: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Run Claude PR Action + uses: anthropics/claude-code-action@beta + with: + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + timeout_minutes: "60" diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..6b977df --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,321 @@ +# Infrastructure Standards Enforcement Guide + +This document consolidates AWS Tagging Standards and Infrastructure as Code (IaC) Standards for automated enforcement by AI agents and CI/CD systems. + +## AWS Tagging Standards Enforcement + +### Required Tags (ENFORCE - BLOCK ON FAILURE) + +These tags are mandatory for all resources and must be validated: + +| Tag | Validation Pattern | Error Message | Applies To | +|-----|-------------------|---------------|------------| +| `env` | `^[A-Za-z0-9\-_]+$` | "env tag is required. Valid formats: dev, prod, staging, ops" | ALL resources | +| `service` | `^[A-Za-z0-9\-_]+$` | "service tag is required. Format: alphanumeric with hyphens/underscores only" | ALL resources | + +### Required When Code Managed (ENFORCE - CONDITIONAL) + +These tags are required when resources are managed by IaC: + +| Tag | Validation Pattern | Error Message | Condition | +|-----|-------------------|---------------|-----------| +| `code_managed_by` | `^(terraform\|cloudformation\|serverless\|ansible\|cdk)$` | "code_managed_by must be one of: terraform, cloudformation, serverless, ansible, cdk" | When resource is IaC managed | +| `code_managed_at` | `^[a-zA-Z0-9\-_/]+$` | "code_managed_at must specify repository location (e.g., org/aws-infra)" | When resource is IaC managed | + +### Required for Ansible-Managed EC2 (ENFORCE - CONDITIONAL) + +| Tag | Validation Pattern | Error Message | Condition | +|-----|-------------------|---------------|-----------| +| `profile` | `^[A-Za-z0-9\-_]+$` | "profile tag is required for Ansible-managed EC2 instances" | EC2 instances with Ansible management | + +### Recommended Tags (WARN - DO NOT BLOCK) + +These tags should be present but won't block deployment: + +| Tag | Validation Pattern | Warning Message | +|-----|-------------------|-----------------| +| `version` | `^v[0-9.]+(\-rc[0-9]+)?$` | "version tag recommended. Format: v1.2.3 or v1.2.3-rc1" | +| `datadog_managed` | `^(true\|false\|critical)$` | "datadog_managed tag recommended for monitoring setup" | +| `rhythmic_managed` | `^(true\|false)$` | "rhythmic_managed tag recommended for service coverage tracking" | + +### Optional Tags (INFO - NO VALIDATION) + +These tags are optional and provide additional metadata: + +- `component` - Component identifier (alphanumeric with hyphens/underscores) +- `app` - Application identifier for grouping services +- `cost_center` - Accounting cost center (must align to customer requirements) +- `schedule` - External scheduling tag (must align to scheduler values) +- `backup_policy` - Backup policy identifier +- `dlm_policy` - Data Lifecycle Management policy identifier + +### Bill Tags Identification + +Tags marked as "Bill Tags" for cost allocation: + +- `env` (Y) +- `service` (Y) +- `cost_center` (Y) + +## Infrastructure as Code Standards Enforcement + +### Tooling Requirements (ENFORCE) + +#### Primary Tool Standards + +```yaml +terraform_requirements: + version_pinning: REQUIRED + validation_pattern: "^[0-9]+\.[0-9]+(\.[0-9]+)?$" + error_message: "Terraform version must be pinned in .terraform-version or terraform block" + +provider_versions: + aws_provider: REQUIRED + validation_pattern: "^~> [0-9]+\.[0-9]+$" + error_message: "AWS provider version must be pinned to at least minor version" +``` + +#### Repository Structure Validation + +```yaml +repository_naming: + pattern: "^aws-[a-zA-Z0-9\-]+-[a-zA-Z0-9\-]+$" + error_message: "Repository must follow pattern: aws-[client]-[purpose]" + +required_files: + - ".terraform-version" + - "README.md" + - ".gitignore" + - "main.tf" + - "variables.tf" + - "outputs.tf" +``` + +### Code Quality Standards (ENFORCE) + +#### Terraform Formatting + +```yaml +terraform_fmt: + enforce: true + command: "terraform fmt -check -recursive" + error_message: "Code must be formatted with 'terraform fmt'" + +terraform_validate: + enforce: true + command: "terraform validate" + error_message: "Terraform configuration must pass validation" +``` + +#### Security Scanning + +```yaml +security_tools: + checkov: + enforce: true + severity_threshold: "HIGH" + error_message: "High severity security issues must be resolved" + + tflint: + enforce: true + config_required: true + error_message: "TFLint issues must be resolved" + + trivy: + enforce: true + severity_threshold: "HIGH" + error_message: "High severity vulnerabilities must be resolved" +``` + +### State Management Standards (ENFORCE) + +#### Backend Configuration + +```yaml +terraform_backend: + type: "s3" + required_settings: + bucket: REQUIRED + key: REQUIRED + region: REQUIRED + encrypt: true + dynamodb_table: REQUIRED + + validation: + bucket_versioning: REQUIRED + bucket_encryption: REQUIRED + error_message: "S3 backend must have versioning and encryption enabled" +``` + +#### State Organization + +```yaml +state_file_rules: + max_resources_per_state: 50 + warning_threshold: 30 + separate_states_required: + - "Critical infrastructure (networking, security)" + - "Different environments (prod/staging/dev)" + - "Independent workloads" +``` + +### GitOps Workflow Standards (ENFORCE) + +#### Branch Protection + +```yaml +branch_protection: + master_branch: + required_reviews: 1 + dismiss_stale_reviews: true + require_code_owner_reviews: false + required_status_checks: + - "terraform-plan" + - "terraform-validate" + - "security-scan" + restrict_pushes: true +``` + +#### Pull Request Requirements + +```yaml +pr_requirements: + terraform_plan: REQUIRED + plan_in_description: REQUIRED + validation_passed: REQUIRED + security_scan_passed: REQUIRED + + template_sections: + - "## Changes" + - "## Business Justification" + - "## Terraform Plan Output" + - "## Testing Performed" +``` + +### Documentation Standards (WARN) + +#### README Requirements + +```yaml +readme_sections: + required: + - "Purpose and scope" + - "Prerequisites" + - "Usage instructions" + - "Variable documentation" + + validation: + min_length: 500 + terraform_docs: REQUIRED + warning_message: "README should include all required sections" +``` + +#### Module Documentation + +```yaml +module_documentation: + terraform_docs: REQUIRED + variable_descriptions: REQUIRED + output_descriptions: REQUIRED + example_usage: REQUIRED +``` + +### Resource Naming Standards (ENFORCE) + +#### Naming Convention + +```yaml +resource_naming: + pattern: "^[client]-[env]-[service]-[resource]-[instance]$" + validation_pattern: "^[a-zA-Z0-9\-]+-[a-zA-Z0-9\-]+-[a-zA-Z0-9\-]+-[a-zA-Z0-9\-]+-[a-zA-Z0-9\-]+$" + error_message: "Resources must follow naming pattern: [client]-[env]-[service]-[resource]-[instance]" + +naming_exceptions: + - "IAM roles and policies (AWS character restrictions)" + - "S3 buckets (global uniqueness requirements)" + - "Lambda functions (length restrictions)" +``` + +## AI Agent Implementation Rules + +### Blocking vs Non-Blocking Validations + +#### BLOCK DEPLOYMENT (Return Error Code) +- Missing required tags (`env`, `service`) +- Missing conditional required tags when applicable +- Terraform validation failures +- High severity security issues +- Unpinned Terraform versions +- Missing state backend configuration +- Branch protection violations +- Failed security scans + +#### WARN ONLY (Log Warning, Continue) +- Missing recommended tags +- README documentation issues +- Missing optional documentation +- Style guide violations +- Medium/Low severity security findings + +#### INFO ONLY (Log Information) +- Missing optional tags +- Code optimization suggestions +- Best practice recommendations + +### Validation Order + +1. **Repository Structure** - Validate naming and required files +2. **Terraform Syntax** - Run terraform validate, fmt check +3. **Security Scanning** - Run checkov, tflint, trivy +4. **Tag Validation** - Check required and recommended tags +5. **State Management** - Validate backend configuration +6. **Documentation** - Check README and module docs +7. **Naming Conventions** - Validate resource naming patterns + +### Error Reporting Format + +```json +{ + "validation_result": "FAILED|PASSED|WARNING", + "blocking_errors": [ + { + "category": "TAGGING|SECURITY|SYNTAX|NAMING", + "severity": "HIGH|MEDIUM|LOW", + "message": "Detailed error message", + "resource": "resource_name", + "fix_suggestion": "How to resolve this issue" + } + ], + "warnings": [], + "info": [] +} +``` + +### Exception Handling + +#### Tag Requirement Exceptions +- Legacy resources (created before standards adoption) +- Third-party managed resources +- AWS managed resources + +#### Process for Exceptions +1. Document exception in pull request +2. Add waiver comment in code +3. Track exceptions for future remediation + +### Continuous Monitoring + +#### Drift Detection +- Monitor for manual changes outside IaC +- Alert on untagged resources +- Track compliance metrics +- Generate compliance reports + +#### Metrics to Track +- Tag compliance percentage +- Security scan failure rate +- Documentation coverage +- Standard adoption rate +- Exception requests and resolution + +This enforcement guide ensures consistent application of infrastructure standards while providing clear guidance for automated validation and manual review processes. \ No newline at end of file From a38fa1c776cc59bc4119b6694f89b9484ba86e37 Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Fri, 25 Jul 2025 15:18:15 -0600 Subject: [PATCH 73/77] ensure disk grouping always includes device --- host/disk/main.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/host/disk/main.tf b/host/disk/main.tf index dd5ec36..ce57f41 100644 --- a/host/disk/main.tf +++ b/host/disk/main.tf @@ -26,7 +26,7 @@ resource "datadog_monitor" "disk_space" { query = < ${var.disk_space_threshold_critical} EOQ @@ -55,7 +55,7 @@ resource "datadog_monitor" "disk_space_forecast" { query = < ${var.disk_inodes_threshold_critical} EOQ From c49ae0922cc523031e4631ecd9db410cd916c58b Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Fri, 19 Sep 2025 00:53:32 -0600 Subject: [PATCH 74/77] ensure alerts function for envs named prd --- common/common.tf | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/common/common.tf b/common/common.tf index 9d69640..016c3f1 100644 --- a/common/common.tf +++ b/common/common.tf @@ -260,7 +260,7 @@ ${local.alert_context} * **Message**: {{log.message}} * **Direct Link**: {{log.link}} {{#is_alert}} -{{#is_match "env.name" "prod"}} +{{#is_match "env.name" "prod" "prd"}} {{#is_match "datadog_managed" "critical"}} ${local.notify_on_crit} {{/is_match}} @@ -268,13 +268,13 @@ ${local.alert_context} ${local.notify_on_prod} {{/is_match}} {{/is_match}} -{{^is_match "env.name" "prod"}} +{{^is_match "env.name" "prod" "prd"}} ${local.notify_on_nonprod} {{/is_match}} {{/is_match}} {{/is_alert}} {{#is_recovery}} -{{#is_match "env.name" "prod"}} +{{#is_match "env.name" "prod" "prd"}} {{#is_match "datadog_managed" "critical"}} ${local.notify_on_crit} {{/is_match}} @@ -282,7 +282,7 @@ ${local.alert_context} ${local.notify_on_prod} {{/is_match}} {{/is_match}} -{{^is_match "env.name" "prod"}} +{{^is_match "env.name" "prod" "prd"}} ${local.notify_on_nonprod} {{/is_match}} {{/is_match}} @@ -297,7 +297,7 @@ Threshold: {{threshold}} Environment: {{env.name}} - {{#is_match "env.name" "prod"}} + {{#is_match "env.name" "prod" "prd"}} {{#is_match "datadog_managed" "critical"}} ${local.notify_on_crit} {{/is_match}} @@ -305,7 +305,7 @@ Environment: {{env.name}} ${local.notify_on_prod} {{/is_match}} {{/is_match}} - {{^is_match "env.name" "prod"}} + {{^is_match "env.name" "prod" "prd"}} ${local.notify_on_nonprod} {{/is_match}} @@ -322,7 +322,7 @@ Environment: {{env.name}} No further action is required. - {{#is_match "env.name" "prod"}} + {{#is_match "env.name" "prod" "prd"}} {{#is_match "datadog_managed" "critical"}} ${local.notify_on_crit} {{/is_match}} @@ -330,7 +330,7 @@ No further action is required. ${local.notify_on_prod} {{/is_match}} {{/is_match}} - {{^is_match "env.name" "prod"}} + {{^is_match "env.name" "prod" "prd"}} ${local.notify_on_nonprod} {{/is_match}} {{/is_recovery}} From 042dceb7d63c01366cc369b302b4e35f52c59146 Mon Sep 17 00:00:00 2001 From: Lalo Galvan <106835113+lalo-galvan@users.noreply.github.com> Date: Mon, 22 Sep 2025 14:18:10 -0600 Subject: [PATCH 75/77] make running_tasks ecs monitor less sensitive --- aws/ecs-service/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/ecs-service/main.tf b/aws/ecs-service/main.tf index 677893b..168b04f 100644 --- a/aws/ecs-service/main.tf +++ b/aws/ecs-service/main.tf @@ -27,7 +27,7 @@ resource "datadog_monitor" "running_tasks" { timeout_h = var.timeout_h query = < Date: Wed, 22 Oct 2025 14:07:31 -0600 Subject: [PATCH 76/77] created acm certificate renewal failure monitor --- aws/acm/.terraform.lock.hcl | 44 +++++++++++++++++++++++++ aws/acm/README.md | 65 +++++++++++++++++++++++++++++++++++++ aws/acm/common.tf | 1 + aws/acm/main.tf | 30 +++++++++++++++++ aws/acm/variables.tf | 23 +++++++++++++ aws/acm/versions.tf | 1 + common/common.tf | 51 +++++++++++++++++++++++++++++ 7 files changed, 215 insertions(+) create mode 100644 aws/acm/.terraform.lock.hcl create mode 100644 aws/acm/README.md create mode 120000 aws/acm/common.tf create mode 100644 aws/acm/main.tf create mode 100644 aws/acm/variables.tf create mode 120000 aws/acm/versions.tf diff --git a/aws/acm/.terraform.lock.hcl b/aws/acm/.terraform.lock.hcl new file mode 100644 index 0000000..bda5b8d --- /dev/null +++ b/aws/acm/.terraform.lock.hcl @@ -0,0 +1,44 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/datadog/datadog" { + version = "3.76.0" + constraints = ">= 3.37.0" + hashes = [ + "h1:WDN2Ar3dt3s35zy1jng7O28gDRaGZgLqqDzvb9pAtFo=", + "zh:055bfca2ab3d987fb1a6827c27673d08d50d7c6026be020db0176722fe73715a", + "zh:0568ce6217ca42c06d0d3d7788194d806c415f3ed831285751c245aa19377d3a", + "zh:48a82913ff629d3e20db815f98c916493abda8fef5c8a0258401e5122a5823d9", + "zh:893f70d972afbaf92f4d7c2d8e0cc2d542ac4fa46931ff7ef176dc53948fe985", + "zh:9213a9ad4f0a0806cf048c0a73fcf4abaf4b5a0459b5a82f5ce15e567f24fddf", + "zh:a22d66b33f372b703cc6e680880689ad7f46473ea402e2d82c1167793e953191", + "zh:a9606223ad215174a871cfc49e97aee04fbad4b1d444f6f00c49f76682596ddf", + "zh:adede6b1f1536b90339288b2741b0cdde3f5e26107bedef1ac04e15d164a3d9a", + "zh:c4597d7bb5fb9c17c3a11d58d1aa052f004cac080176ee995ee8a04ac8f9a2d3", + "zh:c4a64ca1ba1b58b90466c51591327d09214022dd47885fada20655b7e9830074", + "zh:d3f28181e605090b96d0059f201209649bde557feec2bd5955538dae88cc1a20", + "zh:d40402ba3289816f933895f009a04f525894417d6fc839c19cb12e612a9fea0b", + "zh:e7308e1315e9328f0c3ae9c631231bf71541b8220b5a9b3be32e00990b3b344d", + "zh:eb8189220c79020cff0033aa433332999b35b8c0a85a0a6afbd6a663b7211e0b", + ] +} + +provider "registry.terraform.io/hashicorp/null" { + version = "3.2.4" + constraints = ">= 3.1.0" + hashes = [ + "h1:L5V05xwp/Gto1leRryuesxjMfgZwjb7oool4WS1UEFQ=", + "zh:59f6b52ab4ff35739647f9509ee6d93d7c032985d9f8c6237d1f8a59471bbbe2", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:795c897119ff082133150121d39ff26cb5f89a730a2c8c26f3a9c1abf81a9c43", + "zh:7b9c7b16f118fbc2b05a983817b8ce2f86df125857966ad356353baf4bff5c0a", + "zh:85e33ab43e0e1726e5f97a874b8e24820b6565ff8076523cc2922ba671492991", + "zh:9d32ac3619cfc93eb3c4f423492a8e0f79db05fec58e449dee9b2d5873d5f69f", + "zh:9e15c3c9dd8e0d1e3731841d44c34571b6c97f5b95e8296a45318b94e5287a6e", + "zh:b4c2ab35d1b7696c30b64bf2c0f3a62329107bd1a9121ce70683dec58af19615", + "zh:c43723e8cc65bcdf5e0c92581dcbbdcbdcf18b8d2037406a5f2033b1e22de442", + "zh:ceb5495d9c31bfb299d246ab333f08c7fb0d67a4f82681fbf47f2a21c3e11ab5", + "zh:e171026b3659305c558d9804062762d168f50ba02b88b231d20ec99578a6233f", + "zh:ed0fe2acdb61330b01841fa790be00ec6beaac91d41f311fb8254f74eb6a711f", + ] +} diff --git a/aws/acm/README.md b/aws/acm/README.md new file mode 100644 index 0000000..17bb89c --- /dev/null +++ b/aws/acm/README.md @@ -0,0 +1,65 @@ + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | ~> 1.5 | +| [datadog](#requirement\_datadog) | >= 3.37 | +| [null](#requirement\_null) | >= 3.1.0 | + +## Providers + +| Name | Version | +|------|---------| +| [datadog](#provider\_datadog) | 3.76.0 | + +## Modules + +No modules. + +## Resources + +| Name | Type | +|------|------| +| [datadog_monitor.certificate_renewal_failure_check](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/monitor) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [additional\_tags](#input\_additional\_tags) | Additional tags (key:value format) to add to this type of check (combined with `local.tags` and `var.base_tags`) | `list(string)` | `[]` | no | +| [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | +| [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:ec2"
]
| no | +| [certificate\_renewal\_failure\_check\_enabled](#input\_certificate\_renewal\_failure\_check\_enabled) | Whether to enable the certificate renewal failure check | `bool` | `true` | no | +| [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | +| [env](#input\_env) | Environment the monitored resource is in (leave blank to omit tag) | `string` | `null` | no | +| [evaluation\_delay](#input\_evaluation\_delay) | Monitor evaluation delay (see [https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#set-alert-conditions](Datadog Docs)) | `number` | `900` | no | +| [group\_by](#input\_group\_by) | List of tags to group by | `list(string)` |
[
"name",
"aws_account",
"env",
"datadog_managed"
]
| no | +| [monitor\_exclude\_tags](#input\_monitor\_exclude\_tags) | Tags to be excluded in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [monitor\_include\_tags](#input\_monitor\_include\_tags) | Tags to be included in the monitoring query. Specify in key:value format | `list(string)` | `[]` | no | +| [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before generating alerts for a new resource | `number` | `300` | no | +| [notify\_alert\_override](#input\_notify\_alert\_override) | List of notifications for alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_crit\_override](#input\_notify\_crit\_override) | List of notifications for 24x7 alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_default](#input\_notify\_default) | List of alert notifications (can be overridden based on alert type) | `list(string)` | n/a | yes | +| [notify\_no\_data](#input\_notify\_no\_data) | Alert if no matching data is found | `bool` | `false` | no | +| [notify\_nodata\_override](#input\_notify\_nodata\_override) | List of notifications for no data (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_nonprod\_override](#input\_notify\_nonprod\_override) | List of notifications for non-prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_prod\_override](#input\_notify\_prod\_override) | List of notifications for 12x5 prod alerts in critical threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_recovery\_override](#input\_notify\_recovery\_override) | List of notifications for alert recovery (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [notify\_warn\_override](#input\_notify\_warn\_override) | List of notifications for alerts in warning threshold (uses `notify_default` otherwise) | `list(string)` | `[]` | no | +| [renotify\_interval](#input\_renotify\_interval) | Interval in minutes to re-send notifications about an alert | `number` | `60` | no | +| [runbook\_link](#input\_runbook\_link) | Runbook link to include in message | `string` | `null` | no | +| [service](#input\_service) | Service associated with the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [team](#input\_team) | Team supporting the monitored resource (leave blank to omit tag) | `string` | `null` | no | +| [timeout\_h](#input\_timeout\_h) | Auto-resolve alert in specified hours if condition no longer matches | `number` | `0` | no | +| [title\_prefix](#input\_title\_prefix) | Prefix all alerts with specified value in brackets | `string` | `null` | no | +| [title\_suffix](#input\_title\_suffix) | Suffix all alerts with specified value in parenthesis | `string` | `null` | no | +| [warn\_priority](#input\_warn\_priority) | Priority for alerts with no data (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | + +## Outputs + +No outputs. + \ No newline at end of file diff --git a/aws/acm/common.tf b/aws/acm/common.tf new file mode 120000 index 0000000..47c0063 --- /dev/null +++ b/aws/acm/common.tf @@ -0,0 +1 @@ +../../common/common.tf \ No newline at end of file diff --git a/aws/acm/main.tf b/aws/acm/main.tf new file mode 100644 index 0000000..a1c84be --- /dev/null +++ b/aws/acm/main.tf @@ -0,0 +1,30 @@ +locals { + # these must be defined but do not need to be overridden + monitor_alert_default_priority = null + monitor_warn_default_priority = null + monitor_nodata_default_priority = null + + title_prefix = var.title_prefix == null ? "" : "[${var.title_prefix}]" + title_suffix = var.title_suffix == null ? "" : " (${var.title_suffix})" +} + +resource "datadog_monitor" "certificate_renewal_failure_check" { + count = var.certificate_renewal_failure_check_enabled ? 1 : 0 + + name = join("", [local.title_prefix, "ACM - Certificate Renewal Failure", local.title_suffix]) + type = "event-v2 alert" + message = local.event_alert_base_message + tags = concat(local.common_tags, var.base_tags, var.additional_tags) + include_tags = false + + evaluation_delay = var.evaluation_delay + new_group_delay = var.new_group_delay + + query = <<-EOQ + events("source:amazon_acm").rollup("count").by("@aggregation_key,env").last("5m") > 0 + EOQ + + monitor_thresholds { + critical = 0 + } +} diff --git a/aws/acm/variables.tf b/aws/acm/variables.tf new file mode 100644 index 0000000..fe1b364 --- /dev/null +++ b/aws/acm/variables.tf @@ -0,0 +1,23 @@ +######################################## +# Global variables +######################################## +variable "additional_tags" { + default = [] + description = "Additional tags (key:value format) to add to this type of check (combined with `local.tags` and `var.base_tags`)" + type = list(string) +} + +variable "base_tags" { + default = ["resource:ec2"] + description = "Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this)" + type = list(string) +} + +######################################## +# Certificate Renewal Failure Check +######################################## +variable "certificate_renewal_failure_check_enabled" { + default = true + description = "Whether to enable the certificate renewal failure check" + type = bool +} diff --git a/aws/acm/versions.tf b/aws/acm/versions.tf new file mode 120000 index 0000000..cbeda73 --- /dev/null +++ b/aws/acm/versions.tf @@ -0,0 +1 @@ +../../common/versions.tf \ No newline at end of file diff --git a/common/common.tf b/common/common.tf index 016c3f1..403aed3 100644 --- a/common/common.tf +++ b/common/common.tf @@ -341,6 +341,57 @@ ${local.alert_context} **Alert Information** {{#is_alert}} ${local.notify_on_alert} {{/is_alert}} {{#is_recovery}} ${local.notify_on_recovery} {{/is_recovery}} +END + + event_alert_base_message = < Date: Tue, 28 Oct 2025 14:25:12 -0600 Subject: [PATCH 77/77] ensure monitor does not notify when monitor resolves --- aws/acm/README.md | 2 +- aws/acm/variables.tf | 2 +- common/common.tf | 24 ------------------------ 3 files changed, 2 insertions(+), 26 deletions(-) diff --git a/aws/acm/README.md b/aws/acm/README.md index 17bb89c..7e764a4 100644 --- a/aws/acm/README.md +++ b/aws/acm/README.md @@ -31,7 +31,7 @@ No modules. | [alert\_critical\_priority](#input\_alert\_critical\_priority) | Priority for alerts within critical threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | | [alert\_message](#input\_alert\_message) | Message to prepend to alert notifications | `string` | `"Alert"` | no | | [alert\_nodata\_priority](#input\_alert\_nodata\_priority) | Priority for alerts within warning threshold (P1-P5, uses monitor defaults if not specified) | `string` | `null` | no | -| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:ec2"
]
| no | +| [base\_tags](#input\_base\_tags) | Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this) | `list(string)` |
[
"resource:acm"
]
| no | | [certificate\_renewal\_failure\_check\_enabled](#input\_certificate\_renewal\_failure\_check\_enabled) | Whether to enable the certificate renewal failure check | `bool` | `true` | no | | [cost\_center](#input\_cost\_center) | Cost Center of the monitored resource (leave blank to omit tag) | `string` | `null` | no | | [dashboard\_link](#input\_dashboard\_link) | Dashboard link to include in message | `string` | `null` | no | diff --git a/aws/acm/variables.tf b/aws/acm/variables.tf index fe1b364..b406c50 100644 --- a/aws/acm/variables.tf +++ b/aws/acm/variables.tf @@ -8,7 +8,7 @@ variable "additional_tags" { } variable "base_tags" { - default = ["resource:ec2"] + default = ["resource:acm"] description = "Base tags (key:value format) to add to this type of check (combined with `local.tags` and `var.additional_tags`, generally you should not change this)" type = list(string) } diff --git a/common/common.tf b/common/common.tf index 403aed3..e4fa7af 100644 --- a/common/common.tf +++ b/common/common.tf @@ -340,7 +340,6 @@ END ${local.alert_context} **Alert Information** {{#is_alert}} ${local.notify_on_alert} {{/is_alert}} -{{#is_recovery}} ${local.notify_on_recovery} {{/is_recovery}} END event_alert_base_message = <