Forum Discussion
ltaylor510_5583
Nimbostratus
Sep 18, 2008Perl script to display All BigIP pool members
I have a Perl CGI application in apache that will need a perl script to display all the available elements in one script:
("poolname" "address" "port" "session_state" "priority_group")
preferably in a toggle script under the showPoolMembers() subroutine.
I see the get_priority() method is only listed as a java method. Is there a perl equivalent that could list all of these elements in one script?
thanks in advance for any help.
24 Replies
- Thomas_LE_GENTI
Nimbostratus
Hi !
I changed a little bit the code given above, but the redefinition of the typecast isn't working with nagios.
I have this error :
**ePN /usr/local/nagios/libexec//check_F5.pl: "Use of uninitialized value in string eq at (eval 135) line 66,
and here is the part :sub SOAP::Deserializer::typecast { my ($self, $value, $name, $attrs, $children, $type) = @_; my $retval = undef; if ( ($type ne undef) && ("{urn:iControl}Common.EnabledState" eq $type) )here is line 66 { $retval = $value; } return $retval; }
I think it's because sometimes the $type variable is empty, and it cannot evaluate with anything in nagios.
What could I do in order to get the problem solved ?
thanks ! - hwidjaja_37598
Altostratus
Give this a try:sub SOAP::Deserializer::typecast { my ($self, $value, $name, $attrs, $children, $type) = @_; my $retval = undef; if ($type ne undef) { $retval = $value if ("{urn:iControl}Common.EnabledState" eq $type); } return $retval; } - Thomas_LE_GENTI
Nimbostratus
in the continuity of my script, I still have the error :
SOAP-ENV:Client Unknown method "{urn:iControl:System:Failover}:get_failover_state"
I think it's comming from :sub SOAP::Deserializer::typecast { my ($self, $value, $name, $attrs, $children, $type) = @_; my $retval = undef; if ( (defined $type) && ("{urn:iControl}LocalLB.MonitorStatus" eq $type) ) { $retval = $value; } if ( (defined $type) && ("{urn:iControl:System:Failover}FailoverState" eq $type) ) { $retval = $value; } return $retval; }
I'm not sure how to modify the {urn:iControl:System:Failover}FailoverState in order to kill the error ...
any idea ?
tal - I think you got this answered in the other thread. The unknown method error comes from the "uri" attribute of the SOAP object you create. You'll need a slash between "System" and "Failover", not a colon.
-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