Forum Discussion
Cynthia_18735
Nimbostratus
May 06, 2008More efficient way to get pool member status per URL using iControl?
I have a perl script that is does the following:
(1) Gets a list of WideIP's from GlobalLB/WideIP
(2) For each WideIP, gets a list of Pool names from GlobalLB/Pool.
Input is an array of WideIP's (from 1)
(3) For each pool name in each WideIP, gets a list of pool members from GlobalLB/PoolMember:
Input is an array with a single pool name.
Output is address and port.
(4) For each address:port in each pool gets enabled/disabled state from GlobalLB/VirtualServer
Inut an Array with a single address and port
for each pool member
Output is enabled/disabled state.
So, this processes as follows:
- Retrieve WideiP list
Start Loop 1:
For each WideIP --> get poolnames
Start Loop 2:
For each Poolname
--> get poolmembers
Start Loop 3:
For each poolmember
--> get VirtualServer states
End Loop 3
End Loop 2
End Loop 1
This results in many HTTP/Soap requests hitting the GTM very quickly. Is there a better way to do this?
11 Replies
- That's what the eval section of the code is supposed to do. It inserts the authentication headers in the first request (if you have a new enough version of SOAP::Lite. The issue with your code is that you are adding the headers to the $Rule object and not the $WIDEIP object that you are using.
Give this a try:$WIDEIP = SOAP::Lite -> uri('urn:iControl:GlobalLB/WideIP') -> proxy("$sProtocol://$sHost:$sPort/iControl/iControlPortal.cgi"); eval { $WIDEIP->transport->http_request->header ( 'Authorization' => 'Basic ' . MIME::Base64::encode("$sUID:$sPWD", '') ); };
-Joe
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
