Forum Discussion
iControl script to ltm is timing out in 11.6
The following is an excerpt from a script I use to find all of the Virtual Servers and Pools associated to an IP address. I provide the variable $sDestIp and then pull down a list of all Virtual Servers and then check each one for that IP address. Starting when we upgraded to 11.6 it now goes through so many and then times out. We have probably about 600 Virtual Servers and so it makes a call to try to find those IPs for each one. Is there a better way to get he information I require, every Virtual Server associated with an IP address? I didn't see anything like get_vritual_server where you would supply and IP and it would return a Virtual Server Is there something new in 11.6 that would complain about 600 API calls that wasn't there in 11.5?
Here's my perl for what I am doing:
$soapResponse = $gVirtSrv->get_list();
&checkResponse($soapResponse);
@virtSrvs = @{$soapResponse->result};
VsLoop : {
foreach $virtSrv (@virtSrvs)
{
my $soapResponse = $gVirtSrv->get_destination_v2(SOAP::Data->name(virtual_servers => [$virtSrv]));
&checkResponse($soapResponse);
@AddressPortA = @{$soapResponse->result};
for $i (0 .. $AddressPortA)
{
$AddressPortAofA = $AddressPortA[$i];
$address = $AddressPortAofA->{"address"};
$port = $AddressPortAofA->{"port"};
@justAddress = split '/', $address;
$justAddress2 = $justAddress[2];
if ( "$justAddress2" eq "$sDestIp" )
{
push(@virtServers,"$virtSrv");
}
}
}
1 Reply
- omniplex
Nimbostratus
Why would you make 600 different calls? That is a bit excessive. get_destination_v2 will accept an array of virtual server names and will return all the addresses and port back in the same order it received the names. That way you only make a single call instead of 600 different calls.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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