Notification

Not applicable

Hi,

I am running a private instance of apigee in my organization. I have set up io timeout and connect timeouts in my target and custom fault handlers for 5xx responses.Is it possible to set up an alert system to notify appropriate teams whenever these faults were triggered in the workflow while attempting to work with their target servers ?

My thoughts

Today, the only option that comes to my mind is to either poll the Postgres facts and for every occurrence on response status between the criteria, we could create a simple application that would send out an email based on the record information to the appropriate team based on basepath match and response code match.

Our partners recently encountered few issues in these and I would like to put a proactive alert system in place to address these before a lot of such failures.

Solved Solved
1 6 184
1 ACCEPTED SOLUTION

@Srivatssan Srinivasan , If your application can expose a rest api which will trigger the email, You can implement a simple service callout which will call above API on error flow in case of 5xx responses.

In Apigee Edge error flow, You can actually avoid multiple emails incase of frequent 5xx without using a different system. Just, Set a value in cache using cache policies if you see the 5xx first time & use that value retrieved using cache policies not to trigger service callout for a while.

Hope it helps. Keep us posted moving forward if any.

View solution in original post

6 REPLIES 6

@Srivatssan Srinivasan , If your application can expose a rest api which will trigger the email, You can implement a simple service callout which will call above API on error flow in case of 5xx responses.

In Apigee Edge error flow, You can actually avoid multiple emails incase of frequent 5xx without using a different system. Just, Set a value in cache using cache policies if you see the 5xx first time & use that value retrieved using cache policies not to trigger service callout for a while.

Hope it helps. Keep us posted moving forward if any.

@Anil Sagar - I learnt that when a Fault happens , say a connect.timeout, the process will exit the flow and will enter an error state. At this state, it will look for a fault handler and executes that or use a default fault handler. Is my understanding correct ?

If my understanding is correct, once the error occurs, there is no way the flow could execute the service callout policy which would be placed in the response flow .

Please correct me if I am wrong.

@Srivatssan Srinivasan ,

Fault handler (FaultRule) is combination of policies. You can place a service callout policy inside the fault rule & trigger the email if you see 5xx responses.

@Srivatssan Srinivasan , See similar question asked here.

@Anil Sagar - Thank you so much for this. I did not think I can use Steps on a Fault execution. This fully solves my requirement. Also I noted the recommendation from the question you pointed that it is better to extract data to a different system rather than sending emails for all alerts which makes sense. Thank you so much for teaching me something new today.

@Srivatssan Srinivasan , Glad to help you.

You can actually do this on Apigee Edge too to avoid multiple emails without using a different system, Just, Set a value in cache if you see the 5xx first time & use that value not to trigger service callout for a while.

Keep us posted moving forward if any.