Forum Discussion
CLI command to get the whole configuration of specific VIP
Hello All, Good Day. I'm looking for a cli command of LTM to get the complete configuration of a specific VIP.
Could you please help me to know the CLI command to use to get the complete configuration of a VIP?
Regards, Thiyagu
- Srini_87152
Cirrostratus
Hi,
You can use tmsh commands..
show running-config ltm virtual < vsname>
show running-config ltm profile http < profile name?
show running-config ltm pool < pool>
show running-config ltm profile client-ssl < ssl profile>
show running-config ltm monitor http < monitor>
Thx
Srini
Appending the commandline with the
directive will display the entire configuration for an object, including default values that are normally hidden.all-properties
- jaikumar_f5
Noctilucent
If you are looking for a single command to pull the entire config of a VS, including the pool, profiles, clientssl details etc etc, I doubt there's one. The all-properties of VS does not show the details of pool-members.
But a simple bash script may help you out, you can tweak it to your needs.
!/bin/bash virtual=$1 list_virtual="$(tmsh list ltm virtual $virtual)" pool="$(tmsh list ltm virtual $virtual pool | grep pool | awk '{print $2}')" list_pool="$(tmsh list ltm pool $pool)" printf "\n===Virtual Setup : $virtual===\n" printf "\n$list_virtual" printf "\n===Pool Setup : $pool===\n" printf "\n$list_pool"
- nitass_89166
Noctilucent
if you can specify what configuration objects you want to display such as virtual server and pool (since showing everything might be too messy) , somebody here might be able to come up with script like the following:
e.g.
// virtual server + pool [root@ve13a:Active:In Sync] config for v in `tmsh list ltm virtual one-line |awk '{print $3}'`; do p=$(tmsh list ltm virtual $v one-line |awk '{for(i=0;i<=NF;i++)if($i=="pool"){print $(i+1)}}'); p1=$(tmsh list ltm pool $p); p2=${p1/ltm pool/}; v1=$(tmsh list ltm virtual $v); echo "${v1/$p/$p2}"; done ltm virtual bar { destination 172.28.24.10:80 ip-protocol tcp mask 255.255.255.255 pool foo { members { 200.200.200.101:80 { address 200.200.200.101 } 200.200.200.111:80 { address 200.200.200.111 } } } profiles { http { } tcp { } } source 0.0.0.0/0 source-address-translation { type automap } translate-address enabled translate-port enabled vs-index 11 }
- jaikumar_f5
Noctilucent
Your the best :)
- Srini_87152
Cirrostratus
you guys rock!! :)
- Anju
Altostratus
I am looking for a command that gives the detailed configuration for a single or a specific VIP or pool or profile. any input will be greatly appreciated. The above mentioned show commands are not working for me.
THANKS IN ADVANCE!
- nitass
Employee
if you can specify what configuration objects you want to display such as virtual server and pool (since showing everything might be too messy) , somebody here might be able to come up with script like the following:
e.g.
// virtual server + pool [root@ve13a:Active:In Sync] config for v in `tmsh list ltm virtual one-line |awk '{print $3}'`; do p=$(tmsh list ltm virtual $v one-line |awk '{for(i=0;i<=NF;i++)if($i=="pool"){print $(i+1)}}'); p1=$(tmsh list ltm pool $p); p2=${p1/ltm pool/}; v1=$(tmsh list ltm virtual $v); echo "${v1/$p/$p2}"; done ltm virtual bar { destination 172.28.24.10:80 ip-protocol tcp mask 255.255.255.255 pool foo { members { 200.200.200.101:80 { address 200.200.200.101 } 200.200.200.111:80 { address 200.200.200.111 } } } profiles { http { } tcp { } } source 0.0.0.0/0 source-address-translation { type automap } translate-address enabled translate-port enabled vs-index 11 }
- jaikumar_f5
Noctilucent
Your the best :)
- Srini_87152
Cirrostratus
you guys rock!! :)
- Anju
Altostratus
I am looking for a command that gives the detailed configuration for a single or a specific VIP or pool or profile. any input will be greatly appreciated. The above mentioned show commands are not working for me.
THANKS IN ADVANCE!
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