F5 iRules – Unconditionally redirect based on host header content and close initial connection #0

when HTTP_REQUEST {
 if { [string tolower [HTTP::host]] equals "site2.lab.com" }
 {
       HTTP::respond 302 noserver -reset Connection close Location http://site3.lab.com }
}

With the above iRule, the initial connection to site2.lab.com is closed when the redirect message is sent to the client. Check out the below output from curl which validates the same.

Continue reading

F5 iRules – Unconditionally redirect to another VIP based on host header content and initial connection stays intact

when HTTP_REQUEST {
    if { [string tolower [HTTP::host]] equals "site2.lab.com" } {
        HTTP::redirect "http://site3.lab.com"
    }
}

With this iRule, the initial connection to site2.lab.com is not closed and kept in memory until it times out. Check out the below output from curl which validates the same.

Continue reading

Debug health monitor for a single pool member in F5 LTM

Here’s an old post that shows how to debug bigd that gets you the debugs of all the health monitors that are running on the system. The rule of thumb with debugs is that the files get too large and may have an impact on other important services that may need that extra space.

What if you want to enable the debugs for just one pool member to see what’s going on with the health monitor associated with the pool member?

Monitor logging option is a better approach than debugging the bigd for this purpose.

You can find this setting under Local Traffic > Pools > pool_name > Members > Monitor Logging

Capture

Continue reading