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 the Select a metric field:
apigee.googleapis.com/proxy/response_count
Select Apigee Proxy.
In the pane that opens to the right, select Proxy.
In the next pane to the right, select Apigee proxy response count.
Click Apply.
Add a filter for the response code as follows:
Click Add filter.
Click in the Filter field and select response_code from the drop-down menu.
In the Comparator, select =.
In the Value field, type 200.
Click Apply.
Configure the alert trigger
To configure the event that triggers the alert, first click Configure trigger in the left-hand pane. Then do the following steps:
Under Condition type, select Metric absence.
In the Alert trigger field, select Any time series violates.
In the Metric absence time field, select 5 min.
Optionally, in the Condition name field, enter a name for the condition.
With these settings, an alert will be triggered when the proxy does not receive a 200 response code for 5 minutes.
Click Next to open the Configure notifications and finalize alert pane.
Set up a notification for the alert
In the Configure notifications and finalize alert pane, you can set up a notification that will be sent when an alert is triggered. To do so:
Click in the Notification Channels field. If you have already created a channel for the notification, such as an email address or SMS number, you can select it under Notification Channels.
Otherwise, you need to add a channel by selecting Manage Notification Channels. This opens the Notification channels pane, where you can add one or more channels. See Manage notification channels for more information. When you are done, return to the Configure notifications and finalize alert pane.
Note: You may need to click the refresh button next to Manage Notification Channels to display a new channel after you create it.
Once you have selected one or more notification channels, click OK.
In the Documentation 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.
Click Next to review the details of the alert. If you are satisfied with them, click Create Policy to create the alerting policy.
Traffic spike alert
The following sections show how to create an alert that is triggered when the number of API requests over a 1 minute period exceeds 3600.
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 the Select a metric field:
apigee.googleapis.com/proxy/request_count
Select Apigee Proxy.
In the pane that opens to the right, select Proxy.
In the next pane to the right, select Apigee proxy request count.
Click Apply.
In the Transform data pane:
Under Within each time series:
In the Rolling window field, select 1 min.
In the Rolling window function, select rate.
Under Across time series, under Time series aggregation, select sum.
Configure the alert trigger
To configure the event that triggers the alert, first click Configure trigger in the left-hand pane. Then do the following steps:
Under Condition type, select Threshold.
In the Alert trigger field, select Any time series violates.
In the Threshold position field, select Above threshold.
In the Threshold value field, enter 60.
The reason you set Threshold value to 60 (rather than 3600) is that the units of Threshold value are per second. So if this threshold is maintained for 1 minute, there will be at least 3600 requests in that time period.
With these settings, an alert will be triggered when the total number of requests over a 1 minute period exceeds 3600.
The following examples show how to create an alert that is triggered when the 95th percentile of the average latencies in the responses, over 10 minute intervals, is greater than 600 ms.
When you receive a notification and click the View In Apigee button in the notification email, the Investigate dashboard will display a latency graph with the threshold, similar to the example shown:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-24 UTC."],[[["This guide provides instructions for creating alerts in Apigee and Apigee hybrid, based on specific conditions such as response codes, traffic volume, and latency."],["You can configure an alert to trigger when no 200 response code is received for five minutes, which may occur even with no API traffic, so longer time intervals may be more effective."],["An alert can be set up to monitor for traffic spikes, such as when the number of API requests exceeds 3600 within a one-minute period, which is calculated based on a threshold value per second."],["The creation of a latency alert can be configured to trigger when the 95th percentile of average latencies surpasses 600 ms over 10-minute intervals, with slightly different metric configurations for different Apigee versions."],["Alerts, once triggered, can be configured to send notifications to designated channels and include relevant documentation to facilitate a prompt response."]]],[]]