Forum Discussion
Irule Environment Variables: Any?
Did you get this working? I needed to implement pool selection based on active unit hostname and tested it now, but got stuck, as the static::tcl_platform variable wasn't working. There seems to be a bug on 11.4.0 and newer. There is a one line iRule workaround for it which needs to be used in RULE_INIT event.See sol14544: The tcl_platform iRules variable is not in the static:: namespace.
However I found another way of getting the hostname, using [info hostname] TCL-function. Tested and it works like a charm. Use it in RULE_INIT event to assign the retrieved hostname value to a static variable, which can be used in other events/iRules later. For example:
set static::host [info hostname]
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