Forum Discussion

PeterKrike's avatar
PeterKrike
Icon for Nimbostratus rankNimbostratus
Feb 28, 2022
Solved

How to grep for specific sslclient profile within all the VIPs

I am looking for each VIP that is using a specific ssl client profile, I know I can use iHealth but it's a tedious process everytime. I was hoping I can just use the CLI to accomplish this task. What I have found already is the following commands :

tmsh list ltm virtual | grep -E 'test'
This command does return back the 'test' results however without the Virtual server information attached.

tmsh list ltm virtual | grep -E 'test|'
When I execute this command it just returns ALL Virtual servers with any/all ssl client profiles not pertaining to test. That character is a pipe |

 

  • Hi PeterKrike,

    try tmsh list ltm virtual one-line | grep -E 'test' | awk '{ print $3 }'

    KR
    Daniel

4 Replies

  • tmsh list ltm virtual all one-line | egrep "ltm virtual|<profilename>" --color

    • PeterKrike's avatar
      PeterKrike
      Icon for Nimbostratus rankNimbostratus

      Thanks but this actually returned mostly ALL the VIPs we had that did not include that <profilename> 'test'.

      • CA_Valli's avatar
        CA_Valli
        Icon for MVP rankMVP

        You're right, my bad, grep for "test" first then run another grep -e to highlight the profile 

        tmsh list ltm virtual all one-line | grep test | egrep "ltm virtual|test" --color