Forum Discussion
Yutaka_Ishikawa
Nimbostratus
Feb 03, 2014How to get the mode(Active-Passive) of each unit in Cluster(HA) system?
How to get the mode(Active-Passive) of each unit in Cluster(HA) system?
Let me know the API getting the mode(Active-Passive, Master-slave, Running-Down and so on) of each unit in Cluster(HA) system.
The Version of BIG-IP is below.
BIG-IP LTM Version
Best regards.
1 Reply
- Hamish
Cirrocumulus
Using iControl?
I think this is what you want...
sub getFailoverState { my ($dbh, $dev)=(@_); my $t0=[gettimeofday]; my $devID=$dev->{ID}; my $devFQDN=$dev->{FQDN}; my $icServer=$dev->{MgmtAddr}; my $icPort=$dev->{MgmtPort}; dbprint "getFailoverState: cookiejar (Before)\n"; print Dumper($cookieJar); my $Failover = SOAP::Lite -> uri('urn:iControl:System/Failover') -> proxy("$sProtocol://$icUser:$icPass\@$icServer:$icPort/iControl/iControlPortal.cgi", cookie_jar => $cookieJar); -> proxy("$sProtocol://$icUser:$icPass\@$icServer:$icPort/iControl/iControlPortal.cgi"i, $Failover->transport->cookie_jar($cookieJar); dbprint "getFailoverState: Getting failover state for $devFQDN\n"; my $soapResponse = $Failover->get_failover_state(); dbprint "getFailoverState: cookiejar (After)\n"; print Dumper($cookieJar); &checkResponse($soapResponse); my $failoverState=$soapResponse->result; dbprint "getFailoverState: state=$failoverState\n"; my $updatestr="update device set fostate='$failoverState' where id=$devID"; dbprint "getFailoverState: SQL [$updatestr]\n"; my $update=$dbh->prepare($updatestr); $update->execute; my $elapsed=tv_interval ( $t0 ); log_action($elapsed, 0, "getFailoverState", "$updatestr"); }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects