Infoblox::DTC::Monitor::TCP - A DTC TCP Health Monitor object.


NAME

Infoblox::DTC::Monitor::TCP - A DTC TCP Health Monitor object.


DESCRIPTION

A DTC TCP Health Monitor object.


CONSTRUCTOR

 my $tcp_monitor = Infoblox::DTC::Monitor::TCP->new(
    name                  => $string,                                                               #Required
    comment               => $string,                                                               #Optional / Default is undefined
    interval              => $uint,                                                                 #Optional / Default is undefined
    port                  => $uint,                                                                 #Required
    retry_down            => $uint,                                                                 #Optional / Default is undefined 
    retry_up              => $uint,                                                                 #Optional / Default is undefined
    timeout               => $uint,                                                                 #Optional / Default is undefined
    extattrs              => { $string => $extattr, ... },                                          #Optional / Default is undefined
    extensible_attributes => { $string => $string | $num, $string => [ $string | $num, ... ], ... } #Optional / Default is undefined
 );

You cannot set both extattrs and extensible_attributes attributes at the same time.


SESSION METHODS

This section describes all the methods in a Session module that you can apply to a DTC TCP Monitor object.

Infoblox::Session->add( )

Use this method to add an object to the Infoblox appliance. See Infoblox::Session->add() for parameters and return values.

Example
 #construct an object
 my $tcp_monitor = Infoblox::DTC::Monitor::TCP->new(
    name  => 'tcp_monitor1',
    port  => 15,
 );
 #submit for addition
 my $response = $session->add($tcp_monitor);

Infoblox::Session->get( )

Use this method to retrieve all the matching objects from the Infoblox appliance. See Infoblox::Session->get() for parameters and return values.

Key Reference
 Apply the following attribute to get a specific object:
  name                  - Optional. A DTC TCP Monitor name in a string format.
  comment               - Optional. A DTC TCP Monitor comment.
  extattrs              - Optional. A hash reference containing extensible attributes.
  extensible_attributes - Optional. A hash reference that contains extensible attributes.
Example
 my @retrieved_objs = $session->get(
     object => 'Infoblox::DTC::Monitor::TCP',
     name   => 'tcp_monitor1',
 );
 my @retrieved_objs = $session->get(
     object => 'Infoblox::DTC::Monitor::TCP',
     extensible_attributes => { 'Site' => 'Santa Clara' }
 );

Infoblox::Session->modify( )

Use this method to modify an object in the Infoblox appliance. See Infoblox::Session->modify() for parameters and return values.

Example
 #Use method to modify the comment.
 $tcp_monitor->comment('this is a modified comment');
 #Submit modification
 my $response = $session->modify($tcp_monitor);

Infoblox::Session->remove( )

Use this method to remove an object from the Infoblox appliance. See Infoblox::Session->remove() for parameters and return values.

To remove a specific object, first use get() or search() to retrieve the specific object, and then submit this object for removal.

Example
 #Get the objects with the same name
 my @retrieved_objs = $session->get(
     object => 'Infoblox::DTC::Monitor::TCP',
     name   => 'tcp_monitor1',
 );
 #Find the desired object from the retrieved list.
 my $desired_tcp_monitor = $retrieved_objs[0];
 #Submit for removal
 my $response = $session->remove($desired_tcp_monitor);

Infoblox::Session->search( )

Use this method to search for objects in the Infoblox appliance. See Infoblox::Session->search() for parameters and return values.

Key Reference
 Apply the following attribute to get a specific object:
  name                  - Optional. A DTC TCP Monitor name in a string format.
  comment               - Optional. A DTC TCP Monitor comment.
  extattrs              - Optional. A hash reference containing extensible attributes.
  extensible_attributes - Optional. A hash reference that contains extensible attributes.
Example
 my @retrieved_objs = $session->search(
     object => 'Infoblox::DTC::Monitor::TCP',
     name   => 'tcp_monitor1',
 );
 my @retrieved_objs = $session->search(
     object => 'Infoblox::DTC::Monitor::TCP',
     extensible_attributes => { 'Site' => 'Santa Clara' }
 );


METHODS

This section describes all the methods that you can use to set or retrieve the attribute values of the object.

comment( )

Use this method to set or retrieve a DTC TCP Health Monitor object comment.

Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.

Parameter

The valid value is a comment in string format (UTF-8) with a maximum of 256 bytes.

Returns

If you specified a parameter, the method returns 'true' when the modification succeeds, and returns 'false' when the operation fails.

If you did not specify a parameter, the method returns the attribute value.

Example
 #get comment value
 my $comment = $tcp_monitor->comment();
 #modify comment value
 $tcp_monitor->comment('desired comment');

