Forum Discussion

Naumin_Dave_144's avatar
Naumin_Dave_144
Icon for Nimbostratus rankNimbostratus
Feb 21, 2019

CLI command to get partial configuration for specific VIPs

Hello All;

 

Good Day.

 

I am looking for a cli command of LTM to get ONLY list of VSs who are having serverssl profile in it. Could you please help me with this?

 

I have used "list ltm virtual | grep 'ltm|serverssl'" but it matches only string "ltm" and "serverssl" in each line of the list ltm virtual command, which is not helpful for my requirement.

 

I want to get only those VIPs who are using serverssl profile.

 

  • Please try this one and let me know you are looking for similar command:

     

    tmsh show ltm profile server-ssl raw | grep 'Ltm::ServerSSL|Protocol'

     

    • Naumin_Dave_144's avatar
      Naumin_Dave_144
      Icon for Nimbostratus rankNimbostratus

      Not working. I think there was a typo in your command, i tried with below command but in Virtual server Name instead of printing name it is showing N/A.

       

      tmsh show ltm profile server-ssl raw | grep 'Ltm::ServerSSL|Virtual Server Name'

       

    • RaghavendraSY_7's avatar
      RaghavendraSY_7
      Icon for Cumulonimbus rankCumulonimbus

      tmsh show ltm profile server-ssl raw | grep 'Ltm::ServerSSL|Protocol' command is working for me. which version you are running.

       

      Also try with below command.

       

      tmsh list ltm virtual profiles | grep serverside -B 10 (You need to change value 10 specific to your configuration)

       

    • RaghavendraSY_7's avatar
      RaghavendraSY_7
      Icon for Cumulonimbus rankCumulonimbus

      Also verify with

       

      tmsh list ltm virtual profiles | grep serverssl -B 10

       

  • Please try this one and let me know you are looking for similar command:

     

    tmsh show ltm profile server-ssl raw | grep 'Ltm::ServerSSL|Protocol'

     

    • Naumin_Dave_144's avatar
      Naumin_Dave_144
      Icon for Nimbostratus rankNimbostratus

      Not working. I think there was a typo in your command, i tried with below command but in Virtual server Name instead of printing name it is showing N/A.

       

      tmsh show ltm profile server-ssl raw | grep 'Ltm::ServerSSL|Virtual Server Name'

       

    • RaghavendraSY's avatar
      RaghavendraSY
      Icon for Altostratus rankAltostratus

      tmsh show ltm profile server-ssl raw | grep 'Ltm::ServerSSL|Protocol' command is working for me. which version you are running.

       

      Also try with below command.

       

      tmsh list ltm virtual profiles | grep serverside -B 10 (You need to change value 10 specific to your configuration)

       

    • RaghavendraSY's avatar
      RaghavendraSY
      Icon for Altostratus rankAltostratus

      Also verify with

       

      tmsh list ltm virtual profiles | grep serverssl -B 10

       

  • Also please try below one:

     

    tmsh list ltm virtual profiles | grep serverside -B 10 (You need to change value 10 specific to your configuration)

     

  • There is small syntax error:

     

    Please try this one:

     

    tmsh show ltm profile server-ssl raw | grep 'Ltm::ServerSSL|Virtual Server Name'

     

    It worked for me

     

  • There is small syntax error:

     

    Please try this one:

     

    tmsh show ltm profile server-ssl raw | grep 'Ltm::ServerSSL|Virtual Server Name'

     

    It worked for me

     

  • Hi N

    Always a best approach for me - bash script 🙂

    Just put the below code in any file example:

    vi /var/tmp/serverssl-mapping-vs

     

    PROFILES=`tmsh list ltm profile server-ssl | grep "^ltm" | awk -F" " '{print $4}'`
    for all in ${PROFILES} 
    do
    VS_NAME=`tmsh list ltm virtual one-line | grep $all | awk -F" " '{print $3}'`
    if [ "${VS_NAME}" != "" ]
    then
    for x in ${VS_NAME}
    do
    echo "$x --> $all"
    done
    fi
    done
    

     

    Then just run,

    bash /var/tmp/serverssl-mapping-vs

    Let me know if you need an understanding on this, its plain and simple.

  • Hi Naumin,

     

    you can use the below format.

     

    list ltm virtual one-line | grep serverside
    • jaikumar_f5's avatar
      jaikumar_f5
      Icon for Noctilucent rankNoctilucent

      This would list out the server side profiles too, let's say tcp-lan-optimized. So not so efficient way to pull.