Examples of alerts

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:

  1. In the Google Cloud console, go to theMonitoring> Alerting> Policies page.

    Go to Create alerting policy

  2. ClickSelect a Metric.
  3. 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.

  4. Select a metric as follows:
    1. Copy and paste the following in theSelect a metric field:
      apigee.googleapis.com/proxy/response_count
      Note: If you are using Apigee hybrid v1.10 or v1.11, use the following metric instead:
      apigee.googleapis.com/proxyv2/response_count
    2. SelectApigee Proxy.
    3. In the pane that opens to the right, selectProxy.
    4. In the next pane to the right, selectApigee proxy response count.
    5. ClickApply.
  5. Add a filter for the response code as follows:
    1. ClickAdd filter.
    2. Click in theFilter field and selectresponse_code from the drop-down menu.
    3. In theComparator, select=.
    4. In theValue field, type200.
    5. 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:

  1. UnderCondition type, selectMetric absence.
  2. In theAlert trigger field, selectAny time series violates.
  3. In theMetric absence time field, select5 min.
  4. 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:

  1. 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.

  2. 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.
  3. 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:

  1. In the Google Cloud console, go to theMonitoring> Alerting> Policies page.

    Go to Create alerting policy

  2. ClickSelect a Metric.
  3. 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.

  4. Select a metric as follows:
    1. Copy and paste the following in theSelect a metric field:
      apigee.googleapis.com/proxy/request_count
      Note: If you are using Apigee hybrid v1.10 or v1.11, use the following metric instead:
      apigee.googleapis.com/proxyv2/request_count
    2. SelectApigee Proxy.
    3. In the pane that opens to the right, selectProxy.
    4. In the next pane to the right, selectApigee proxy request count.
    5. ClickApply.
  5. 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.

Configure the alert trigger

To configure the event that triggers the alert, first clickConfigure trigger in theleft-hand pane. Then do the following steps:

  1. UnderCondition type, selectThreshold.
  2. In theAlert trigger field, selectAny time series violates.
  3. In theThreshold position field, selectAbove threshold.
  4. 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

To create the alert using Apigee:

  1. In the Google Cloud console, go to theMonitoring> Alerting> Policies page.

    Go to Create alerting policy

  2. ClickSelect a Metric.
  3. 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.

  4. Select a metric as follows:
    1. Copy and paste the following in theSelect a metric field:
      apigee.googleapis.com/proxy/latencies
    2. SelectApigee Proxy.
    3. In the pane that opens to the right, selectProxy.
    4. In the next pane to the right, selectApigee proxy latencies.
    5. ClickApply.
  5. 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:

  1. In the Google Cloud console, go to theMonitoring> Alerting> Policies page.

    Go to Create alerting policy

  2. ClickSelect a Metric.
  3. 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.

  4. Select a metric as follows:
    1. Copy and paste the following in theSelect a metric field:
      apigee.googleapis.com/proxyv2/latencies_percentile
    2. SelectApigee proxy (v2).
    3. In the pane that opens to the right, selectProxyv2.
    4. In the next pane to the right, selectPercentile of Apigee proxy response latencies.
    5. ClickApply.
  5. Add a filter as follows:

    1. ClickAdd a Filter.
    2. Click in theFilter field and selectpercentile from the drop-down menu.
    3. In theComparator, select=.
    4. In theValue field, type95.
    5. ClickApply.
  6. 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:

  1. UnderCondition type, selectThreshold.
  2. In theAlert trigger field, selectAny time series violates.
  3. In theThreshold position field, selectAbove threshold.
  4. 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:Select a metric.

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.