diff --git a/modules/aws/rds_cloudwatch.hcl b/modules/aws/rds_cloudwatch.hcl index 0052879..e912efb 100644 --- a/modules/aws/rds_cloudwatch.hcl +++ b/modules/aws/rds_cloudwatch.hcl @@ -42,6 +42,7 @@ ingester aws_rds_logical_cloudwatch module { gauge "connections" { unit = "count" aggregator = "MAX" + source cloudwatch "connections" { query { aggregator = "Maximum" @@ -58,6 +59,7 @@ ingester aws_rds_logical_cloudwatch module { gauge "write_iops" { unit = "iops" aggregator = "AVG" + source cloudwatch "write_iops" { query { aggregator = "Average" @@ -74,6 +76,7 @@ ingester aws_rds_logical_cloudwatch module { gauge "read_iops" { unit = "iops" aggregator = "AVG" + source cloudwatch "read_iops" { query { aggregator = "Average" @@ -90,6 +93,7 @@ ingester aws_rds_logical_cloudwatch module { gauge "read_latency" { unit = "s" aggregator = "AVG" + source cloudwatch "read_latency" { query { aggregator = "Average" @@ -106,6 +110,7 @@ ingester aws_rds_logical_cloudwatch module { gauge "write_latency" { unit = "s" aggregator = "AVG" + source cloudwatch "wrtie_latency" { query { aggregator = "Average" @@ -164,6 +169,7 @@ ingester aws_rds_physical_cloudwatch module { gauge "network_in" { unit = "bps" aggregator = "AVG" + source cloudwatch "network_in" { query { aggregator = "Average" @@ -180,6 +186,7 @@ ingester aws_rds_physical_cloudwatch module { gauge "network_out" { unit = "bps" aggregator = "AVG" + source cloudwatch "network_out" { query { aggregator = "Average" @@ -196,6 +203,7 @@ ingester aws_rds_physical_cloudwatch module { gauge "cpu" { unit = "percent" aggregator = "AVG" + source cloudwatch "cpu" { query { aggregator = "Average" @@ -212,6 +220,7 @@ ingester aws_rds_physical_cloudwatch module { gauge "free_space" { unit = "bytes" aggregator = "MIN" + source cloudwatch "free_space" { query { aggregator = "Minimum" @@ -228,6 +237,7 @@ ingester aws_rds_physical_cloudwatch module { gauge "replica_lag" { unit = "s" aggregator = "MAX" + source cloudwatch "replica_lag" { query { aggregator = "Maximum" @@ -244,6 +254,7 @@ ingester aws_rds_physical_cloudwatch module { gauge "queue_depth" { unit = "count" aggregator = "MAX" + source cloudwatch "queue_depth" { query { aggregator = "Maximum" @@ -256,4 +267,76 @@ ingester aws_rds_physical_cloudwatch module { } } } + + gauge "ebs_bytes_balance" { + unit = "percent" + aggregator = "AVG" + + source cloudwatch "ebs_bytes_balance" { + query { + aggregator = "Average" + namespace = "AWS/RDS" + + # Removed the % for iox to run successfully. Although it does not error but neither does it return any metrics + metric_name = "EBSByteBalance" + + dimensions = { + "DBInstanceIdentifier" = "$input{DBInstanceIdentifier}" + } + } + } + } + + gauge "ebs_io_balance" { + unit = "percent" + aggregator = "AVG" + + source cloudwatch "ebs_io_balance" { + query { + aggregator = "Average" + namespace = "AWS/RDS" + + # Removed the % for iox to run successfully. Although it does not error but neither does it return any metrics + metric_name = "EBSIOBalance" + + dimensions = { + "DBInstanceIdentifier" = "$input{DBInstanceIdentifier}" + } + } + } + } + + gauge "burst_balance" { + unit = "percent" + aggregator = "AVG" + + source cloudwatch "burst_balance" { + query { + aggregator = "Average" + namespace = "AWS/RDS" + metric_name = "BurstBalance" + + dimensions = { + "DBInstanceIdentifier" = "$input{DBInstanceIdentifier}" + } + } + } + } + + gauge "cpu_credit_balance" { + unit = "count" + aggregator = "SUM" + + source cloudwatch "cpu_credit_balance" { + query { + aggregator = "Sum" + namespace = "AWS/RDS" + metric_name = "CPUCreditBalance" + + dimensions = { + "DBInstanceIdentifier" = "$input{DBInstanceIdentifier}" + } + } + } + } }