metric-filter-alarm

dwp/metric-filter-alarm/aws

Terraform Module HCL AWS

Terraform module that creates AWS CloudWatch metric filters and alarms

Install
module "metric-filter-alarm" {
source = "dwp/metric-filter-alarm/aws"
version = "2.0.3"
}
plain text: /constructs/tfmod-dwp-metric-filter-alarm-aws/install.txt
⭐ Source on GitHub 📦 Registry page
README

AWS metric filter alarm Terraform module Terraform module that creates AWS CloudWatch metric filter and alarm Usage ``hcl module "my_metric_filter_alarm" { source = "dwp/metric-filter-alarm/aws" log_group_name = "MyLogGroup" metric_namespace = "MyMetricNamespace" pattern = "ERROR" alarm_name = "MyAlarm" } ` Examples The following example creates a CloudWatch Log Group, Alarm and SNS Topic. The Alarm monitors the Log Group for "ERROR" and if there are more than five occurrences within one hour the Alarm will go into an "ALARM" state and a notification will be sent to the SNS Topic `hcl resource "aws_cloudwatch_log_group" "MyLogGroup" { name = "MyLogGroup" } resource "aws_sns_topic" "MyTopic" { name = "MyTopic" display_name = "My Topic" } module "my_metric_filter_alarm" { source = "dwp/metri

Inputs (16)
NameTypeDescriptionDefault
metric_namespacestringThe destination namespace of the CloudWatch metric required
log_group_namestringThe name of the log group to associate the metric filter with required
alarm_namestringThe descriptive name for the alarm. This name must be unique within the user's A required
patternstringA valid CloudWatch Logs filter pattern for extracting metric data out of ingeste required
metric_valuestringThe value of the CloudWatch metric"1"
evaluation_periodsstringThe number of periods over which data is compared to the specified threshold"1"
notification_typestring(optional) The notification type of this alarm. Either of the following is suppo"Warning"
statisticstringThe statistic to apply to the alarm's associated metric. Either of the following"Sum"
periodstringThe period in seconds over which the specified statistic is applied"60"
thresholdstringThe value against which the specified statistic is compared"0"
severitystring(optional) The severity of this alarm. Either of the following is supported: Low"Medium"
treat_missing_datastring(optional) How the alarm is to handle missing data points. Either of the followi"missing"
metric_filter_namestringA name for the metric filter""
alarm_action_arnslist(string)The list of actions to execute when this alarm transitions into an ALARM state f[]
comparison_operatorstringThe arithmetic operation to use when comparing the specified Statistic and Thres"GreaterThanThreshold"
alarm_descriptionstringThe description for the alarm""
Outputs (3)
metric_filter_id — The ID of the metric filter
metric_filter_alarm_arn — The arn of the metric filter alarm
metric_alarm_tags — A mapping of tags to assign to the resource.
Resources (2)
aws_cloudwatch_log_metric_filteraws_cloudwatch_metric_alarm
Details
FrameworkTerraform Module
LanguageHCL
Version2.0.3
Cloud AWS
★ Stars7
Forks12
Total downloads90.0k
Inputs16
Outputs3
Resources2
LicenseApache-2.0
Namespacedwp
Updated