Using the http-ecv monitor together with JSON payload on Citrix ADC / NetScaler

U

The problem

Funny enough (or frustrating enough), an http-ecv monitor won’t work with JSON-based replies on a Citrix ADC / NetScaler. It will not find any data in an HTTP response and fail. WTF?

The reason

The http-ecv monitor requires the http-response to be of MIME-Type text (usually text/html). JSON data, however, is application/json. That’s why it does not work.


The solution

There is nothing like a solution. It works (or doesn’t work) as designed. Citrix product development would be able to solve the problem for us. I guess it’s just one or two lines of code, it would be great if they did. If you know somebody, push him in that direction!

A workaround

First things first: A workaround is no solution, a dirty workaround is even worse. This is a dirty one, but the only one I know, and it works.

We need to create an lb-vServer for every service we have. Next, we have to rewrite the HTTP-response header content-type to text/html using a rewrite policy. Last, we have to create a monitor, pointing to this vServer, instead of pointing to the Real Server.

Trick to make a http-ecv monitor tect a JSON response

About the author

Johannes Norz

Johannes Norz is a Citrix Certified Citrix Technology Advocate (CTA), Citrix Certified Instructor (CCI) and Citrix Certified Expert on Application Delivery and Security.

He frequently works for Citrix international Consulting Services and several education centres all around the globe.

Johannes lives in Austria. He had been borne in Innsbruch (https://www.youtube.com/watch?v=UvdF145Lf2I)

Add comment

By Johannes Norz

Recent Posts

Recent Comments