NashTech Blog

Table of Contents
ai generated, office, desk-8428726.jpg

Hello Readers!!! In this blog we’ll see How we can create Infra alerts for Unhealthy Loadbalancer – VM Instance Down Alerts. Monitoring the health of your load balancer and setting up alerts for unhealthy instances is crucial to ensure the reliability and availability of your Apigee X deployment on GCP.

Overview

Infra Alerts in API Management plays a very vital role as your working instance is down or stopped due to some reasons. Effective monitoring of your Apigee infrastructure is crucial to maintaining a reliable system. This guide outlines the step-by-step process to create an alerting policy for detecting unhealthy load balancer VM Instances Down in Apigee. This ensures timely detection and response to potential issues, preventing service disruptions.

Steps For Creating Infra Alerts for Unhealthy Load Balancer – VM Instance Down

To create an infra alerts for Unhealthy Loadbalancer – VM Instance Down follow the below steps:

Configuring Metric Based Alerts:

Step-1 These alerts are triggered by changing in API Metrics. Open the Create alerting policy page in the Google Cloud console.

STEP-2 Select a metric 

STEP-3 Deselect Show only active resources & metric.

STEP-4 Select a metric as follows:

  • Copy and paste the following in the Select metric field:
apigee.googleapis.com/Instance Group/instance_group/Instance group size
  • Select Instance Group
  • In the pane that opens to the right, select instance_group
  • Then, Instance Group Size in the next pane
  • Click Apply

STEP-5 Add a filter for the particular proxy you want to monitor as follows:

  • Click Add Filter
  • Click in the Filter field and select instance_group_name from the drop-down menu.
  • In the Comparator, select =
  • In the Value field, type instance_group_name
  • Click Done.

You can use any filter you have in the filtering list to add filter for monitoring as:

Above image shows you the filter list.

  • After clicking on Next, you have to choose the data for Configure Alert Trigger as below:

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 Below threshold.
  • In the Threshold Value field set value as 2 or the number of instance you have according to that.
  • In the Condition Name field, enter Instance Down for VM (name_of_VM)

Add Multi trigger condition for your org for all VMs as below:

With these settings, an alert will be triggered whenever a memory used metric is absent for over 5 mins.

  • Click Next to open the Configure notifications and finalise 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. 
  • To add notification channel Click on Manage Notification Channels as shown below :
  • Again when you click on Next a page will appear like this:

  • 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.
  • As created Multi trigger Alerting Policy so I have added all three VM instances in one as below:

In the above image you can see your alert policy is created but it will only trigger an alert when incident is open .

  • Now to Add the notification channel click on MANAGE NOTIFICATION CHANNELS as shown.

  • A page will appear like the below image:

  • Click on ADD NEW to add the notification Channel like I have added for Email Notification below:

  • when you click on ADD NEW a box will open like above and in that you have to give the Email Address and Display Name for your notification channel. Once you will click SAVE notification channel will be added like this:

Below is the image shows you the Notification Channel type and the Channel Display Name.

  • This is how we can create infra alerts for Unhealthy Loadbalancer.

CONCLUSION

So, in this blog we have seen how we can create infra alerts for Unhealthy Loadbalancer – VM Instance Down Alerts. Implementing an alerting policy for detecting unhealthy load balancer instances with a threshold value of 2 of instance group size ensures proactive identification of potential issues. This strategy enables you to address problems promptly, minimising the impact on your Apigee infrastructure’s availability and performance.

Picture of Deeksha Tripathi

Deeksha Tripathi

Deeksha Tripathi is a Software Consultant working for Knoldus which is a Part Of Nashtech. She is interested in playing with new technologies and her area of expertise is in DevOps, which involves the integration and automation of software development and IT operations.She is motivated towards her goals and also interested in learning.

Leave a Comment

Your email address will not be published. Required fields are marked *

Suggested Article

Scroll to Top