Forum Discussion
F5 ASM Policy Association with VIP
Can someone help me in finding an API/tmsh command to get the ASM Policy that are associated to a particular Virtual Server ?
- Jad_Tabbara__J1
Cirrostratus
Hello,
you can try this command
Code >tmsh show ltm virtual "VS Name" policies | grep "asm_"
or
Code >tmsh list ltm virtual "VS Name" policies | grep asm
Or directly from the tmsh
Code >show ltm virtual "VS Name" policies | grep "asm_"
or
Code >list ltm virtual "VS Name" policies | grep asm
Let me know if it works for you
Regards
- bsb
Nimbostratus
I can get all the asm policies and corresponding virtual servers with below command.
tmsh list asm policy virtual-servers | sed ':a;N;$!ba;s/\n/ /g' | sed 's/asm policy/\nasm policy/g'
can you please let me know what would be the command to get backend servers with port numbers along with above output.
as of now, i use below command to get VIP, backend server and port number. tmsh list ltm virtual one-line |awk '{for(i=0;i<=NF;i++)if($i=="pool"){p=$(i+1);break}; print $3,$6,p}' |awk '{cmd="tmsh list ltm pool " $3 " one-line"; cmd|getline r; print $1,$2,$3,r}' |awk '{printf "%s,%s,%s",$1,$2,$3} {for(j=3;j<=NF;j++)if($j~/:/){printf ",%s",$j} {print ""}}' >> $HOSTNAME
Recent Discussions
Related Content
* 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