Infoblox::DTC::Monitor::SNMP - A DTC SNMP Health Monitor object.
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.
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.
This section describes all the methods in a Session module that you can apply to a DTC SNMP Monitor object
Use this method to add an object to the Infoblox appliance. See Infoblox::Session->add() for parameters and return values.
#construct an object my $snmp_monitor = Infoblox::DTC::Monitor::SNMP->new( name => 'snmp_monitor1', );
#submit for addition my $response = $session->add($snmp_monitor);
Use this method to retrieve all the matching objects from the Infoblox appliance. See Infoblox::Session->get() for parameters and return values.
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.
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' } );
Use this method to modify an object in the Infoblox appliance. See Infoblox::Session->modify() for parameters and return values.
#Use method to modify the comment. $snmp_monitor->comment('this is a modified comment'); #Submit modification my $response = $session->modify($snmp_monitor);
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.
#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);
Use this method to search for objects in the Infoblox appliance. See Infoblox::Session->search() for parameters and return values.
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.
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' } );
This section describes all the methods that you can use to set or retrieve the attribute values of the object.
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.
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_monitor->comment();
#modify comment value $snmp_monitor->comment('desired comment');
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.
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 community value my $community = $snmp_monitor->community();
#modify community value $snmp_monitor->community('desired community');
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.
The valid value is a context in string format (UTF-8) with a maximum of 1023 characters.
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 context value my $context = $snmp_monitor->context();
#modify context value $snmp_monitor->context('desired_context');
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.
The valid value is an engine identifier in string format (UTF-8) with a maximum of 1023 characters.
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 engine identifiervalue my $engine identifier= $snmp_monitor->engine_id();
#modify engine identifiervalue $snmp_monitor->engine_id('desired_engine_id');
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.
Valid value is a hash reference containing the names of extensible attributes and their associated values (Infoblox::Grid::Extattr objects).
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 extattrs value my $ref_extattrs = $snmp_monitor->extattrs();
#Modify extattrs $snmp_monitor->extattrs({ 'Site' => $extattr1, 'Administrator' => $extattr2 });
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.
For valid values for extensible attributes, see Infoblox::Grid::ExtensibleAttributeDef/Extensible Attribute Values.
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 extensible attributes my $ref_extensible_attributes = $snmp_monitor->extensible_attributes();
#Modify extensible attributes $snmp_monitor->extensible_attributes({'Site' => 'Santa Clara', 'Administrator' => ['Peter', 'Tom']});
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.
The valid value is an unsigned 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 interval value my $interval = $snmp_monitor->interval();
#modify interval value $snmp_monitor->interval(10);
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.
The valid value is a desired name in string format.
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 name value my $name = $snmp_monitor->name();
#modify name value $snmp_monitor->name('snmp_monitor1');
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.
The valid value is an array of an Infoblox::DTC::Monitor::SNMP::OID objects.
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 oids value my $oids = $snmp_monitor->oids();
#modify oids value $snmp_monitor->oids([$oid1, $oid2]);
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.
The valid value is an unsigned integer between 1 and 65535.
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 port value my $port = $snmp_monitor->port();
#modify port value $snmp_monitor->port(8080);
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.
The valid value is an unsigned integer between 1 and 10.
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 retry_down value my $retry_down = $snmp_monitor->retry_down();
#modify retry_down value $snmp_monitor->retry_down(3);
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.
The valid value is an unsigned integer between 1 and 10.
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 retry_up value my $retry_up = $snmp_monitor->retry_up();
#modify retry_up value $snmp_monitor->retry_up(3);
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.
The valid value is an unsigned integer between 1 and 15.
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 timeout value my $timeout = $snmp_monitor->timeout();
#modify timeout value $snmp_monitor->timeout(7);
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.
The valid value is an Infoblox::Grid::SNMP::User object name.
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 user value my $user = $snmp_monitor->user();
#modify user value $snmp_monitor->user('user1');
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.
The valid values are 'V1', 'V2C' and 'V3'.
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 version value my $version = $snmp_monitor->version();
#modify version value $snmp_monitor->version('V1');
Infoblox Inc. http://www.infoblox.com/
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 (c) 2017 Infoblox Inc.