diff --git a/modules/rds-dashboard/main.tf b/modules/rds-dashboard/main.tf index b699cb3..bd031f2 100644 --- a/modules/rds-dashboard/main.tf +++ b/modules/rds-dashboard/main.tf @@ -14,60 +14,37 @@ resource "lightstep_metric_dashboard" "aws_rds_dashboard" { chart { name = "CPU Utilization" - rank = "1" + rank = "0" type = "timeseries" query { query_name = "a" - display = "line" + display = "bar" hidden = false - metric = "aws.rds.cpu_utilization_max" - timeseries_operator = "last" - - - group_by { - aggregation_method = "max" - keys = ["DBInstanceIdentifier", ] - } - - } - - } - - chart { - name = "Database Connections / Disk Queue Depth" - rank = "2" - type = "timeseries" - - query { - query_name = "a" - display = "line" - hidden = false - - metric = "aws.rds.database_connections_count" + metric = "aws.rds.cpu_utilization_count" timeseries_operator = "delta" group_by { - aggregation_method = "count" - keys = ["DBInstanceIdentifier", ] + aggregation_method = "sum" + keys = [] } } query { query_name = "b" - display = "line" + display = "bar" hidden = false - metric = "aws.rds.disk_queue_depth_count" + metric = "aws.rds.replica_lag_count" timeseries_operator = "delta" group_by { - aggregation_method = "max" - keys = ["DBInstanceIdentifier", ] + aggregation_method = "sum" + keys = [] } } @@ -75,38 +52,38 @@ resource "lightstep_metric_dashboard" "aws_rds_dashboard" { } chart { - name = "Freeable Memory / Freeable Storage Space" - rank = "3" + name = "Database Connections" + rank = "1" type = "timeseries" query { query_name = "a" - display = "line" + display = "bar" hidden = false - metric = "aws.rds.freeable_memory_max" - timeseries_operator = "last" + metric = "aws.rds.database_connections_count" + timeseries_operator = "delta" group_by { - aggregation_method = "max" - keys = ["DBInstanceIdentifier", ] + aggregation_method = "sum" + keys = [] } } query { query_name = "b" - display = "line" + display = "bar" hidden = false - metric = "aws.rds.free_storage_space_max" - timeseries_operator = "last" + metric = "aws.rds.disk_queue_depth_count" + timeseries_operator = "delta" group_by { - aggregation_method = "max" - keys = ["DBInstanceIdentifier", ] + aggregation_method = "sum" + keys = [] } } @@ -114,54 +91,38 @@ resource "lightstep_metric_dashboard" "aws_rds_dashboard" { } chart { - name = "Read IOPS / Write IOPS / Burst Balance" - rank = "4" + name = "Freeable Memory" + rank = "2" type = "timeseries" query { query_name = "a" - display = "line" + display = "bar" hidden = false - metric = "aws.rds.read_iops_max" - timeseries_operator = "last" + metric = "aws.rds.freeable_memory_count" + timeseries_operator = "delta" group_by { - aggregation_method = "max" - keys = ["DBInstanceIdentifier", ] + aggregation_method = "sum" + keys = [] } } query { query_name = "b" - display = "line" - hidden = false - - metric = "aws.rds.write_iops_max" - timeseries_operator = "last" - - - group_by { - aggregation_method = "max" - keys = ["DBInstanceIdentifier", ] - } - - } - - query { - query_name = "c" - display = "line" + display = "bar" hidden = false - metric = "aws.rds.burst_balance_max" - timeseries_operator = "last" + metric = "aws.rds.free_storage_space_count" + timeseries_operator = "delta" group_by { - aggregation_method = "max" - keys = ["DBInstanceIdentifier", ] + aggregation_method = "sum" + keys = [] } } @@ -169,38 +130,38 @@ resource "lightstep_metric_dashboard" "aws_rds_dashboard" { } chart { - name = "Read Latency / Write Latency" - rank = "5" + name = "Read IOPS" + rank = "3" type = "timeseries" query { query_name = "a" - display = "line" + display = "bar" hidden = false - metric = "aws.rds.read_latency_max" - timeseries_operator = "last" + metric = "aws.rds.read_iops_count" + timeseries_operator = "delta" group_by { - aggregation_method = "max" - keys = ["DBInstanceIdentifier", ] + aggregation_method = "sum" + keys = [] } } query { query_name = "b" - display = "line" + display = "bar" hidden = false - metric = "aws.rds.write_latency_max" - timeseries_operator = "last" + metric = "aws.rds.write_iops_count" + timeseries_operator = "delta" group_by { - aggregation_method = "max" - keys = ["DBInstanceIdentifier", ] + aggregation_method = "sum" + keys = [] } } @@ -208,38 +169,38 @@ resource "lightstep_metric_dashboard" "aws_rds_dashboard" { } chart { - name = "Read Throughput / Write Throughput" - rank = "6" + name = "Read Latency" + rank = "4" type = "timeseries" query { query_name = "a" - display = "line" + display = "bar" hidden = false - metric = "aws.rds.read_throughput_count" + metric = "aws.rds.read_latency_count" timeseries_operator = "delta" group_by { - aggregation_method = "max" - keys = ["dbinstanceidentifer", ] + aggregation_method = "sum" + keys = [] } } query { query_name = "b" - display = "line" + display = "bar" hidden = false - metric = "aws.rds.write_throughput_count" - timeseries_operator = "rate" + metric = "aws.rds.write_latency_count" + timeseries_operator = "delta" group_by { - aggregation_method = "max" - keys = ["dbinstanceidentifer", ] + aggregation_method = "sum" + keys = [] } } @@ -247,38 +208,38 @@ resource "lightstep_metric_dashboard" "aws_rds_dashboard" { } chart { - name = "Network Receive Throughput / Network Transmit Throughput" - rank = "7" + name = "Read Throughput" + rank = "5" type = "timeseries" query { query_name = "a" - display = "line" + display = "bar" hidden = false - metric = "aws.rds.network_receive_throughput_max" - timeseries_operator = "last" + metric = "aws.rds.read_throughput_count" + timeseries_operator = "delta" group_by { - aggregation_method = "max" - keys = ["DBInstanceIdentifier", ] + aggregation_method = "sum" + keys = [] } } query { query_name = "b" - display = "line" + display = "bar" hidden = false - metric = "aws.rds.network_transmit_throughput_max" - timeseries_operator = "last" + metric = "aws.rds.write_throughput_count" + timeseries_operator = "delta" group_by { - aggregation_method = "max" - keys = ["DBInstanceIdentifier", ] + aggregation_method = "sum" + keys = [] } } @@ -286,38 +247,38 @@ resource "lightstep_metric_dashboard" "aws_rds_dashboard" { } chart { - name = "Swap Usage / Bin Log Disk Usage" - rank = "8" + name = "Network Receive Throughput" + rank = "6" type = "timeseries" query { query_name = "a" - display = "line" + display = "bar" hidden = false - metric = "aws.rds.swap_usage_max" - timeseries_operator = "last" + metric = "aws.rds.network_receive_throughput_count" + timeseries_operator = "delta" group_by { - aggregation_method = "max" - keys = ["DBInstanceIdentifier", ] + aggregation_method = "sum" + keys = [] } } query { query_name = "b" - display = "line" + display = "bar" hidden = false - metric = "aws.rds.bin_log_disk_usage_max" - timeseries_operator = "last" + metric = "aws.rds.network_transmit_throughput_count" + timeseries_operator = "delta" group_by { - aggregation_method = "max" - keys = ["DBInstanceIdentifier", ] + aggregation_method = "sum" + keys = [] } } @@ -325,38 +286,38 @@ resource "lightstep_metric_dashboard" "aws_rds_dashboard" { } chart { - name = "CPU Credit Usage / CPU Credit Balance" - rank = "9" + name = "Swap Usage" + rank = "7" type = "timeseries" query { query_name = "a" - display = "line" + display = "bar" hidden = false - metric = "aws.rds.cpu_credit_usage_max" - timeseries_operator = "last" + metric = "aws.rds.swap_usage_count" + timeseries_operator = "delta" group_by { - aggregation_method = "max" - keys = ["DBInstanceIdentifier", ] + aggregation_method = "sum" + keys = [] } } query { query_name = "b" - display = "line" + display = "bar" hidden = false - metric = "aws.rds.cpu_credit_balance_max" - timeseries_operator = "last" + metric = "aws.rds.bin_log_disk_usage_count" + timeseries_operator = "delta" group_by { - aggregation_method = "max" - keys = ["DBInstanceIdentifier", ] + aggregation_method = "sum" + keys = [] } } @@ -364,42 +325,42 @@ resource "lightstep_metric_dashboard" "aws_rds_dashboard" { } chart { - name = "CPU Credit Usage / CPU Credit Balance" - rank = "10" + name = "CPU Credit Usage" + rank = "8" type = "timeseries" query { query_name = "a" - display = "line" + display = "bar" hidden = false - metric = "aws.rds.cpu_credit_usage_max" - timeseries_operator = "last" + metric = "aws.rds.cpu_credit_usage_count" + timeseries_operator = "delta" group_by { - aggregation_method = "max" - keys = ["DBInstanceIdentifier", ] + aggregation_method = "sum" + keys = [] } } query { query_name = "b" - display = "line" + display = "bar" hidden = false - metric = "aws.rds.cpu_credit_balance_max" - timeseries_operator = "last" + metric = "aws.rds.cpu_credit_balance_count" + timeseries_operator = "delta" group_by { - aggregation_method = "max" - keys = ["DBInstanceIdentifier", ] + aggregation_method = "sum" + keys = [] } } } -} \ No newline at end of file +}