Skip to content

Commit

Permalink
Merge pull request #81 from last9/rds-add-coalesce
Browse files Browse the repository at this point in the history
add coalesce to associate single component with multiple services
  • Loading branch information
saurabh-hirani authored May 18, 2022
2 parents c94c6ea + 7f391e8 commit 275119f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion modules/aws/aurora_cloudwatch.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ingester aws_aurora_cloudwatch module {

data_for_graph_node {
type = "aurora_instance_database"
name = "$input{DBInstanceIdentifier}-db"
name = "coalesce_on_interpolation(\"$input{DBInstanceIdentifier}-db-$input{custom_tag}\",\"$input{DBInstanceIdentifier}-db\")"
}

using = {
Expand Down
24 changes: 12 additions & 12 deletions modules/aws/dynamodb_cloudwatch.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ingester aws_dynamodb_table_operation_cloudwatch module {

data_for_graph_node {
type = "dynamodb_operation"
name = "$input{Operation}"
name = "coalesce_on_interpolation(\"$input{Operation}-$input{custom_tag}\",\"$input{Operation}\")"
}

using = {
Expand All @@ -32,11 +32,11 @@ ingester aws_dynamodb_table_operation_cloudwatch module {
inputs = "$input{inputs}"

input_query = <<-EOF
label_set(
label_replace(
dynamodb_table{$input{tag_filter}}, 'id=TableName'
), "service", "$input{service}"
)
label_set(
label_replace(
dynamodb_table{$input{tag_filter}}, 'id=TableName'
), "service", "$input{service}"
)
EOF

gauge "system_errors" {
Expand Down Expand Up @@ -144,7 +144,7 @@ ingester aws_dynamodb_table_cloudwatch module {

data_for_graph_node {
type = "dynamodb"
name = "$input{TableName}"
name = "coalesce_on_interpolation(\"$input{TableName}-$input{custom_tag}\",\"$input{TableName}\")"
}

using = {
Expand All @@ -154,11 +154,11 @@ ingester aws_dynamodb_table_cloudwatch module {
inputs = "$input{inputs}"

input_query = <<-EOF
label_set(
label_replace(
dynamodb_table{$input{tag_filter}}, 'id=TableName'
), "service", "$input{service}"
)
label_set(
label_replace(
dynamodb_table{$input{tag_filter}}, 'id=TableName'
), "service", "$input{service}"
)
EOF

gauge "rcu" {
Expand Down
2 changes: 1 addition & 1 deletion modules/aws/elasticache_cloudwatch.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ingester aws_elasticache_cloudwatch module {

data_for_graph_node {
type = "elasticache_database"
name = "$input{CacheClusterId}-db"
name = "coalesce_on_interpolation(\"$input{CacheClusterId}-db-$input{custom_tag}\",\"$input{CacheClusterId}-db\")"
}

using = {
Expand Down
2 changes: 1 addition & 1 deletion modules/aws/rds_cloudwatch.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ingester aws_rds_cloudwatch module {

data_for_graph_node {
type = "rds_database"
name = "$input{DBInstanceIdentifier}-db"
name = "coalesce_on_interpolation(\"$input{DBInstanceIdentifier}-db-$input{custom_tag}\",\"$input{DBInstanceIdentifier}-db\")"
}

using = {
Expand Down

0 comments on commit 275119f

Please sign in to comment.