SNMP::Info::Layer2::HP - SNMP Interface to HP Procurve Switches
Provides abstraction to the configuration information obtainable from a HP device through SNMP. Information is stored in a number of MIB's such as IF-MIB, ENTITY-MIB, RFC1271-MIB, HP-ICF-OID, MAU-MIB
MIBs required:
HP MIBs can be found at http://www.hp.com/rnd/software
Max Baker (max@warped.org)
max@warped.org
my $hp = new SNMP::Info::Layer2::HP(DestHost => 'router' , Community => 'public' );
Arguments passed to new() are passed on to SNMP::Session::new()
my $hp = new SNMP::Info::Layer2::HP( DestHost => $host, Community => 'public', Version => 3,... ) die "Couldn't connect.\n" unless defined $hp;
Sets or returns the SNMP::Session object
# Get my $sess = $hp->session(); # Set my $newsession = new SNMP::Session(...); $hp->session($newsession);
Runs each of the HP List methods and returns a hash reference.
$hp->all() will call $hp->load_all() once and then return cahced valued. Use $hp->load_all() to reload from the device.
(modulePortStatus)
ftp://ftp.cisco.com/pub/mibs/supportlists/wsc5000/wsc5000-communityIndexing.html
To install SNMP::Info, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SNMP::Info
CPAN shell
perl -MCPAN -e shell install SNMP::Info
For more information on module installation, please visit the detailed CPAN module installation guide.