Forum Discussion
nikzin_341815
Nimbostratus
Dec 07, 2017tmsh command for ltm policies in use
Hello community,
i am searching a tmsh command which list me all virtual servers where a special ltm policy is attached. I could not find the right command.
Is there any idea ?
Thank you, Nick
nitass
Employee
Dec 20, 2017i am searching a tmsh command which list me all virtual servers where a special ltm policy is attached.
quick one could be tmsh list ltm virtual one-line |grep
[root@bip1a:Active:In Sync] config tmsh list ltm virtual one-line |grep asm_auto_l7_policy__baz
ltm virtual baz { destination 10.200.155.165:80 ip-protocol tcp mask 255.255.255.255 policies { asm_auto_l7_policy__baz { } } pool foo profiles { ASM_wibble-policy { } http { } tcp { } websecurity { } } source 0.0.0.0/0 source-address-translation { type automap } translate-address enabled translate-port enabled vs-index 3 }
if you like scripting, you may try something like this:
[root@bip1a:Active:In Sync] config tmsh list ltm virtual policies |awk '/ltm virtual/ {printf "\n"} {printf "%s",$0} END {printf "\n"}' |tr -d '{}' |tr -s ' ' |grep asm_auto_l7_policy__baz
ltm virtual baz policies asm_auto_l7_policy__baz
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