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


NAME

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


DESCRIPTION

The DTC SNMP Health Monitor determines the health of SNMP servers such as SNMP Proxies and Session Border Controllers, and SNMP gateways by issuing SNMP options to a server and examining the response provided by the server. The service is considered available if the received response matches the expected response.


CONSTRUCTOR

 my $snmp_monitor = Infoblox::DTC::Monitor::SNMP->new(
    name                  => $string,                                                               #Required
    comment               => $string,                                                               #Optional / Default is undefined
    community             => $string,                                                               #Optional / Default is 'public'
    interval              => $uint,                                                                 #Optional / Default is 5
    oids                  => [$oid1, $oid2, ...],                                                   #Optional / Default is empty list
    port                  => $uint,                                                                 #Optional / Default is 161
    retry_down            => $uint,                                                                 #Optional / Default is 1
    retry_up              => $uint,                                                                 #Optional / Default is 1
    timeout               => $uint,                                                                 #Optional / Default is 15
    version               => 'V1' | 'V2C' | 'V3',                                                   #Optional / Default is 'V2C'
    context               => $string,                                                               #Optional / Default is undefined
    engine_id             => $string,                                                               #Optional / Default is undefined
    user                  => $string,                                                               #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 SNMP 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 $snmp_monitor = Infoblox::DTC::Monitor::SNMP->new(
    name  => 'snmp_monitor1',
 );
 #submit for addition
 my $response = $session->add($snmp_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 SNMP Monitor name in string format.
  comment               - Optional. A DTC SNMP Monitor descriptive comment.
  engine_id             - Optional. A DTC SNMPv3 Monitor engine identifier.
  context               - Optional. A DTC SNMPv3 Monitor context.
  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::SNMP',
     name   => 'snmp_monitor1',
 );
 my @retrieved_objs = $session->get(
     object => 'Infoblox::DTC::Monitor::SNMP',
     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.
 $snmp_monitor->comment('this is a modified comment');
 #Submit modification
 my $response = $session->modify($snmp_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::SNMP',
     name   => 'snmp_monitor1',
 );
 #Find the desired object from the retrieved list.
 my $desired_snmp_monitor = $retrieved_objs[0];
 #Submit for removal
 my $response = $session->remove($desired_snmp_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 SNMP Monitor name in string format (regexp).
  comment               - Optional. A DTC SNMP Monitor descriptive comment (regexp).
  engine_id             - Optional. A DTC SNMPv3 Monitor engine identifier (regexp).
  context               - Optional. A DTC SNMPv3 Monitor context (regexp).
  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::SNMP',
     name   => 'snmp_monitor1',
 );
 my @retrieved_objs = $session->search(
     object => 'Infoblox::DTC::Monitor::SNMP',
     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 the comment for a DTC SNMP Health Monitor object.

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 = $snmp_monitor->comment();
 #modify comment value
 $snmp_monitor->comment('desired comment');

community( )

Use this method to set or retrieve the SNMP community string for a SNMP authentication.

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 community value
 my $community = $snmp_monitor->community();
 #modify community value
 $snmp_monitor->community('desired community');

context( )

Use this method to set or retrive the SNMPv3 context.

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

Parameter

The valid value is a context in string format (UTF-8) with a maximum of 1023 characters.

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 context value
 my $context = $snmp_monitor->context();
 #modify context value
 $snmp_monitor->context('desired_context');

engine_id( )

Use this method to set or retrive the SNMPv3 engine identifier.

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

Parameter

The valid value is an engine identifier in string format (UTF-8) with a maximum of 1023 characters.

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 engine identifiervalue
 my $engine identifier= $snmp_monitor->engine_id();
 #modify engine identifiervalue
 $snmp_monitor->engine_id('desired_engine_id');

extattrs( )

Use this method to set or retrieve the extensible attributes associated with a DTC SNMP 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 = $snmp_monitor->extattrs();
 #Modify extattrs
 $snmp_monitor->extattrs({ 'Site' => $extattr1, 'Administrator' => $extattr2 });

extensible_attributes( )

Use this method to set or retrieve the extensible attributes associated with a DTC SNMP 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 = $snmp_monitor->extensible_attributes();
 #Modify extensible attributes
 $snmp_monitor->extensible_attributes({'Site' => 'Santa Clara', 'Administrator' => ['Peter', 'Tom']});

interval( )

Use this method to set or retrieve the time interval for the SNMP 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 = $snmp_monitor->interval();
 #modify interval value
 $snmp_monitor->interval(10);

name( )

Use this method to set or retrieve a DTC SNMP 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 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 = $snmp_monitor->name();
 #modify name value
 $snmp_monitor->name('snmp_monitor1');

oids( )

Use this method to set or retrieve the list of OIDs for SNMP monitoring.

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

Parameter

The valid value is an array of an Infoblox::DTC::Monitor::SNMP::OID 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 oids value
 my $oids = $snmp_monitor->oids();
 #modify oids value
 $snmp_monitor->oids([$oid1, $oid2]);

port( )

Use this method to set or retrieve the port value for SNMP or SNMPS 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 = $snmp_monitor->port();
 #modify port value
 $snmp_monitor->port(8080);

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 unavailable.

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 = $snmp_monitor->retry_down();
 #modify retry_down value
 $snmp_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 = $snmp_monitor->retry_up();
 #modify retry_up value
 $snmp_monitor->retry_up(3);

timeout( )

Use this method to set or retrieve the value of a timeout for SNMP 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 = $snmp_monitor->timeout();
 #modify timeout value
 $snmp_monitor->timeout(7);

user( )

Use this method to set or retrieve the SNMPv3 user setting.

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

Parameter

The valid value is an Infoblox::Grid::SNMP::User object name.

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 user value
 my $user = $snmp_monitor->user();
 #modify user value
 $snmp_monitor->user('user1');

version( )

Use this method to set or retrieve the SNMP protocol version for the SNMP health check.

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

Parameter

The valid values are 'V1', 'V2C' and 'V3'.

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 version value
 my $version = $snmp_monitor->version();
 #modify version value
 $snmp_monitor->version('V1');


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, Infoblox::DTC::Monitor::SNMP::OID, Infoblox::Grid::SNMP::User


COPYRIGHT

Copyright (c) 2017 Infoblox Inc.