If you choose not to use the new UI when adding or editing conditions in an alerting policy, you reach the current Select condition type page. This page lists the following choices:
Basic policy types:
- Metric threshold
- Metric absence
Advanced policy types:
- Metric rate of change
- Group-aggregate threshold
Basic health: Uptime-check health
- Advanced health: Process health
Select the type of condition you want to create. These types correspond to the those described in Types of conditions.
This will bring up the condition-configuration page. If you are editing an existing condition, the page is populated. If you adding a new condition, some defaults may have been chosen, based on the type of condition you selected.
The condition-configuration page consists of two regions:
Target, where you specify a metric in a condition you want the policy to monitor. This region is exactly the same for most of the available conditions.
Configuration, where you specify what must happen for the condition to be met. This region varies based on the class of condition you selected. The interface describes the choices in terms of the class of condition.
Although each of these choices, except the metric-absence condition, is a type of metric-threshold condition, the Configuration areas look different.
Below are samples of each type of condition you can select.
When you have described the condition, click the Save Condition button. This takes you back to the Add (or Edit) Alerting Policy page, from which you can:
- Add additional conditions.
- Specify notification channels.
- Add documentation to the policy.
- Name the policy.
A metric absence condition triggers if a time series is unavailable (has no data) for a specific duration window.
Example: A metric absence condition that triggers if the "daily sales" custom metric is absent for 30 consecutive minutes:
See Types of conditions for more information on metric absence conditions.
A metric threshold condition triggers if a metric rises above or falls below a value for a specific duration window.
Example: A metric threshold condition that triggers if any process is blocked for more than 10 minutes:
With the exception of metric absence, all the other condition types are variants on a simple metric threshold condition.
Metric rate of change
A metric rate (percent) of change condition triggers if a metric increases or decreases by at least a specific percent during a duration window.
Example: A metric value that increases by 30% in a single hour:
The condition in this example averages the ten minute period that started 1 hour and 10 minutes ago, and compares it to the average from the period that started 10 minutes ago. If the latter increased by more than 30%, the policy is triggered.
See Types of conditions for more information on rate-of-change conditions.
This metric threshold condition triggers if a metric measured across a resource group exceeds a threshold for a specific duration window.
Example: The CPU utilization exceeds an average of 30 percent across the “GKE cluster” group for 5 minutes:
Uptime check health
An uptime check health condition monitors an uptime check that you've created in your account.
Example: A condition that monitors an uptime check named "lamp intro Uptime check" (which checks a specific URL on a recurring basis):
A process health condition triggers if the number of processes that match a specific pattern falls above or below a threshold during a duration window.
Example: A condition that triggers if the number of processes that you use to push notifications to your customers in your instance group falls to zero: