Forum Discussion
Assad_314410
Nimbostratus
Mar 20, 2018Irule 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 a...
Lee_Sutcliffe
Nacreous
Mar 20, 2018Hi 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
-value switch to return the client name.
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"
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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