Forum Discussion
DDA_176163
Nimbostratus
Aug 23, 2018iRule able to ask what Virtual it's running on?
My question is: In iRules, is there a way for a running iRule to return the name or names of the VIP or Pool (name or ID)?
What sort of call would it be? Maybe a simple example?
We're tryi...
Lee_Sutcliffe
Nacreous
Aug 23, 2018You can use the virtual command to return the name of the VS
when HTTP_REQUEST {
log local0. "Current virtual server name: [virtual name]"
}
https://devcentral.f5.com/wiki/iRules.virtual.ashx
You can use [LB::server pool] to return the selected pool, assuming one has been selected.
when CLIENT_ACCEPTED {
Save the name of the VIP's default pool
set default_pool [LB::server pool]
}
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
