diff --git a/alerts/google-gce/reservation-utilization-too-high.v1.json b/alerts/google-gce/reservation-utilization-too-high.v1.json index 7655ddbf05..522893c045 100644 --- a/alerts/google-gce/reservation-utilization-too-high.v1.json +++ b/alerts/google-gce/reservation-utilization-too-high.v1.json @@ -1,21 +1,25 @@ { - "displayName": "Reservation - High Utilization", - "userLabels": {}, - "conditions": [ - { - "displayName": "High Reservation Utilization", - "conditionMonitoringQueryLanguage": { - "duration": "0s", - "query": "fetch compute.googleapis.com/Reservation\n|\n{ metric 'compute.googleapis.com/reservation/used'\n| align next_older(5m) | every 5m ;\nmetric 'compute.googleapis.com/reservation/reserved'\n| align next_older(5m) | every 5m\n}\n| ratio\n| condition val() >= 0.9", - "trigger": { - "count": 1 - } - } + "displayName": "Reservation - High Utilization", + "userLabels": {}, + "conditions": [ + { + "displayName": "High Reservation Utilization", + "conditionPrometheusQueryLanguage": { + "duration": "300s", + "evaluationInterval": "60s", + "query": "(\n {\"compute.googleapis.com/reservation/used\", monitored_resource=\"compute.googleapis.com/Reservation\"}\n / on (reservation_id)\n {\"compute.googleapis.com/reservation/reserved\", monitored_resource=\"compute.googleapis.com/Reservation\"}\n) >= 0.9" } - ], - "alertStrategy": { - "autoClose": "604800s" - }, - "combiner": "OR", - "enabled": true - } \ No newline at end of file + } + ], + "alertStrategy": { + "autoClose": "604800s", + "notificationPrompts": [ + "OPENED", + "CLOSED" + ] + }, + "combiner": "OR", + "enabled": true, + "notificationChannels": [], + "severity": "SEVERITY_UNSPECIFIED" +} \ No newline at end of file diff --git a/alerts/google-gce/reservation-utilization-too-low.v1.json b/alerts/google-gce/reservation-utilization-too-low.v1.json index 85bcb4a9aa..6e1924baa2 100644 --- a/alerts/google-gce/reservation-utilization-too-low.v1.json +++ b/alerts/google-gce/reservation-utilization-too-low.v1.json @@ -1,21 +1,25 @@ { - "displayName": "Reservation - Low Utilization", - "userLabels": {}, - "conditions": [ - { - "displayName": "Low Usage for 20 hours out of 23 hours", - "conditionMonitoringQueryLanguage": { - "duration": "0s", - "query": "fetch compute.googleapis.com/Reservation\n|\n{ metric 'compute.googleapis.com/reservation/used'\n| align next_older(5m) | every 5m ;\nmetric 'compute.googleapis.com/reservation/reserved'\n| align next_older(5m) | every 5m\n}\n| ratio\n| value val() <= 0.1\n| count_true_aligner(23h)\n| condition val() > 20 * 12 # 20 hours * (12 5 min intervals in hour)", - "trigger": { - "count": 1 - } - } + "displayName": "Reservation - Low Utilization", + "userLabels": {}, + "conditions": [ + { + "displayName": "Low Usage for 20 hours out of 23 hours", + "conditionPrometheusQueryLanguage": { + "duration": "0s", + "evaluationInterval": "300s", + "query": "count_over_time(\n (\n ({\"compute.googleapis.com/reservation/used\", monitored_resource=\"compute.googleapis.com/Reservation\"}\n / on (reservation_id)\n {\"compute.googleapis.com/reservation/reserved\", monitored_resource=\"compute.googleapis.com/Reservation\"}\n ) <= 0.1\n )[23h:5m]\n) > (20 * 12) # 20 hours * (12 5 min intervals in hour)" } - ], - "alertStrategy": { - "autoClose": "604800s" - }, - "combiner": "OR", - "enabled": true - } \ No newline at end of file + } + ], + "alertStrategy": { + "autoClose": "604800s", + "notificationPrompts": [ + "OPENED", + "CLOSED" + ] + }, + "combiner": "OR", + "enabled": true, + "notificationChannels": [], + "severity": "SEVERITY_UNSPECIFIED" +} \ No newline at end of file