For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

shabuboy's avatar
shabuboy
Icon for Altostratus rankAltostratus
Apr 18, 2023
Solved

CLI command to look search for a node on all partition

  Hello I use this command to query for the config once I know the virtual name. ---------------------------------------------------------------------------- tmsh show ltm <virtual_name> detail |...
  • shabuboy's avatar
    Apr 20, 2023

    Thanks Enes_Afsin_Al.
    Your script works great. Sample output:
    /rsync_load_balancer_vhn0wt_ste_prd/rsync_load_balancer_vhn0wt_ste_prd/serviceMain,/rsync_load_balancer_vhn0wt_ste_prd/172.30.13.91%709:ssh,/rsync_load_balancer_vhn0wt_ste_prd/rsync_load_balancer_vhn0wt_ste_prd/serverpool,172.30.13.85%709 172.30.13.87%709 172.30.13.88%709 172.30.13.89%709

    In the end, had two options, yours plus: 

    Command-1:
    tmsh -c 'cd /; show ltm virtual detail recursive' | egrep "Virtual Server: | Destination | Ltm::Pool: | Ltm::Pool Member: | Ltm::ClientSSL Profile" | grep -v "Destination IP Bypasses" | sed 's/Ltm:://g;s/|//g;s/Destination\s*/Destination/g' >> /var/tmp/virtual.out

    Command 2:
    egrep -B 3 '172.30.13.85%|172.30.13.87%|172.30.13.88%|172.30.13.89%' virtual.out

    Example output:
    Virtual Server: rsync_load_balancer_vhn0wt_ste_prd/rsync_load_balancer_vhn0wt_ste_prd/serviceMain
    Destination: 172.30.13.91%709:22
    Pool: rsync_load_balancer_vhn0wt_ste_prd/rsync_load_balancer_vhn0wt_ste_prd/serverpool
    Pool Member: Common/172.30.13.85%709:22
    Pool Member: Common/172.30.13.87%709:22
    Pool Member: Common/172.30.13.88%709:22
    Pool Member: Common/172.30.13.89%709:22

     

    Both outputs can be written to a file with the " > filename.csv " or " filename.txt "