Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 23 additions & 19 deletions alerts/google-gce/reservation-utilization-too-high.v1.json
Original file line number Diff line number Diff line change
@@ -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
}
}
],
"alertStrategy": {
"autoClose": "604800s",
"notificationPrompts": [
"OPENED",
"CLOSED"
]
},
"combiner": "OR",
"enabled": true,
"notificationChannels": [],
"severity": "SEVERITY_UNSPECIFIED"
}
42 changes: 23 additions & 19 deletions alerts/google-gce/reservation-utilization-too-low.v1.json
Original file line number Diff line number Diff line change
@@ -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)"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks right to me but I'd like joshuapollock@ to take a look

}
],
"alertStrategy": {
"autoClose": "604800s"
},
"combiner": "OR",
"enabled": true
}
}
],
"alertStrategy": {
"autoClose": "604800s",
"notificationPrompts": [
"OPENED",
"CLOSED"
]
},
"combiner": "OR",
"enabled": true,
"notificationChannels": [],
"severity": "SEVERITY_UNSPECIFIED"
}