Forum Discussion
Mario_Franco
Altocumulus
Jun 06, 2022Set a variable from a Data group
Hi everyone, I have an irule with a static variable "set example 1" which is used when we need to point to a specific virtual server, and we change it to "Set example 0" when we want to move the tra...
Jul 29, 2022
You probably have figured it out by now but just in case, here's an example.
Data group list:
ltm data-group internal /Common/select_server {
records {
server {
data a
}
}
type string
}
And the rule:
when HTTP_REQUEST {
# Below is the droid... I mean line you're looking for
set selected_server [class lookup "server" select_server]
HTTP::respond 200 content $selected_server
}
Good luck!
Kind regards,
Patrik
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
