How to Set up alerts and notifications in Apigee

unrecognizable black woman messaging on phone at cafe
Reading Time: 3 minutes

Hello Readers! I hope you all are doing well. So In this blog we’ll see how we can set up alerts and notifications in Apigee. Firstly we’ll see the introduction to alerts and notifications and then we’ll follow steps to set up them in apigee for spikes, latency performance and many more.

So, let’s get started !!!

Introduction

To track an unusual events or patterns such as spikes in traffic or latencies set up alerts, which are triggered when a specified event occurs.An actual event that triggers an alert is called an incident.

Notification is set up when a particular alert is trigerred. THere are two types of alerts we use for API Monitoring:

  • Log based alerts
  • Metric based alerts 

NOTE: For the log based alerts as they are based on api data stored by cloud logging so will be accessing them afterwards.

Configuring Metric Based Alerts:

These alerts are triggered by changing in API Metrics . Example: alert for response code 500 on a proxy. Follow the below steps to create metric based alerts:

STEP-1 Open the Create alerting policy page in the Google Cloud console.

STEP-2 Select a metric 

STEP-3 Deselect Show only active resources & metrics

STEP-4 Select a metric as follows:

  • Copy and paste the following in the Select metric field:
apigee.googleapis.com/proxyV2/response_count
  • Select APigee Proxy (v2)
  • In the pane that opens to the right, select Proxyv2
  • Then, Apigee proxy response cumulative count in the next pane
  • Click Apply

STEP-5 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 500.
  • Click Done.

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

With these settings, an alert will be triggered whenever a response with code 500 is returned.

Click Next to open the Configure notifications and finalize alert pane.

Set up a notification for the alert

  • 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. 
  • 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. 
  • Click Next to review the details of the alert. If you are satisfied with them, click Create Policy to create the alerting policy.
  • IN the above image you can see your alert policy is created but it will only trigger an alert when incident is open .

Conclusion

So, we have seen how we can set up alerts and notifications in apigee. I hope you have learned something new and useful to you in context of setting up alerts for various apigee latency performance and spikes. If you have any query feel free to ask me.

Thank You !!!

Happy Learning!!!

Reference

For more information about alerts and notifications Click.

Written by 

Deeksha Tripathi is a Software Consultant at Knoldus Inc Software. She has a keen interest toward learning new technologies. Her practice area is DevOps. When not working, she will be busy in listening music , and spending time with her family .

Discover more from Knoldus Blogs

Subscribe now to keep reading and get access to the full archive.

Continue reading