The iRule is inserting the HTTP header in requests sent to the pool, so the client wouldn't see the change. You could either log the change in the iRule, use tcpdump on the server VLAN or check the server logs if they log the custom HTTP header.
Here's a way to log the specific header as well as the full HTTP request headers in the iRule:
From http://devcentral.f5.com/wiki/default.aspx/iRules/http_request_send
when HTTP_REQUEST_SEND {
Need to force the host header replacement and HTTP:: commands into the clientside context
as the HTTP_REQUEST_SEND event is in the serverside context
clientside {
Replace (or insert if it doesn't exist) a custom HTTP header with the selected server IP and port
HTTP::header replace my_custom_header "[IP::server_addr]:[TCP::server_port]"
}
}
when HTTP_REQUEST_SEND priority 501 {
Run this event with a later priority than the default HTTP_REQUEST_SEND event
This bypasses LTM's caching of most HTTP:: commands within the same event and event priority
clientside {
log local0. "[IP::client_addr]:[TCP::client_port]: my_custom_header: [HTTP::header my_custom_header]"
log local0. "[IP::client_addr]:[TCP::client_port]: All headers: [HTTP::request]"
}
}
You can remove the second HTTP_REQUEST_SEND event once you're done testing.
For details on using tcpdump to capture this, see SOL411:
SOL411: Overview of packet tracing with the tcpdump utility
http://support.f5.com/kb/en-us/solutions/public/0000/400/sol411.html
Aaron