Forum Discussion
How can i add to this irule a part to know which pool is relationed with the virtual Server?
when CLIENT_ACCEPTED { set hsl [HSL::open -proto UDP -pool pl.logs01.stp]
} when HTTP_REQUEST { Save request information for later logging set req_start [clock clicks -milliseconds] set clientip [IP::client_addr] set method [HTTP::method] set uri [HTTP::uri] set referer [HTTP::header Referer] set ua [HTTP::header Usrer-Agent] } when HTTP_RESPONSE { set log_string "$clientip [clock format [clock seconds] -format "%d/%m/%Y %H:%M:%S %z"] [expr {[clock clicks -milliseconds] - $req_start}] \"$method $uri\" [HTTP::status] [HTTP::header Content-Length] \"$referer\" \"$ua\"" log local1.info $log_stringHSL::send $hsl $log_string
}
Can anyone tell my how can i add to this IRule the "pool" in which the Vritual server forwards the traffic?.
- I_R_101_110
Cirrus
This document details the LB::server command which can be used to return pool names and members in the HTTP_REQUEST event:
https://devcentral.f5.com/wiki/iRules.LB__server.ashx
Being that this info will be in the client side context, you'll have to create a variable as you've done with the other client side commands in order to put it in the HTTP_RESPONSE server side context.
- youssef1
Cumulonimbus
Hi,
you can retrieve pool-member using this irule:
when LB_SELECTED { log local0. "[LB::server addr] was the IP that was selected." }
Regards
Recent Discussions
Related Content
* 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