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
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
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
all-properties
directive will display the entire configuration for an object, including default values that are normally hidden.
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"
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
}
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
}
Your the best ![]()
Your the best ![]()
you guys rock!! ![]()
you guys rock!! ![]()
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!
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!
Hello Pihu,
Use below command from tmsh to view detailed configuration of a virtual server
list ltm virtual $virtual server name all-properties
eg : If your virtual server name is test_VS then,
list ltm virtual test_VS name all-properties
For pool and profile go to ltm module in tmsh by typing ltm from tmsh
list pool pool name all-properties
list profile parent profile profile name all-properties
Parent profiles are tcp , http , fastL4 , ClientSSL , ServerSSL etc.
Hope this helps.
Hello Pihu,
Use below command from tmsh to view detailed configuration of a virtual server
list ltm virtual $virtual server name all-properties
eg : If your virtual server name is test_VS then,
list ltm virtual test_VS name all-properties
For pool and profile go to ltm module in tmsh by typing ltm from tmsh
list pool pool name all-properties
list profile parent profile profile name all-properties
Parent profiles are tcp , http , fastL4 , ClientSSL , ServerSSL etc.
Hope this helps.