SNMP::Effective::Host - A SNMP::Effective host class
A host object holds all the information pr. host SNMP::Effective requires. This $host object is available in "THE CALLBACK METHOD" in SNMP::Effective.
$host
Get host address, also overloaded by "$self".
Get SNMP::Session, also overloaded by $$self.
Alias for "session" (because of previous typo). Will be deprecated.
The remaining OIDs to get/set, also overloaded by @$self.
Get a ref to the callback method.
Get/set any data you like. By default, it returns a hash-ref, so you can do:
$host->heap->{'mykey'} = "remember this";
Holds a callback which will be called right before the first request is sent to the target host. The callback recevies $self as the first argument and the SNMP::Effective object as the second.
Holds a callback which will be called after SNMP::Effective is done with the $host object. The callback recevies $self as the first argument and the SNMP::Effective object as the second.
Get/set SNMP::Session args.
$hash_ref = $self->data; $hash_ref = $self->data(\@data0, $ref_oid0, ...);
Get the retrieved data or add more data to the host cache.
@data0 looks like: [ $oid0, $iid0, $value0, $type0 ], where $ref_oid0 is used to figure out the $iid unless specified in @data0. $iid0 will fallback to "1", if everything fails.
@data0
[ $oid0, $iid0, $value0, $type0 ]
$ref_oid0
$iid
$iid0
$self = $class->new($address);
Object constructor. $address can also be an ip-address.
$address
Remove data from the host cache. Will make /data return an empty hash-ref.
/data
See SNMP::Effective
To install SNMP::Effective, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SNMP::Effective
CPAN shell
perl -MCPAN -e shell install SNMP::Effective
For more information on module installation, please visit the detailed CPAN module installation guide.