Forum Discussion
ykkim
Nimbostratus
Jun 03, 2013iControl - getting Redundancy State Preference
Hi
I need to check if "Redundancy State Preference" value is "Active" or "Standby" with my Java iControl application.
I could find two functions almost close to that purpose. System.Failove...
Faintly_Lucky
Nimbostratus
Jun 05, 2013Hey there:
What I do is query the Database directly for that. I can't help with Java, but I can give you a perl example that maybe you can translate.
$db = SOAP::Lite
-> uri('urn:iControl:Management/DBVariable')
-> readable(1)
-> proxy("https://$sHost/iControl/iControlPortal.cgi");
eval {
$db->transport->http_request->header( 'Authorization' => 'Basic '
. MIME::Base64::encode("$sUID:$sPWD", ''));
};
$soapresponse = $db->query(
SOAP::Data->name ( variables => ["Failover.ForceStandby","Failover.ForceActive"] ),
);
&checkresponse($soapresponse);
@dbva = @{$soapresponse->result};
print "\n";
foreach $dbvar ( @dbva ) {
$varname = $dbvar->{"name"};
$valdata = $dbvar->{"value"};
print "$varname $valdata\n";
}
If you're looking to set them (I always disable redundancy state preference):
Note: F5 recommends the None setting, as it gives you time to investigate why the primary unit failed over, and to assess whether this may happen again. If you select None, you can avoid further failovers if unit1 runs into the same issue multiple times.
$vval1 =
{
name => "Failover.ForceStandby",
value => "disable"
};
$vval2 =
{
name => "Failover.ForceActive",
value => "disable"
};
push @vvaldata,$vval1;
push @vvaldata,$vval2;
$soapresponse = $db->modify(
SOAP::Data->name ( variables => [@vvaldata] ),
);
Hope that this helps.
Chris
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