I set up email alert when there is backend server down. Back-end servers are configured in loadbalancer (https://docs.apigee.com/api-platform/deploy/load-balancing-across-backend-servers) using HealthMonitor API but there is no email alert. Anyone knows the reason? Thanks
Loadbalancer:
<HTTPTargetConnection> <LoadBalancer> <Server name="target1"/> <Server name="target2"> <IsFallback>true</IsFallback> </Server> <MaxFailures>2</MaxFailures> </LoadBalancer> <Path>/json</Path> <HealthMonitor> <IsEnabled>true</IsEnabled> <IntervalInSec>3</IntervalInSec> <HTTPMonitor> <Request> <ConnectTimeoutInSec>10</ConnectTimeoutInSec> <SocketReadTimeoutInSec>30</SocketReadTimeoutInSec> <Verb>GET</Verb> <Path>/json</Path> </Request> <SuccessResponse> <ResponseCode>200</ResponseCode> </SuccessResponse> </HTTPMonitor> </HealthMonitor> </HTTPTargetConnection>
I use API Monitoring to set up alert and use fault code (https://docs.apigee.com/api-monitoring/alerts-notifications):
Target errors, no active targets
UI: Gateway > Target > Gateway TargetServerConfiguredInLoadBalancersIsDown
Please see the attached picture
What exactly did you do to bring the backend server down for testing?
I see you have two servers configured in your load balancer - did you take them both offline, or just one? I suspect you're going to need to take both offline to get this to fire although I haven't tested it myself.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |