Forum Discussion
s_selvey
Aug 13, 2019Nimbostratus
Checking what iRules are associated to multiple virtual servers
I need to understand what iRules are configured under each virtual server in a certain partition on my LTM and then extract the iRule configuration. Is there a quicker way to do this rather than manu...
- Aug 13, 2019
Hello.
Try this ->
tmsh -q -c "cd / ; list ltm virtual recursive one-line" | grep rule
KR,
Dario.
harhan
Feb 04, 2020Nimbostratus
I wanted to expand a bit on the answer, as this question comes up once in a while. The one-line argument is a bit hard to read if you want to scan over the rules by hand. I expanded the above expression with sed in stead.
It will list all virtual servers, regardless if they use irules or not.
tmsh -q -c "cd / ; list ltm virtual recursive" | sed -n -e '/ltm virtual/p' -e '/ rules/,/}/p'
The second sed expression scans the lines from rules to } outputting something similar to:
ltm virtual Common/VS_Test {
ltm virtual Common/VS_FrontEnd {
rules {
Common/iRule_FrontEnd
}
Edit: slight change in sed expression
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