Forum Discussion
Ian_McKenna_113
Nimbostratus
Jun 28, 2006Removing Monitors from Pools
Hello,
can anybody tell me, if it is possible to remove
a specific monitor from a pool?
The interface "remove_monitor_association" removes
all my monitors.
Thanks in adv...
Ian_McKenna_113
Nimbostratus
Jun 29, 2006Thanks Joe,
I'll try this.
Could you please tell me why I am getting an "500 Internal Server Error" with this code. I think it should be correct.
Thanks in advance
Ian
-----------------------------------
package SAM::Tool::BigIP::POOL::addPoolMonitor;
use strict;
use warnings;
use SAM::Syntax;
use SAM::System;
use SAM::Tool::Status qw(user);
use SOAP::Lite;
use MIME::Base64;
use iControlTypeCast;
my $sHost = shift @_;
my $sPort = shift @_;
my $sUID = shift @_;
my $sPWD = shift @_;
my $sPoolName = shift @_;
my $sMonitor = shift @_;
my $sProtocol = "https";
SOAP::Transport::HTTP::Client::get_basic_credentials($sUID,$sPWD);
sub SOAP::Transport::HTTP::Client::get_basic_credentials
{
my $uid_ref = shift;
my $pwd_ref = shift;
return "$uid_ref" => "$pwd_ref";
}
if ( ("80" eq $sPort) or ("8080" eq $sPort) )
{
$sProtocol = "http";
}
my $PoolCreate = SOAP::Lite
-> uri('urn:iControl:LocalLB/Pool')
-> proxy("$sProtocol://$sHost:$sPort/iControl/iControlPortal.cgi");
eval { $PoolCreate->transport->http_request->header
(
'Authorization' =>
'Basic ' . MIME::Base64::encode("$sUID:$sPWD", '')
); };
$sPoolName = "TestPoool";
my $attribute = { type => "MONITOR_RULE_TYPE_SINGLE" , quorum => 0, monitor_templates => "testmonitor" };
my $Monitor = { pool_name => $sPoolName , monitor_rule => $attribute };
---------------- idev -------
my $soapResponse = $PoolCreate->set_monitor_association(
SOAP::Data->name( monitor_associations => [$Monitor] )
);
&checkResponse($soapResponse);
}
sub checkResponse()
{
my ($soapResponse) = (@_);
if ( $soapResponse->fault )
{
print $soapResponse->faultcode, " ", $soapResponse->faultstring,
"\n";
exit();
}
}
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