18-Aug-2023 04:44
Hi Everyone,
I need your help as I am trying to get the VSs that are associated with a specific SNAT pool from the command line.
Thanks!
Solved! Go to Solution.
21-Aug-2023 13:04
Hi @Khaled_HA, you can use awk to print only the virtual name, so to expand on what was provided earlier:
tmsh list ltm virtual one-line | grep "pool SNAT_POOL_NAME" | awk '{print $3}'
18-Aug-2023 07:57
Think you may benefit from the following tmsh script: https://community.f5.com/t5/codeshare/config-search/ta-p/277819.
Hope this helps!
21-Aug-2023 13:07
Love this script, @whisperer ...should be a default install when deploying new BIG-IP boxes...
18-Aug-2023 13:48
tmsh list ltm virtual one-line | grep "pool SNAT_POOL_NAME"
Remark: SNAT_POOL_NAME should not have the same name as an existing LTM pool (and this is a best practice btw)
19-Aug-2023 23:24
Hi Amine,
Actually I was using this command, the problem is that it is giving me the whole configuration, while I just need the virtual server name.
So, is there any way to get only the virtual server name ?
Thanks!
21-Aug-2023 13:04
Hi @Khaled_HA, you can use awk to print only the virtual name, so to expand on what was provided earlier:
tmsh list ltm virtual one-line | grep "pool SNAT_POOL_NAME" | awk '{print $3}'
28-Aug-2023 13:43
@Khaled_HA - If your post was solved it would be helpful to the community to select *Accept As Solution*.
Thanks for being part of our community.
01-Sep-2023 05:42
Thank you guys for the support!!