Infoblox::DTC::Monitor::SNMP::OID - a DTC SNMP Monitor OID object.


NAME

Infoblox::DTC::Monitor::SNMP::OID - a DTC SNMP Monitor OID object.


DESCRIPTION

SNMP is stateless request-response protocol for monitoring and managing devices on network. SNMP agent (software running on monitored server) exposes management data in form of variables. Each variable associated with a uniq id called OID.


CONSTRUCTOR

 my $snmp_oid = Infoblox::DTC::Monitor::SNMP::OID->new(
     oid       => $string,                                   # Required
     comment   => $string,                                   # Optional / Default is undefined
     type      => 'STRING' | 'INTEGER',                      # Optional / Default is 'STRING'
     condition => 'ANY' | 'EXACT' | 'LEQ' | 'GEQ' | 'RANGE', # Optional / Default is 'ANY'
     first     => $string,                                   # Optional / Default is undefined
     last      => $string,                                   # Optional / Default is undefined
 );


SESSION METHODS

The object does not support any session methods.


MODULE METHODS

The following functions can be applied to a DTC SNMP Monitor OID object.

Infoblox::DTC::Monitor::SNMP->oids( )

Use this method to set or retrieve the list of OIDs for SNMP monitoring. See Infoblox::DTC::Monitor::SNMP->oids() for parameters and return values.

Example
 #Get snmp_oid value
 my $snmp_oid = $snmp_monitor->snmp_oid();
 #Modify bind_check_snmp_oid
 $snmp_monitor->snmp_oid([$snmp_oids]);


METHODS

comment( )

Use this method to set or retrieve the comment for a DTC SNMP Health Monitor OID 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_oid->comment();
 #modify comment value
 $snmp_oid->comment('desired comment');

condition( )

Use this method to set or retrieve the condition for validating the result of a SNMP health check.

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

Parameter

The following conditions can be applied to result check:

    'ANY' accepts any response.
    'EXACT' accepts result equal to 'first'
    'LEQ' accepts result which is less than 'first'
    'GEQ' accepts result which is greater than 'first'
    'RANGE' accepts result value of which is between 'first' and 'last'

The default value is 'ANY'.

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 condition value
 my $condition = $snmp_oid->condition();
 #modify condition value
 $snmp_oid->condition('RANGE');

first( )

Use this method to set or retrieve the condition's first term to match against the SNMP health check result.

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

Parameter

The valid value is a string or integer both 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 first value
 my $first = $snmp_oid->first();
 #modify first value
 $snmp_oid->first('first_value');

last( )

Use this method to set or retrieve the condition's second term to match against the SNMP health check result with 'RANGE' condition.

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

Parameter

The valid value is a string or integer both 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 last value
 my $last = $snmp_oid->last();
 #modify last value
 $snmp_oid->last('1000');

oid( )

Use this method to set or retrieve the SNMP OID value for DTC SNMP monitor health checks.

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

Parameter

The valid value is an OID 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 oid value
 my $oid = $snmp_oid->oid();
 #modify oid value
 $snmp_oid->oid('sampleoid.1.1.1.1.2);
 

type( )

Use this method to set or retrieve the condition's value type for DTC SNMP monitor health check results.

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

Parameter

The valid values are 'STRING' and '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 type value
 my $type = $snmp_oid->type();
 #modify type value
 $snmp_oid->type('INTEGER');


AUTHOR

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


SEE ALSO

Infoblox::DTC::Monitor::SNMP, Infoblox::DTC::Monitor::SNMP->oids()


COPYRIGHT

Copyright (c) 2017 Infoblox Inc.