Skip to content

Commit ef3b64f

Browse files
fix: align metric visualizations to fixed buckets to match GCP default behavior (Redis Monitoring) (#189)
1 parent a5f899f commit ef3b64f

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

service/redis/db_monitoring.tf

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ resource "observe_dashboard" "redis_monitoring" {
11111111
"@A <- @\"commands_calls_from_GCP/Redis Metrics\" {",
11121112
" filter role = \"primary\" ",
11131113
" join instance_pkey = @redis.instance_pkey",
1114-
" align frame(back: 2m), metric_commands_calls_ybcszjy4:avg(m(\"commands_calls\"))",
1114+
" align 2m, metric_commands_calls_ybcszjy4:avg(m(\"commands_calls\"))",
11151115
" aggregate metric_commands_calls_ybcszjy4:sum(metric_commands_calls_ybcszjy4), group_by(hostname)",
11161116
"}",
11171117
"<- @A {}",
@@ -1138,7 +1138,7 @@ resource "observe_dashboard" "redis_monitoring" {
11381138
@A <- @"commands_calls_from_GCP/Redis Metrics" {
11391139
filter role = "primary"
11401140
join instance_pkey = @redis.instance_pkey
1141-
align frame(back: 2m), metric_commands_calls_ybcszjy4:avg(m("commands_calls"))
1141+
align 2m, metric_commands_calls_ybcszjy4:avg(m("commands_calls"))
11421142
aggregate metric_commands_calls_ybcszjy4:sum(metric_commands_calls_ybcszjy4), group_by(hostname)
11431143
}
11441144
<- @A {}
@@ -1328,7 +1328,7 @@ resource "observe_dashboard" "redis_monitoring" {
13281328
"@A <- @\"stats_cpu_utilization_from_GCP/Redis Metrics\" {",
13291329
" filter role = \"primary\"",
13301330
" join instance_pkey = @redis.instance_pkey",
1331-
" align frame(back: 5m), metric_stats_cpu_utilization_8ieslylf:rate(m(\"stats_cpu_utilization\"))",
1331+
" align 2m, metric_stats_cpu_utilization_8ieslylf:rate(m(\"stats_cpu_utilization\"))",
13321332
" aggregate metric_stats_cpu_utilization_8ieslylf:sum(metric_stats_cpu_utilization_8ieslylf), group_by(hostname)",
13331333
"}",
13341334
"<- @A {}",
@@ -1355,7 +1355,7 @@ resource "observe_dashboard" "redis_monitoring" {
13551355
@A <- @"stats_cpu_utilization_from_GCP/Redis Metrics" {
13561356
filter role = "primary"
13571357
join instance_pkey = @redis.instance_pkey
1358-
align frame(back: 5m), metric_stats_cpu_utilization_8ieslylf:rate(m("stats_cpu_utilization"))
1358+
align 2m, metric_stats_cpu_utilization_8ieslylf:rate(m("stats_cpu_utilization"))
13591359
aggregate metric_stats_cpu_utilization_8ieslylf:sum(metric_stats_cpu_utilization_8ieslylf), group_by(hostname)
13601360
}
13611361
<- @A {}
@@ -1550,7 +1550,7 @@ resource "observe_dashboard" "redis_monitoring" {
15501550
"@A <- @\"keyspace_keys_from_GCP/Redis Metrics\" {",
15511551
" filter role = \"primary\"",
15521552
" join instance_pkey = @redis.instance_pkey",
1553-
" align frame(back: 2m), metric_keyspace_keys_gutc2399:avg(m(\"keyspace_keys\"))",
1553+
" align 2m, metric_keyspace_keys_gutc2399:avg(m(\"keyspace_keys\"))",
15541554
" aggregate metric_keyspace_keys_gutc2399:sum(metric_keyspace_keys_gutc2399), group_by(hostname)",
15551555
"}",
15561556
"<- @A {}",
@@ -1577,7 +1577,7 @@ resource "observe_dashboard" "redis_monitoring" {
15771577
@A <- @"keyspace_keys_from_GCP/Redis Metrics" {
15781578
filter role = "primary"
15791579
join instance_pkey = @redis.instance_pkey
1580-
align frame(back: 2m), metric_keyspace_keys_gutc2399:avg(m("keyspace_keys"))
1580+
align 2m, metric_keyspace_keys_gutc2399:avg(m("keyspace_keys"))
15811581
aggregate metric_keyspace_keys_gutc2399:sum(metric_keyspace_keys_gutc2399), group_by(hostname)
15821582
}
15831583
<- @A {}
@@ -1777,7 +1777,7 @@ resource "observe_dashboard" "redis_monitoring" {
17771777
"@A <- @\"clients_connected_from_GCP/Redis Metrics\" {",
17781778
" filter role = \"primary\"",
17791779
" join instance_pkey = @redis.instance_pkey",
1780-
" align frame(back: 2m), metric_clients_connected_3x4tfwpv:avg(m(\"clients_connected\"))",
1780+
" align 2m, metric_clients_connected_3x4tfwpv:avg(m(\"clients_connected\"))",
17811781
" aggregate metric_clients_connected_3x4tfwpv:sum(metric_clients_connected_3x4tfwpv), group_by(hostname)",
17821782
"}",
17831783
"<- @A {}",
@@ -1804,7 +1804,7 @@ resource "observe_dashboard" "redis_monitoring" {
18041804
@A <- @"clients_connected_from_GCP/Redis Metrics" {
18051805
filter role = "primary"
18061806
join instance_pkey = @redis.instance_pkey
1807-
align frame(back: 2m), metric_clients_connected_3x4tfwpv:avg(m("clients_connected"))
1807+
align 2m, metric_clients_connected_3x4tfwpv:avg(m("clients_connected"))
18081808
aggregate metric_clients_connected_3x4tfwpv:sum(metric_clients_connected_3x4tfwpv), group_by(hostname)
18091809
}
18101810
<- @A {}
@@ -1997,7 +1997,7 @@ resource "observe_dashboard" "redis_monitoring" {
19971997
opal = [
19981998
"filter role = \"primary\"",
19991999
"join instance_pkey = @redis.instance_pkey",
2000-
"align frame(back: 2m), metric_stats_memory_usage_ratio_44v2388h:avg(m(\"stats_memory_usage_ratio\"))",
2000+
"align 2m, metric_stats_memory_usage_ratio_44v2388h:avg(m(\"stats_memory_usage_ratio\"))",
20012001
"aggregate metric_stats_memory_usage_ratio_44v2388h:sum(metric_stats_memory_usage_ratio_44v2388h*100), group_by(hostname)",
20022002
"",
20032003
]
@@ -2022,7 +2022,7 @@ resource "observe_dashboard" "redis_monitoring" {
20222022
pipeline = <<-EOT
20232023
filter role = "primary"
20242024
join instance_pkey = @redis.instance_pkey
2025-
align frame(back: 2m), metric_stats_memory_usage_ratio_44v2388h:avg(m("stats_memory_usage_ratio"))
2025+
align 2m, metric_stats_memory_usage_ratio_44v2388h:avg(m("stats_memory_usage_ratio"))
20262026
aggregate metric_stats_memory_usage_ratio_44v2388h:sum(metric_stats_memory_usage_ratio_44v2388h*100), group_by(hostname)
20272027
EOT
20282028
},
@@ -2216,7 +2216,7 @@ resource "observe_dashboard" "redis_monitoring" {
22162216
"@A <- @\"stats_network_traffic_from_GCP/Redis Metrics\" {",
22172217
" filter role = \"primary\"",
22182218
" join instance_pkey = @redis.instance_pkey",
2219-
" align frame(back: 2m), metric_stats_network_traffic_5me9224l:avg(m(\"stats_network_traffic\"))",
2219+
" align 2m, metric_stats_network_traffic_5me9224l:avg(m(\"stats_network_traffic\"))",
22202220
" aggregate metric_stats_network_traffic_5me9224l:sum(metric_stats_network_traffic_5me9224l), group_by(hostname)",
22212221
"}",
22222222
"<- @A {}",
@@ -2243,7 +2243,7 @@ resource "observe_dashboard" "redis_monitoring" {
22432243
@A <- @"stats_network_traffic_from_GCP/Redis Metrics" {
22442244
filter role = "primary"
22452245
join instance_pkey = @redis.instance_pkey
2246-
align frame(back: 2m), metric_stats_network_traffic_5me9224l:avg(m("stats_network_traffic"))
2246+
align 2m, metric_stats_network_traffic_5me9224l:avg(m("stats_network_traffic"))
22472247
aggregate metric_stats_network_traffic_5me9224l:sum(metric_stats_network_traffic_5me9224l), group_by(hostname)
22482248
}
22492249
<- @A {}
@@ -2439,7 +2439,7 @@ resource "observe_dashboard" "redis_monitoring" {
24392439
"@A <- @\"stats_connections_total_from_GCP/Redis Metrics\" {",
24402440
" filter role = \"primary\"",
24412441
" join instance_pkey = @redis.instance_pkey",
2442-
" align frame(back: 2m), metric_stats_connections_total_46w7dr1w:avg(m(\"stats_connections_total\"))",
2442+
" align 2m, metric_stats_connections_total_46w7dr1w:avg(m(\"stats_connections_total\"))",
24432443
" aggregate metric_stats_connections_total_46w7dr1w:sum(metric_stats_connections_total_46w7dr1w), group_by(hostname)",
24442444
"}",
24452445
"<- @A {}",
@@ -2466,7 +2466,7 @@ resource "observe_dashboard" "redis_monitoring" {
24662466
@A <- @"stats_connections_total_from_GCP/Redis Metrics" {
24672467
filter role = "primary"
24682468
join instance_pkey = @redis.instance_pkey
2469-
align frame(back: 2m), metric_stats_connections_total_46w7dr1w:avg(m("stats_connections_total"))
2469+
align 2m, metric_stats_connections_total_46w7dr1w:avg(m("stats_connections_total"))
24702470
aggregate metric_stats_connections_total_46w7dr1w:sum(metric_stats_connections_total_46w7dr1w), group_by(hostname)
24712471
}
24722472
<- @A {}
@@ -2661,7 +2661,7 @@ resource "observe_dashboard" "redis_monitoring" {
26612661
"@A <- @\"keyspace_avg_ttl_from_GCP/Redis Metrics\" {",
26622662
" filter role = \"primary\"",
26632663
" join instance_pkey = @redis.instance_pkey",
2664-
" align frame(back: 2m), metric_keyspace_avg_ttl_7s5qqdnq:avg(m(\"keyspace_avg_ttl\"))",
2664+
" align 2m, metric_keyspace_avg_ttl_7s5qqdnq:avg(m(\"keyspace_avg_ttl\"))",
26652665
" aggregate metric_keyspace_avg_ttl_7s5qqdnq:sum(metric_keyspace_avg_ttl_7s5qqdnq), group_by(hostname)",
26662666
"}",
26672667
"<- @A {}",
@@ -2688,7 +2688,7 @@ resource "observe_dashboard" "redis_monitoring" {
26882688
@A <- @"keyspace_avg_ttl_from_GCP/Redis Metrics" {
26892689
filter role = "primary"
26902690
join instance_pkey = @redis.instance_pkey
2691-
align frame(back: 2m), metric_keyspace_avg_ttl_7s5qqdnq:avg(m("keyspace_avg_ttl"))
2691+
align 2m, metric_keyspace_avg_ttl_7s5qqdnq:avg(m("keyspace_avg_ttl"))
26922692
aggregate metric_keyspace_avg_ttl_7s5qqdnq:sum(metric_keyspace_avg_ttl_7s5qqdnq), group_by(hostname)
26932693
}
26942694
<- @A {}
@@ -2883,7 +2883,7 @@ resource "observe_dashboard" "redis_monitoring" {
28832883
"@A <- @\"stats_expired_keys_from_GCP/Redis Metrics\" {",
28842884
" filter role = \"primary\"",
28852885
" join instance_pkey = @redis.instance_pkey",
2886-
" align frame(back: 2m), metric_stats_expired_keys_wbhf0r7g:avg(m(\"stats_expired_keys\"))",
2886+
" align 2m, metric_stats_expired_keys_wbhf0r7g:avg(m(\"stats_expired_keys\"))",
28872887
" aggregate metric_stats_expired_keys_wbhf0r7g:sum(metric_stats_expired_keys_wbhf0r7g), group_by(hostname)",
28882888
"}",
28892889
"<- @A {}",
@@ -2910,7 +2910,7 @@ resource "observe_dashboard" "redis_monitoring" {
29102910
@A <- @"stats_expired_keys_from_GCP/Redis Metrics" {
29112911
filter role = "primary"
29122912
join instance_pkey = @redis.instance_pkey
2913-
align frame(back: 2m), metric_stats_expired_keys_wbhf0r7g:avg(m("stats_expired_keys"))
2913+
align 2m, metric_stats_expired_keys_wbhf0r7g:avg(m("stats_expired_keys"))
29142914
aggregate metric_stats_expired_keys_wbhf0r7g:sum(metric_stats_expired_keys_wbhf0r7g), group_by(hostname)
29152915
}
29162916
<- @A {}
@@ -3106,7 +3106,7 @@ resource "observe_dashboard" "redis_monitoring" {
31063106
"@A <- @\"stats_keyspace_hits_from_GCP/Redis Metrics\" {",
31073107
" filter role = \"primary\"",
31083108
" join instance_pkey = @redis.instance_pkey",
3109-
" align frame(back: 2m), metric_stats_keyspace_hits_zk0gg3ud:avg(m(\"stats_keyspace_hits\"))",
3109+
" align 2m, metric_stats_keyspace_hits_zk0gg3ud:avg(m(\"stats_keyspace_hits\"))",
31103110
" aggregate metric_stats_keyspace_hits_zk0gg3ud:sum(metric_stats_keyspace_hits_zk0gg3ud), group_by(hostname)",
31113111
"}",
31123112
"<- @A {}",
@@ -3133,7 +3133,7 @@ resource "observe_dashboard" "redis_monitoring" {
31333133
@A <- @"stats_keyspace_hits_from_GCP/Redis Metrics" {
31343134
filter role = "primary"
31353135
join instance_pkey = @redis.instance_pkey
3136-
align frame(back: 2m), metric_stats_keyspace_hits_zk0gg3ud:avg(m("stats_keyspace_hits"))
3136+
align 2m, metric_stats_keyspace_hits_zk0gg3ud:avg(m("stats_keyspace_hits"))
31373137
aggregate metric_stats_keyspace_hits_zk0gg3ud:sum(metric_stats_keyspace_hits_zk0gg3ud), group_by(hostname)
31383138
}
31393139
<- @A {}
@@ -3331,7 +3331,7 @@ resource "observe_dashboard" "redis_monitoring" {
33313331
"@A <- @\"stats_keyspace_misses_from_GCP/Redis Metrics\" {",
33323332
" filter role = \"primary\"",
33333333
" join instance_pkey = @redis.instance_pkey",
3334-
" align frame(back: 2m), metric_stats_keyspace_misses_85e379pl:avg(m(\"stats_keyspace_misses\"))",
3334+
" align 2m, metric_stats_keyspace_misses_85e379pl:avg(m(\"stats_keyspace_misses\"))",
33353335
" aggregate metric_stats_keyspace_misses_85e379pl:sum(metric_stats_keyspace_misses_85e379pl), group_by(instance_pkey)",
33363336
"}",
33373337
"<- @A {}",
@@ -3358,7 +3358,7 @@ resource "observe_dashboard" "redis_monitoring" {
33583358
@A <- @"stats_keyspace_misses_from_GCP/Redis Metrics" {
33593359
filter role = "primary"
33603360
join instance_pkey = @redis.instance_pkey
3361-
align frame(back: 2m), metric_stats_keyspace_misses_85e379pl:avg(m("stats_keyspace_misses"))
3361+
align 2m, metric_stats_keyspace_misses_85e379pl:avg(m("stats_keyspace_misses"))
33623362
aggregate metric_stats_keyspace_misses_85e379pl:sum(metric_stats_keyspace_misses_85e379pl), group_by(instance_pkey)
33633363
}
33643364
<- @A {}
@@ -3554,7 +3554,7 @@ resource "observe_dashboard" "redis_monitoring" {
35543554
"@A <- @\"keyspace_keys_with_expiration_from_GCP/Redis Metrics\" {",
35553555
" filter role = \"primary\"",
35563556
" join instance_pkey = @redis.instance_pkey",
3557-
" align frame(back: 2m), metric_keyspace_keys_with_expiration_ov8o9z71:avg(m(\"keyspace_keys_with_expiration\"))",
3557+
" align 2m, metric_keyspace_keys_with_expiration_ov8o9z71:avg(m(\"keyspace_keys_with_expiration\"))",
35583558
" aggregate metric_keyspace_keys_with_expiration_ov8o9z71:sum(metric_keyspace_keys_with_expiration_ov8o9z71), group_by(hostname)",
35593559
"}",
35603560
"<- @A {}",
@@ -3581,7 +3581,7 @@ resource "observe_dashboard" "redis_monitoring" {
35813581
@A <- @"keyspace_keys_with_expiration_from_GCP/Redis Metrics" {
35823582
filter role = "primary"
35833583
join instance_pkey = @redis.instance_pkey
3584-
align frame(back: 2m), metric_keyspace_keys_with_expiration_ov8o9z71:avg(m("keyspace_keys_with_expiration"))
3584+
align 2m, metric_keyspace_keys_with_expiration_ov8o9z71:avg(m("keyspace_keys_with_expiration"))
35853585
aggregate metric_keyspace_keys_with_expiration_ov8o9z71:sum(metric_keyspace_keys_with_expiration_ov8o9z71), group_by(hostname)
35863586
}
35873587
<- @A {}

0 commit comments

Comments
 (0)