extattrs( )

Use this method to set or retrieve the extensible attributes associated with a DTC TCP Health Monitor object.

Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.

Parameter

Valid value is a hash reference containing the names of extensible attributes and their associated values (Infoblox::Grid::Extattr objects).

Returns

If you specified a parameter, the method returns 'true' when the modification succeeds, and returns 'false' when the operation fails.

If you did not specify a parameter, the method returns the attribute value.

Example
 #get extattrs value
 my $ref_extattrs = $tcp_monitor->extattrs();
 #Modify extattrs
 $tcp_monitor->extattrs({ 'Site' => $extattr1, 'Administrator' => $extattr2 });

extensible_attributes( )

Use this method to set or retrieve the extensible attributes associated with a DTC TCP Health Monitor object.

Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.

Parameter

For valid values for extensible attributes, see Infoblox::Grid::ExtensibleAttributeDef/Extensible Attribute Values.

Returns

If you specified a parameter, the method returns 'true' when the modification succeeds, and returns 'false' when the operation fails.

If you did not specify a parameter, the method returns the attribute value.

Example
 #Get extensible attributes
 my $ref_extensible_attributes = $tcp_monitor->extensible_attributes();
 #Modify extensible attributes
 $tcp_monitor->extensible_attributes({'Site' => 'Santa Clara', 'Administrator' => ['Peter', 'Tom']});

interval( )

Use this method to set or retrieve the time interval for the TCP health check.

Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.

Parameter

The valid value is an unsigned integer.

Returns

If you specified a parameter, the method returns 'true' when the modification succeeds, and returns 'false' when the operation fails.

If you did not specify a parameter, the method returns the attribute value.

Example
 #get interval value
 my $interval = $tcp_monitor->interval();
 #modify interval value
 $tcp_monitor->interval(10);

name( )

Use this method to set or retrieve a DTC TCP Health Monitor name.

Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.

Parameter

The valid value is a desired name in a string format.

Returns

If you specified a parameter, the method returns 'true' when the modification succeeds, and returns 'false' when the operation fails.

If you did not specify a parameter, the method returns the attribute value.

Example
 #get name value
 my $name = $tcp_monitor->name();
 #modify name value
 $tcp_monitor->name('tcp_monitor1');

port( )

Use this method to set or retrieve the port value for TCP requests.

Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.

Parameter

The valid value is an unsigned integer between 1 and 65535.

Returns

If you specified a parameter, the method returns 'true' when the modification succeeds, and returns 'false' when the operation fails.

If you did not specify a parameter, the method returns the attribute value.

Example
 #get port value
 my $port = $tcp_monitor->port();
 #modify port value
 $tcp_monitor->port(6030);

retry_down( )

Use this method to set or retrieve the number of times the server appears offline after it was online so it is treated as dead.

Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.

Parameter

The valid value is an unsigned integer between 1 and 10.

Returns

If you specified a parameter, the method returns 'true' when the modification succeeds, and returns 'false' when the operation fails.

If you did not specify a parameter, the method returns the attribute value.

Example
 #get retry_down value
 my $retry_down = $tcp_monitor->retry_down();
 #modify retry_down value
 $tcp_monitor->retry_down(3);

retry_up( )

Use this method to set or retrieve the number of times the server appears online after it was offline so it is treated as alive.

Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.

Parameter

The valid value is an unsigned integer between 1 and 10.

Returns

If you specified a parameter, the method returns 'true' when the modification succeeds, and returns 'false' when the operation fails.

If you did not specify a parameter, the method returns the attribute value.

Example
 #get retry_up value
 my $retry_up = $tcp_monitor->retry_up();
 #modify retry_up value
 $tcp_monitor->retry_up(3);

timeout( )

Use this method to set or retrieve the value of a timeout for TCP health check.

Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.

Parameter

The valid value is an unsigned integer between 1 and 15.

Returns

If you specified a parameter, the method returns 'true' when the modification succeeds, and returns 'false' when the operation fails.

If you did not specify a parameter, the method returns the attribute value.

Example
 #get timeout value
 my $timeout = $tcp_monitor->timeout();
 #modify timeout value
 $tcp_monitor->timeout(7);


AUTHOR

Infoblox Inc. http://www.infoblox.com/


SEE ALSO

Infoblox::Session, Infoblox::Session->add(), Infoblox::Session->get(), Infoblox::Session->modify(), Infoblox::Session->remove(), Infoblox::Session->search(), Infoblox::Grid::Extattr, Infoblox::Grid::ExtensibleAttributeDef/Extensible Attribute Values.


COPYRIGHT

Copyright (c) 2017 Infoblox Inc.