Forum Discussion
Al_Faller_1969
Nimbostratus
May 09, 2006Determining Failover State with Perl & iControl
Hi All -
I'm new to iControl, but old to perl. I'm attempting to determine the active/passive state of my F5 BigIPs using the SDK and perl. I think I'm on the right track, but I'm not getting any data back from the BigIP. I basically hacked apart one of the samples and came up with the attached code. Please note that I am able to run the sample code. Any idea why I get nothing?
Here is what I get when I run it:
$ ./SystemState.pl bigip 443 admin adminpw
==========================================================
System State
------------------
$
Thanks in advance!
- You left a bit of the old code in the response parsing. The get_failover_state() method returns an enum containing the current failover state. This should work for you:
sub getSystemState() { print "==========================================================\n"; print "System State\n"; print "------------------\n"; $soapResponse = $soap->get_failover_state(); if ( $soapResponse->fault ) { print $soapResponse->faultcode, " ", $soapResponse->faultstring, "\n"; } else { $FailoverState = $soapResponse->result; print "State: $FailoverState\n"; } }
- Al_Faller_1969
Nimbostratus
Joe - Works perfectly! Thanks. - Glad to help!
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