Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

Query system status in TMSH

Just a short and stupid question.

How can I query the system status (Active/Standby) in TMSH script?
0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
One way would be to look at the failover.state DB variable. The "value" property will contain one of "active forced_offline offline standby"

tmsh list sys db failover.state
sys db failover.state {
value "active"
}

tmsh list sys db failover.state all-properties
sys db failover.state {
default-value "offline"
scf-config "false"
value "active"
value-range "active forced_offline offline standby"
}
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
Or, in a script, as described in "help cli script", tmsh::get_config
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
And in v11

tmsh show cm traffic-group field-fmt

In a script
tmsh::get_status cm traffic-group ...

has a failover-state property, which will be set to either active standby, offline or force_offline

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
Thanks Mark, it works
0