Forum Discussion
Anthony_Gerace_
Aug 12, 2004Historic F5 Account
How to get monitor information ?
I have a customer that is currently using BIG-IP version 4.2, with plans "some day" to go to version 4.5 . Are there any methods available to get detailed information about a specific monitor. I've ...
Anthony_Gerace_
Oct 18, 2004Historic F5 Account
Hi!
I am attempting to use the get_template_string_property method on version 4.5 to return the send string of a specific monitor and receive nothing back for a send string. What am I doing wrong?
Thanks for your help.
Anthony
!/usr/bin/perl
----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Soap
use SOAP::Lite + trace => qw(method debug);
use SOAP::Lite;
-----------------------------------------------------------------------------
----------------------------------------------------------------------------
Validate Arguments
----------------------------------------------------------------------------
$sHost = $ARGV[0];
$sUID = "a347404";
$sPWD = $ARGV[1];
$sNode = "10.201.95.100:80";
chomp($sHost);
chomp($sPWD);
chomp($sNode);
----------------------------------------------------------------------------
Transport Information
----------------------------------------------------------------------------
sub SOAP::Transport::HTTP::Client::get_basic_credentials
{
return "$sUID" => "$sPWD";
}
$mont2 = SOAP::Lite
-> uri('urn:iControl:ITCMLocalLB/Monitor2')
-> proxy("https://$sHost/iControl/iControlPortal.cgi");
($address,$port) = split(/\:/,$sNode);
$srv->{address} = $address;
$srv->{port} = $port;
$node_def->{ipport} =$srv;
$node_def->{address_type} = 3;
$mont2_response = $mont2->get_monitor_information(
SOAP::Data->name(node_definition => $node_def) );
$output = $mont2_response->result;
$tmp = $output->{monitor_association};
$ser = $tmp->{node_definition};
$ms = $ser->{ipport};
$serv = $ms->{address} . ":" . $ms->{port};
@names = @{$tmp->{template_names}};
print "Monitor is: @names\n";
$str = "2";
$mont2_response = $mont2->get_template_string_property(
SOAP::Data->name(template_name => $names[0]),
SOAP::Data->name(property_type => 1) );
if ($mont2_response->fault) {
print $mont2_response->faultcode, " ", $mont2_response->faultstring, "\n";
exit();
} if display fault
@sendStr = @{$mont2_response->result};
print "Send String is: @sendStr\n";
$mont2_response = $mont2->get_template_integer_property(
SOAP::Data->name(template_name => $names[0]),
SOAP::Data->name(property_type => 1) );
if ($mont2_response->fault) {
print $mont2_response->faultcode, " ", $mont2_response->faultstring, "\n";
exit();
} if display fault
$MonInt = $mont2_response->result;
$mont2_response = $mont2->get_template_integer_property(
SOAP::Data->name(template_name => $names[0]),
SOAP::Data->name(property_type => 2) );
$MonTime = $mont2_response->result;
print "Monitor @names has interval of: $MonInt and timeout of: $MonTime\n";
Output:
Monitor is: access-http
Send String is:
Monitor access-http has interval of: 7 and timeout of: 21
monitor access-http {
type http
use "http"
interval 7
timeout 21
dest *:*
send "GET /index.html HTTP/1.0"
recv ""
username ""
password ""
}
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