What is the command in tmsh to find out all the pools that are associated to monitor “tcp”?
(tmos.ltm)show pool all | grep "Monitor\|Pool:"
(tmos.ltm) list pool | grep "pool\|monitor "
This should give you all the pools and the associated monitor. You can copy the output and utilize sed/awk/egrep to obtain the relevant information. You can also try to execute the tmsh command from bash and try and utilize sed/awk/egrep to obtain the output you desire.
-
(tmos)
run util bashGo to Bash shell
-
(bash)
tmsh list ltm pool one-line | grep 'monitor tcp ' | awk '{ print $3 }'Print out names of all LTM pools associated with the ‘tcp’ health-check monitor
-
(tmos)
run util bashGo to Bash shell
-
(bash)
tmsh list ltm pool one-line | grep 'monitor tcp ' | awk '{ print $3 }'Print out names of all LTM pools associated with the ‘tcp’ health-check monitor
Syntax Error: “awk”, grep is currently the only filter that is supported
Syntax Error: “awk”, grep is currently the only filter that is supported
You execute that command in Bash shell, not in TMOS. See command 1 to switch to Bash.
If you don’t have sufficient rights for Bash shell, you can’t use the awk command to filter the output to just pool names.
You execute that command in Bash shell, not in TMOS. See command 1 to switch to Bash.
If you don’t have sufficient rights for Bash shell, you can’t use the awk command to filter the output to just pool names.
Great Thanks.
Great Thanks.
You can also view monitor instances (at the pool member level) using:
tmsh show /ltm monitor tcp
For example, to show all pool members where the default F5 monitor named “http” is applied:
tmsh show /ltm monitor http http
-------------------------
LTM::Monitor /Common/http
-------------------------
Destination: 172.16.20.1:80
State time: up for 0hr:5mins:38sec
| Last error: N/A @2016.10.11 13:49:09
Destination: 172.16.20.2:80
State time: up for 0hr:5mins:38sec
| Last error: N/A @2016.10.11 13:49:09
Destination: 172.16.20.3:80
State time: up for 0hr:5mins:38sec
| Last error: N/A @2016.10.11 13:49:09
You can also view monitor instances (at the pool member level) using:
tmsh show /ltm monitor tcp
For example, to show all pool members where the default F5 monitor named “http” is applied:
tmsh show /ltm monitor http http
-------------------------
LTM::Monitor /Common/http
-------------------------
Destination: 172.16.20.1:80
State time: up for 0hr:5mins:38sec
| Last error: N/A @2016.10.11 13:49:09
Destination: 172.16.20.2:80
State time: up for 0hr:5mins:38sec
| Last error: N/A @2016.10.11 13:49:09
Destination: 172.16.20.3:80
State time: up for 0hr:5mins:38sec
| Last error: N/A @2016.10.11 13:49:09