Forum Discussion
Irule to identify what data group a client uses once they hit the VIP
Hello,
We have some external VIPS that clients connect to with their unique url. I have some Irules in place that logs source IP and also TLS version.
The problem is I have the clients IP addresses coming into the VIP and the TLS version although i need something to identify the client name, such as data group or the full url they are using.
Is anyone able to help me create an additional irule that logs client source IP and the full url path they target or data group.
Thanks
Assad
- Lee_Sutcliffe
Nacreous
Hi Assad,
If your URLs are unique per client as you say, they you could use a datagroup to maintain an index of client name and URI and use the
switch to return the client name.-value
E.g.
Datagroup:
ltm data-group internal client_uri_dg { records { /somepath/unique-field1 { data "client-1" } /somepath/unique-field2{ data "client-2" } } type string }
iRule
when HTTP_REQUEST { if {[class match [HTTP::uri] starts_with client_uri_dg} { set clientName [class match -value [HTTP::uri] starts_with client_uri_dg] log local0. "Request from client: $clientName" } }
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