Forum Discussion
jj24_43946
Jun 13, 2011Nimbostratus
Help with LocalLB::Monitor::create_template
Hi, I'm trying to do two things with iControl using Perl:
1) Create a monitor template
2) Set the attributes of the template
In advance I'll say that I'm not too hot at crea...
Jun 13, 2011
Instead of digging through your code, I'll take the easy way out and toss along some code that has worked for me in the past. Let me know if it doesn't work and I'll try to dig into yours a bit more:Hope this helps out. Again, let me know if not, and I'll see what I can do to get yours working for you...-Joe
sub createMonitorTemplate()
{
$MonitorTemplate = {
template_name => "joestemplate",
template_type => "TTYPE_ICMP"
};
$IPPortDefinition = {
address => "10.10.10.10",
port => 80
};
$MonitorIPPort = {
address_type => "ATYPE_STAR_ADDRESS",
ipport => $IPPortDefinition
};
$CommonAttributes = {
parent_template => 'icmp',
interval => '60',
timeout => '15',
dest_ipport => $MonitorIPPort,
is_read_only => "false",
is_directly_usable => "true"
};
print "Creating Monitor Template...\n";
$soapResponse = $Monitor->create_template(
SOAP::Data->name(templates => [$MonitorTemplate]),
SOAP::Data->name(template_attributes => [$CommonAttributes])
);
&checkResponse($soapResponse);
}
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