Is there way of using the output of one iRule and using in another iRule, eg using a variable (x) derived from and iRule which is triggered at CLIENT_CONNECTED and then using the variable (x) for a iRule that is triggered LB_SELECTED stage.
- local: (like $my_var) specific to the TCP connection and accessible across all events after they’ve been declared regardless of which iRule they’re declared in
- global: (like $::my_var) accessible across all TCP connections
- static: (like $static::my_var) New in 10.0.0. A namespace for creating global variables to hold constant values in a CMP-compatible fashion. This namespace is intended only for use with values that will not change. While it is possible to alter the value of a global variable in the static namespace, this value will not be propagated to other CMP nodes in the system. Therefore, doing so may lead to unexpected results. If you need to share information across CMP nodes, you should use the session command instead. (from http://devcentral.f5.com/wiki/default.aspx/iRules/static)
Here is a related post which details the first two variable types: