mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-07-01 07:42:40 +00:00
upgrade monitoring tests to 0.12 syntax (#2754)
<!-- This change is generated by MagicModules. --> /cc @chrisst
This commit is contained in:
parent
e55e6a403f
commit
4a706f7225
|
@ -120,24 +120,20 @@ resource "google_monitoring_alert_policy" "basic" {
|
|||
enabled = true
|
||||
combiner = "OR"
|
||||
|
||||
conditions = [
|
||||
{
|
||||
display_name = "%s"
|
||||
conditions {
|
||||
display_name = "%s"
|
||||
|
||||
condition_threshold = {
|
||||
aggregations = [
|
||||
{
|
||||
alignment_period = "60s"
|
||||
per_series_aligner = "%s"
|
||||
},
|
||||
]
|
||||
|
||||
duration = "60s"
|
||||
comparison = "COMPARISON_GT"
|
||||
filter = "%s"
|
||||
condition_threshold {
|
||||
aggregations {
|
||||
alignment_period = "60s"
|
||||
per_series_aligner = "%s"
|
||||
}
|
||||
},
|
||||
]
|
||||
|
||||
duration = "60s"
|
||||
comparison = "COMPARISON_GT"
|
||||
filter = "%s"
|
||||
}
|
||||
}
|
||||
}
|
||||
`, alertName, conditionName, aligner, filter)
|
||||
}
|
||||
|
@ -149,66 +145,61 @@ resource "google_monitoring_alert_policy" "full" {
|
|||
combiner = "OR"
|
||||
enabled = true
|
||||
|
||||
conditions = [
|
||||
{
|
||||
display_name = "%s"
|
||||
conditions {
|
||||
display_name = "%s"
|
||||
|
||||
condition_threshold = {
|
||||
threshold_value = 50
|
||||
condition_threshold {
|
||||
threshold_value = 50
|
||||
filter = "metric.type=\"compute.googleapis.com/instance/disk/write_bytes_count\" AND resource.type=\"gce_instance\""
|
||||
duration = "60s"
|
||||
comparison = "COMPARISON_GT"
|
||||
|
||||
aggregations = [
|
||||
{
|
||||
alignment_period = "60s"
|
||||
per_series_aligner = "ALIGN_RATE"
|
||||
cross_series_reducer = "REDUCE_MEAN"
|
||||
aggregations {
|
||||
alignment_period = "60s"
|
||||
per_series_aligner = "ALIGN_RATE"
|
||||
cross_series_reducer = "REDUCE_MEAN"
|
||||
|
||||
group_by_fields = [
|
||||
"metric.label.device_name",
|
||||
"project",
|
||||
"resource.label.instance_id",
|
||||
"resource.label.zone",
|
||||
]
|
||||
},
|
||||
group_by_fields = [
|
||||
"metric.label.device_name",
|
||||
"project",
|
||||
"resource.label.instance_id",
|
||||
"resource.label.zone",
|
||||
]
|
||||
|
||||
duration = "60s"
|
||||
comparison = "COMPARISON_GT"
|
||||
|
||||
trigger = {
|
||||
percent = 10
|
||||
}
|
||||
|
||||
filter = "metric.type=\"compute.googleapis.com/instance/disk/write_bytes_count\" AND resource.type=\"gce_instance\""
|
||||
}
|
||||
},
|
||||
{
|
||||
condition_absent {
|
||||
duration = "3600s"
|
||||
filter = "metric.type=\"compute.googleapis.com/instance/cpu/utilization\" AND resource.type=\"gce_instance\""
|
||||
|
||||
aggregations {
|
||||
alignment_period = "60s"
|
||||
cross_series_reducer = "REDUCE_MEAN"
|
||||
per_series_aligner = "ALIGN_MEAN"
|
||||
|
||||
group_by_fields = [
|
||||
"project",
|
||||
"resource.label.instance_id",
|
||||
"resource.label.zone",
|
||||
]
|
||||
}
|
||||
|
||||
trigger {
|
||||
count = 1
|
||||
}
|
||||
}
|
||||
|
||||
display_name = "%s"
|
||||
},
|
||||
]
|
||||
trigger {
|
||||
percent = 10
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
conditions {
|
||||
display_name = "%s"
|
||||
|
||||
condition_absent {
|
||||
duration = "3600s"
|
||||
filter = "metric.type=\"compute.googleapis.com/instance/cpu/utilization\" AND resource.type=\"gce_instance\""
|
||||
|
||||
aggregations {
|
||||
alignment_period = "60s"
|
||||
cross_series_reducer = "REDUCE_MEAN"
|
||||
per_series_aligner = "ALIGN_MEAN"
|
||||
|
||||
group_by_fields = [
|
||||
"project",
|
||||
"resource.label.instance_id",
|
||||
"resource.label.zone",
|
||||
]
|
||||
}
|
||||
|
||||
trigger {
|
||||
count = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
documentation {
|
||||
content = "test content"
|
||||
content = "test content"
|
||||
mime_type = "text/markdown"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ resource "google_monitoring_uptime_check_config" "http" {
|
|||
display_name = "http-uptime-check-%s"
|
||||
timeout = "60s"
|
||||
|
||||
http_check = {
|
||||
http_check {
|
||||
path = "/some-path"
|
||||
port = "8010"
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ resource "google_monitoring_uptime_check_config" "http" {
|
|||
}
|
||||
}
|
||||
|
||||
content_matchers = {
|
||||
content_matchers {
|
||||
content = "example"
|
||||
}
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ resource "google_monitoring_uptime_check_config" "tcp_group" {
|
|||
display_name = "tcp-uptime-check-%s"
|
||||
timeout = "60s"
|
||||
|
||||
tcp_check = {
|
||||
tcp_check {
|
||||
port = 888
|
||||
}
|
||||
|
||||
|
|
|
@ -45,10 +45,10 @@ resource "google_monitoring_uptime_check_config" "http" {
|
|||
display_name = "http-uptime-check-%s"
|
||||
timeout = "60s"
|
||||
|
||||
http_check = {
|
||||
http_check {
|
||||
path = "/%s"
|
||||
port = "8010"
|
||||
auth_info = {
|
||||
auth_info {
|
||||
username = "name"
|
||||
password = "%s"
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ resource "google_monitoring_uptime_check_config" "http" {
|
|||
}
|
||||
}
|
||||
|
||||
content_matchers = {
|
||||
content_matchers {
|
||||
content = "example"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ resource "google_monitoring_uptime_check_config" "http" {
|
|||
display_name = "http-uptime-check"
|
||||
timeout = "60s"
|
||||
|
||||
http_check = {
|
||||
http_check {
|
||||
path = "/some-path"
|
||||
port = "8010"
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ resource "google_monitoring_uptime_check_config" "http" {
|
|||
}
|
||||
}
|
||||
|
||||
content_matchers = {
|
||||
content_matchers {
|
||||
content = "example"
|
||||
}
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ resource "google_monitoring_uptime_check_config" "tcp_group" {
|
|||
display_name = "tcp-uptime-check"
|
||||
timeout = "60s"
|
||||
|
||||
tcp_check = {
|
||||
tcp_check {
|
||||
port = 888
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user