Forum Discussion
K-Dubb
Nimbostratus
Nov 29, 2010Add http header of Server IP address?
Hello,
We are on version 9.4.8 of BigIP. We use a device called Truesight to monitor the user experience of our traffic. We recently moved the Truesight device to in front of the F5 so we ...
Posted By hoolio on 11/29/2010 08:02 AM
Hi K-Dubb,
You can use an iRule like this:
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]"
}
}
You could also insert the currently selected pool name using [LB::server pool].
Aaron
Hi,
Thanks for your reply! Is server_addr and Server_port a method, or do I need to populate this with the actual IP and Port? The reason I ask is because the iRules are applied at the Virtual Server level and with 14 application servers, I am not sure how it would inject the correct IP and port to the server.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects