Forum Discussion
Check response headers in pool member monitor
Hello,
Is it possible with pool member monitor to verify if a response header is set to true and disable the node based on that?
Thanks,
Charan
- crodriguezRet. Employee
Yes. You can create a reverse monitor and set the receive string in the monitor to the header and its value. For example, the reverse monitor below sends an HTTP 1.1 HEAD request for index.php to the pool member and checks the response for an HTTP header called X-Server-Disabled with the value true. If found, the monitor marks the pool member down, the reverse of what it would normally do if the reverse option was not enabled in the monitor. Note that the monitor must send either an HTTP 1.0 or HTTP 1.1 request for headers to be examined on the response.
ltm monitor http http_custom_monitor { adaptive disabled defaults-from http destination *:http interval 5 ip-dscp 0 recv "X-Server-Disabled\: true" recv-disable none reverse enabled send "HEAD /index.php HTTP1.1\r\nHost:www.f5trn.com\r\n\r\n" time-until-up 0 timeout 16 }
You can also test the Receive Disable String as with a reverse monitor the old connections will be dropped as the pool member will marked down and with Receive Disable String the old connections will remain but there will be no new connections, so decide which one you want:
https://support.f5.com/csp/article/K12818
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com