Examples of alerts Stay organized with collections Save and categorize content based on your preferences.
This pageapplies toApigee andApigee hybrid.
View Apigee Edge documentation.![]()
Apigee lets you create complex alerts based on multiple conditions.The following sections present examples of alerts:
Alert for no 200 response code for 5 minutes
The next example creates an alert when there is no 200 response code (successful request) for 5 minutes.
Note: This alert will be triggered if there no API traffic at all for 5 minutes, which might not be desirable. If so, considerusing a longer time interval during which you normally expect to see some traffic.To create the alert:
In the Google Cloud console, go to theMonitoring> Alerting> Policies page.
- ClickSelect a Metric.
- Deselect theActive button.
Note: If there is no recent API traffic data in your organization, the metric in the next step won't be displayed unless this option is unselected.
- Select a metric as follows:
- Copy and paste the following in theSelect a metric field:
Note: If you are using Apigee hybrid v1.10 or v1.11, use the following metric instead:apigee.googleapis.com/proxy/response_count
apigee.googleapis.com/proxyv2/response_count
- SelectApigee Proxy.
- In the pane that opens to the right, selectProxy.
- In the next pane to the right, selectApigee proxy response count.
- ClickApply.
- Copy and paste the following in theSelect a metric field:
- Add a filter for the response code as follows:
- ClickAdd filter.
- Click in theFilter field and selectresponse_code from the drop-down menu.
- In theComparator, select=.
- In theValue field, type200.
- ClickApply.
Configure the alert trigger
To configure the event that triggers the alert, first clickConfigure trigger in the left-hand pane. Then do the following steps:
- UnderCondition type, selectMetric absence.
- In theAlert trigger field, selectAny time series violates.
- In theMetric absence time field, select5 min.
- Optionally, in theCondition name field, enter a name for the condition.
With these settings, an alert will be triggered when the proxy does notreceive a 200 response code for 5 minutes.
ClickNext to open theConfigure notifications and finalize alert pane.
Set up a notification for the alert
In theConfigure notifications and finalize alert pane, you canset up a notification that will be sent when an alert is triggered. To do so:
Click in theNotification Channels field. If you have already created a channel for the notification, such as an email address or SMS number, you can select it underNotification Channels.
Otherwise, you need to add a channel by selectingManage Notification Channels. This opens theNotification channels pane, where you can add one or more channels. SeeManage notification channels for more information. When you are done, return to theConfigure notifications and finalize alert pane.
Note: You may need to click the refresh button next toManage Notification Channels to display a new channel after you create it.Once you have selected one or more notification channels, clickOK.
- In theDocumentation field, you can add a message that will be sent with the notification. For example, the message might describe the reason for the alert, and contain links to documentation explaining how to respond to it.
- ClickNext to review the details of the alert. If you are satisfied with them, clickCreate Policy to create the alerting policy.
Traffic spike alert
The following sections show how to create an alert that istriggered when the number of API requests over a 1 minute period exceeds 3600.
To create the alert:
In the Google Cloud console, go to theMonitoring> Alerting> Policies page.
- ClickSelect a Metric.
- Deselect theActive button.
Note: If there is no recent API traffic data in your organization, the metric in the next step won't be displayed unless this option is unselected.
- Select a metric as follows:
- Copy and paste the following in theSelect a metric field:
Note: If you are using Apigee hybrid v1.10 or v1.11, use the following metric instead:apigee.googleapis.com/proxy/request_count
apigee.googleapis.com/proxyv2/request_count
- SelectApigee Proxy.
- In the pane that opens to the right, selectProxy.
- In the next pane to the right, selectApigee proxy request count.
- ClickApply.
- Copy and paste the following in theSelect a metric field:
- In theTransform data pane:
- UnderWithin each time series:
- In theRolling window field, select1 min.
- In theRolling window function, selectrate.
- UnderAcross time series, underTime series aggregation, selectsum.
- UnderWithin each time series:
Configure the alert trigger
To configure the event that triggers the alert, first clickConfigure trigger in theleft-hand pane. Then do the following steps:
- UnderCondition type, selectThreshold.
- In theAlert trigger field, selectAny time series violates.
- In theThreshold position field, selectAbove threshold.
- In theThreshold value field, enter60.
The reason you setThreshold value to 60 (rather than 3600) is that theunits ofThreshold value are per second. So if this threshold ismaintained for 1 minute, there will be at least 3600 requests in that timeperiod.
With these settings, an alert will be triggeredwhen the total number of requests over a 1 minute period exceeds 3600.
ClickNext to open theConfigure notifications and finalize alert paneand following the steps inSet up a notification for the alert.
Latency alert
The following examples show how to create an alert that istriggered when the 95th percentile of the average latencies in the responses, over 10 minute intervals, is greater than 600 ms.
- Create the alert using Apigee or Apigee hybrid v1.12
- Create the alert using Apigee hybrid v1.10 or v1.11
Create the alert using Apigee or Apigee hybrid v1.12
To create the alert using Apigee:
In the Google Cloud console, go to theMonitoring> Alerting> Policies page.
- ClickSelect a Metric.
- Deselect theActive button.
Note: If there is no recent API traffic data in your organization, the metric in the next step won't be displayed unless this option is unselected.
- Select a metric as follows:
- Copy and paste the following in theSelect a metric field:
apigee.googleapis.com/proxy/latencies
- SelectApigee Proxy.
- In the pane that opens to the right, selectProxy.
- In the next pane to the right, selectApigee proxy latencies.
- ClickApply.
- Copy and paste the following in theSelect a metric field:
- In theTransform data pane, underWithin each time series:
- In theRolling window field, select10 min.
- In theRolling window function field, enter95th percentile.
SeeCreate the alert trigger toconfigure the event that triggers the alert.
Create the alert using Apigee hybrid v1.10 or v1.11
To create the alert using Apigee hybrid v1.10 or v1.11:
In the Google Cloud console, go to theMonitoring> Alerting> Policies page.
- ClickSelect a Metric.
- Deselect theActive button.
Note: If there is no recent API traffic data in your organization, the metric in the next step won't be displayed unless this option is unselected.
- Select a metric as follows:
- Copy and paste the following in theSelect a metric field:
apigee.googleapis.com/proxyv2/latencies_percentile
- SelectApigee proxy (v2).
- In the pane that opens to the right, selectProxyv2.
- In the next pane to the right, selectPercentile of Apigee proxy response latencies.
- ClickApply.
- Copy and paste the following in theSelect a metric field:
Add a filter as follows:
- ClickAdd a Filter.
- Click in theFilter field and selectpercentile from the drop-down menu.
- In theComparator, select=.
- In theValue field, type95.
- ClickApply.
- In theTransform data pane, underWithin each time series:
- In theRolling window field, select10 min.
- In theRolling window function field, entermean.
SeeCreate the alert trigger toconfigure the event that triggers the alert.
Configure the alert trigger
To configure the event that triggers the alert, first clickConfigure trigger in theleft-hand pane. Then do the following steps:
- UnderCondition type, selectThreshold.
- In theAlert trigger field, selectAny time series violates.
- In theThreshold position field, selectAbove threshold.
- In theThreshold value field, enter600.
With these settings,an alert will be triggered when the 95th percentile of the latenciesis above the threshold of 600 ms.
ClickNext to open theConfigure notifications and finalize alert paneand following the steps inSet up a notification for the alert.
When you receive a notification and click theView In Apigee buttonin the notification email,theInvestigate dashboardwill display a latency graph with the threshold, similar to the example shown:
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-18 UTC.