Forum Discussion
crodriguez
Feb 18, 2021Ret. Employee
Thank you for the additional information, Racquel. It does help. Unfortunately, as far as I can tell, there is no way to send a custom HTTP response from a local traffic policy. The functionality does not exist in v15.1 and earlier. I haven't checked in v16.0 yet, but will, just in case. So it would seem an iRule is your only option for sending the custom response string the external monitor application needs from the BIG-IP system, rather than from the application server itself.
Your iRule might look like this:
when HTTP_REQUEST {
if { [TCP::local_port] == 8686 } {
HTTP::respond 200 content "<response-string>"
}
}
I don't think it's necessary to check the HTTP method if no other requests occur to port 8686.
I'll let you know if I find a local traffic policy solution in v16.0.