Module: efs-cloudwatch-sns-alarms
Create a set of sane EFS CloudWatch alerts for monitoring the health of an EFS resource.
area | metric | comparison operator | threshold | rationale |
---|---|---|---|---|
Storage | BurstCreditBalance | < | 192000000000 | 192 GB in Bytes (last hour where you can burst at 100 MB/sec) |
Storage | PercentIOLimit | > | 95 | When the IO limit has been exceeded, the system performance drops. |
Examples
resource "aws_efs_file_system" "default" {
creation_token = "app"
}
module "efs_alarms" {
source = "git::https://github.com/cloudposse/terraform-aws-efs-cloudwatch-sns-alarms.git?ref=master"
filesystem_id = "${aws_efs_file_system.default.id}"
}
Variables
Required Variables
filesystem_id
(string
) requiredThe EFS file system ID that you want to monitor
Optional Variables
add_sns_policy
(string
) optionalAttach a policy that allows the notifications through to the SNS topic endpoint
Default value:
"false"
additional_endpoint_arns
(list(string)
) optionalAny alert endpoints, such as autoscaling, or app escaling endpoint arns that will respond to an alert
Default value:
[ ]
burst_credit_balance_threshold
(string
) optionalThe minimum number of burst credits that a file system should have.
Default value:
"192000000000"
percent_io_limit_threshold
(string
) optionalIO Limit threshold
Default value:
"95"
sns_topic_arn
(string
) optionalAn SNS topic ARN that has already been created. Its policy must already allow access from CloudWatch Alarms, or set
add_sns_policy
totrue
Default value:
""
Context Variables
The following variables are defined in the context.tf
file of this module and part of the terraform-null-label pattern.
context.tf
file of this module and part of the terraform-null-label pattern.Outputs
sns_topic_arn
An SNS topic ARN that has already been created. Its policy must already allow access from CloudWatch Alarms, or set
add_sns_policy
totrue
Dependencies
Providers
aws
Resources
The following resources are used by this module:
aws_cloudwatch_metric_alarm.burst_credit_balance_too_low
(resource)aws_cloudwatch_metric_alarm.percent_io_limit_too_high
(resource)aws_sns_topic.default
(resource)aws_sns_topic_policy.default
(resource)
Data Sources
The following data sources are used by this module:
aws_caller_identity.default
(data source)aws_iam_policy_document.sns_topic_policy
(data source)