Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions examples/complete/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,22 @@ module "honeycomb-aws-integrations" {

# aws metrics integration
# enable_cloudwatch_metrics = true
# Only stream specific EC2 metrics and all ELB metrics to Honeycomb
# cloudwatch_metrics_include_filters = [
# {
# namespace = "AWS/EC2"
# metric_names = [
# "CPUUtilization",
# "DiskWriteOps",
# "NetworkIn",
# "NetworkOut"
# ]
# },
# {
# namespace = "AWS/ELB"
# metric_names = [] # include all metrics for this namespace
# }
# ]

# s3 logfile - alb access logs
s3_bucket_arn = var.s3_bucket_arn
Expand Down
16 changes: 16 additions & 0 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@ module "honeycomb-aws-integrations" {

# aws metrics integration
# enable_cloudwatch_metrics = true
# Only stream specific EC2 metrics and all ELB metrics to Honeycomb
# cloudwatch_metrics_include_filters = [
# {
# namespace = "AWS/EC2"
# metric_names = [
# "CPUUtilization",
# "DiskWriteOps",
# "NetworkIn",
# "NetworkOut"
# ]
# },
# {
# namespace = "AWS/ELB"
# metric_names = [] # include all metrics for this namespace
# }
# ]

# s3 logfile - alb access logs
s3_bucket_arn = var.s3_bucket_arn
Expand Down
3 changes: 3 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ module "cloudwatch_metrics" {
honeycomb_api_key = var.honeycomb_api_key
honeycomb_dataset_name = "cloudwatch-metrics"

include_filters = var.cloudwatch_metrics_include_filters
exclude_filters = var.cloudwatch_metrics_exclude_filters

s3_failure_bucket_arn = module.failure_bucket.s3_bucket_arn

tags = var.tags
Expand Down
27 changes: 27 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,35 @@ variable "cloudwatch_metrics_name" {
default = "honeycomb-cloudwatch-metrics"
}

variable "cloudwatch_metrics_include_filters" {
type = list(object({
namespace = string
metric_names = list(string)
}))
default = []
description = <<EOH
An optional list of inclusive CloudWatch Metric filters. If set, we'll only stream metrics matching these namespace and metric names.
Pass an empty list (`[]`) to `metric_names` to include all metrics for the namespace.
Mutually exclusive with exclude filters.
EOH
}

variable "cloudwatch_metrics_exclude_filters" {
type = list(object({
namespace = string
metric_names = list(string)
}))
default = []
description = <<EOH
An optional list of exclusive CloudWatch Metric filters. If set, we'll only stream metrics that do not match these namespace and metric names.
Pass an empty list (`[]`) to `metric_names` to exclude all metrics for the namespace.
Mutually exclusive with include filters.
EOH
}

variable "s3_logfile_name" {
type = string
description = "Name for the S3 Logfile integration resources"
default = "honeycomb-s3-logfile"
}

Loading