Connectivity test for target end points using service call out policy

can i do a connectivity test for all the target servers using service call out policy by not updating the target name every time

0 7 295
7 REPLIES 7

Just to clarify what you're trying to do

1. What do you mean by not updating the target name every time?

2. Are you trying to have a single service that will test all the target servers? as in some type of health check? what do you expect this service to respond with, or to do what if for example one or more target servers are not available?

You should also take a look at the API Monitoring capabilities. You can use this to create alerts based on API status codes, latency or target error rates. This out of the box functionality may also help you with what you're trying to do

you are right with the 2nd point , i am looking something with one single service to test all target servers , where in if any one fails to connect it should throw either 500 error code which way we can know what backend services are unable to connect.

Not applicable

using service callout without changing the target how can you connect to all backends.

If you wan to hit all the targets and don't want to change, then using one assign message policy in target endpoint and configure the target.url to a reference header variable. Each time send the different targets in that header to the same proxy.

Thank you for the response , but in this way as well i need to change the header variable with target value every time i do a health check and i can only connect to one target if i am not wrong . please correct me if i misunderstood your point.

Yes, at a time you can connect to only one target.

But yes, I had done in past creating a shell script. Which would have one dummy request to each backend. Once I run the script I was able to see which were failing and which were passing.

Thanks for that ,is it possible to share the shell script.

Actually don't have with me now. It's simple. Only curl Requests and some greps and few colour fascinating