Infoblox::DTC::Monitor::SNMP::OID - a DTC SNMP Monitor OID object.
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.
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 );
The object does not support any session methods.
The following functions can be applied to a DTC SNMP Monitor OID object.
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.
#Get snmp_oid value my $snmp_oid = $snmp_monitor->snmp_oid(); #Modify bind_check_snmp_oid $snmp_monitor->snmp_oid([$snmp_oids]);
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.
The valid value is a comment in string format (UTF-8) with a maximum of 256 bytes.
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.
#get comment value my $comment = $snmp_oid->comment();
#modify comment value $snmp_oid->comment('desired comment');
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.
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'.
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.
#get condition value my $condition = $snmp_oid->condition();
#modify condition value $snmp_oid->condition('RANGE');
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.
The valid value is a string or integer both in string format (UTF-8) with a maximum of 256 bytes.
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.
#get first value my $first = $snmp_oid->first();
#modify first value $snmp_oid->first('first_value');
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.
The valid value is a string or integer both in string format (UTF-8) with a maximum of 256 bytes.
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.
#get last value my $last = $snmp_oid->last();
#modify last value $snmp_oid->last('1000');
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.
The valid value is an OID in string format (UTF-8) with a maximum of 256 bytes.
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.
#get oid value my $oid = $snmp_oid->oid();
#modify oid value $snmp_oid->oid('sampleoid.1.1.1.1.2);
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.
The valid values are 'STRING' and 'INTEGER'.
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.
#get type value my $type = $snmp_oid->type();
#modify type value $snmp_oid->type('INTEGER');
Infoblox Inc. http://www.infoblox.com/
Infoblox::DTC::Monitor::SNMP, Infoblox::DTC::Monitor::SNMP->oids()
Copyright (c) 2017 Infoblox Inc.