Forum Discussion
Script To list all the ASM policies and how many VS are having ASM policies
Hi Everyone,
I am trying to write a script to list all the ASM policies applied to virtual servers and how many virtual servers are having an ASM policy. Any ideas...
Thanks in advance.
Regards
Hussein
1 Reply
- Chris_Grant
Employee
If you run tmsh list /asm policy virtual-servers this will return a list of all of the ASM policies and a list of the virtual servers they are applied to. In my lab environment the output for an ASM policy with virtual servers looks like so:
asm policy testme { virtual-servers { testme } }
While the output on an unused policy looks like so:
asm policy testmenostage { virtual-servers none }
It would be fairly easy to either run this via ssh or have it run in a shell script on the ASM. I suspect you could likely do the same thing via iControl or REST, but I have not tested this.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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