HTTP::respond 200 content {http://www.w3.org/2005/08/addressing/soap/fault urn:uuid:318bb7b9-8ca6-4f9c-a094-a82f82109fc1 s:Sender The application is temporarily down for maintenance. " } noserver Cache-Control private Content-Type {application/soap+xml; charset=utf-8} Server {Microsoft-IIS/7.5}
If you’re on 9.4.1 or lower, you won’t be able to use the noserver flag to suppress the LTM inserted “Server: BigIP” header in responses.
To check if the pool has no active members, you can use active_members:
when HTTP_REQUEST {
if {[active_members [LB::server pool]] == 0 }{
HTTP::respond 200 content \
{http://www.w3.org/2005/08/addressing/soap/fault urn:uuid:318bb7b9-8ca6-4f9c-a094-a82f82109fc1 s:Sender The application is temporarily down for maintenance. " } \
noserver \
Cache-Control private \
Content-Type {application/soap+xml; charset=utf-8} \
Server {Microsoft-IIS/7.5}
}
}
I wonder why we can’t use LB::status “pool_name” to get the status of the pool as well as individual members… I think I’ll ask for an RFE CR as it seems logical to me.
You can get this indirectly in GTM with the pools command, which returns a list or count of the pools in a particular color status. That might be a better namespace than LB::status as I take that to be a decision-based target of some sort, rather than a collection of targets. My $.02. Regardless of what it’s called, that’s a valuable bit of information and makes a lot of sense for enhancement.