Forum Discussion
Aug 11, 2010
Need to log pool member selected
I need some ideas on the best way to log the pool member selected during a connection. The user is under the impression x-forwarded will solve their problem... We're not using SNAT here so we're already preserving the source address... its the destination address (pool member) they want...
I was thinking of using the LB::server addr command. Any other thoughts or ideas? Or is that the best way to accomplish what I need here.
Thanks guys!
- naladar_65658
Altostratus
That seems like a logical choice to me. You could try:when LB_SELECTED { log local0. "[LB::server addr] was the IP that was selected." }
- Cool, I'm looking to make it easy for them to view..
- Chris_Miller
Altostratus
Posted By iRuleYou on 08/11/2010 08:04 AM - Hmm but you have picked the server...correct? Instead of capturing it into the log file, I was wondering if it could take the place of the x-forwarded in the header...
- hoolio
Cirrostratus
You can do this in the HTTP_REQUEST_SEND event:when HTTP_REQUEST_SEND { Need to force HTTP:: commands into the clientside context as the HTTP_REQUEST_SEND event is in the serverside context clientside { Insert a custom HTTP header in the request headers with the selected server IP HTTP::header insert Selected-Server [LB::server addr] } }
- Chris_Miller
Altostratus
Posted By hoolio on 08/11/2010 10:12 AM You can do this in the HTTP_REQUEST_SEND event:when HTTP_REQUEST_SEND { Need to force HTTP:: commands into the clientside context as the HTTP_REQUEST_SEND event is in the serverside context clientside { Insert a custom HTTP header in the request headers with the selected server IP HTTP::header insert Selected-Server [LB::server addr] } }
- Very cool man, I've been diving into the ASM lately... slick piece of gear.
- hoolio
Cirrostratus
I haven't seen anything comprehensive. What in particular are you looking for? It would almost need to be programmatic in order to cover all of the potential paths. - JRahm
Admin
Here's one specific for basic http traffic: http://devcentral.f5.com/weblogs/jason/archive/2011/02/01/irules-http-event-order-update.aspx Click Here - @hoolio Just to study, I find myself referencing your notes and just started digging around..
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