API Health Monitoring

Not applicable

Hi, I have requirement for health check for one server. I can configure this step in Probe in Apigee APIHealth but have a requirement to update something in KVM value when I receive a 503 response back from the backend server. Is it possible to configure the next step using status code 503? (If I'm configuring with 503 status code then I always get notifications because it will always fail). Please advise. Thanks!

0 4 393
4 REPLIES 4

Hi @Swapna Why don't you update the KVM in Edge itself (via a KeyValueMap policy) when you receive a 503 from your backend? This can go in as part of your API proxy configuration. You could monitor this Proxy using API Test. Is there any specific reason you want to do it in API Test?

Thanks @sudheendra1. We are planning to put the logic in two ways. One is in Edge once we receive the 503 response back from target and another is through API Health Test. Because we would like to do health check for every 30secs and this is the easy way to do it and based on the KVM Value will route the traffic using RouteRule. If we want to do it in edge again need to concentrate on scheduling etc. Please advice.

Hi @Swapna I am not suggesting you implement the scheduling part in Edge. All I am suggesting is that you update KVM in Edge. It's easier with out of the box policies.

The flow would be similar to this :

Test <-> Apigee <->Backend

Test periodically (e.g. every 30 sec) calls an API deployed in Edge. Then Edge calls the backend. If Edge receive an error (say 503) from the backend, it updates the KVM on the response path. And then it returns the error back to Test. Based on the alert scheme (email or slack etc.). configured Test generates the alert.

Hope this clarification helps!

Yes, Thank you @sudheendra1