Forum Discussion
DFresh4130_2492
Apr 10, 2012Nimbostratus
Script to identify if unit is active or standby
Hi All,
I currently have basic operator privileges to our F5 systems. I haven't worked with F5s much in the past and have never written scripts to interact with them before.
I'm b...
Hamish
Apr 19, 2012Cirrocumulus
Some code from a past project...
sub activeUnit {
my ($FailoverAPI, $icServer)=@_;
print "activeUnit:\n";
my $soapResponse = $FailoverAPI->get_failover_state();
my($status,$text)=&checkResponse($soapResponse);
if(($status!=1)||($text ne "OK")) {
print "activeUnit: status $status error [$text] from get_failover_state()\n";
return;
}
print "activeUnit: status $status success [$text] from get_failover_state()\n";
print Dumper($soapResponse->result);
$fostate=$soapResponse->result;
print "activeUnit: status $status fostate [$fostate] from get_failover_state()\n";
return ($fostate eq "FAILOVER_STATE_ACTIVE");
}
H
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