perl Net::SNMP version getting info from cisco switch
I am having trouble working with SNMP module with perl. I am trying to get SNMP version of target system. I use following code to get it however it resturns error as "Argument "v6.0.1" isn't numeric in numeric lt (<) at ./chk_env_upd.pl line 447."
Hi,
I installed Ubnutu on my old laptop which does have COMM port, I want to connect to Cisco switch, I have Cisco cable connected to laptop.
On Windows, I usually bring up "Hyper Terminal" how do I do it here?
Please advice. Thanks. (7 Replies)
Happy ThanksGiving guys,
I'm working on a script that will use nmap to enumerate a network for active cisco switches. Once the list is complete, we use sed to clean up the file (called nmapres) so it is only a list of IP addresses. Next I want to use a while statement to go down that list of... (6 Replies)
I am trying to install net-snmp on an HPUX box. I am getting the fallowing error message when I try to run the snmpconf file. I installed the fallowing version of
net-snmp
net-snmp-5.0.10.2-HP-UX_B.11.11_9000_800.tar and my
HPUX box is version
HP-UX commnms B.11.11 U 9000/800... (2 Replies)
I am writing perl script to configure Cisco device but Variables inside Net::Telnet::Cisco Module doesn't work and passed to device without resolving.
Please advise.
here is a sample of script:
use Net::Telnet::Cisco;
$device = "10.14.199.1";
($o1, $o2, $o3, $o4) = split(/\./,$device);... (5 Replies)
Hi experts,
I need to cope configuration from one switch/firewall to another switch/firewall.
I have copied running configs.
The question is do I have to clear the existing configuration on the dest. devices
Or can I copy it(replace) directly without clearing previous config ?
If... (2 Replies)
Hello all!
I am running Nagios 3.3.1 and I am trying to get it to monitor the ports on my Cisco Catalyst 3524-XL-PWR Managed Switch. But I keep getting "(Return code of 127 is out of bounds - plugin may be missing)" I have installed and compiled the plugins and the snmp services on the Ubuntu... (0 Replies)
Hi all,
Error occurred while making the net-snmp-5.4.4 on Solaris 5.10 version.
Environment
- Solaris 5.10-x86
- Net-SNMP-5.4.4.tar.gz
- Path (/etc/profile)
PATH=/usr/local/bin:$PATH
export PATH
LD_LIBRARY_PATHUSR=/usr/ccs/bin:
export LD_LIBRARY_PATH
Error01 - summary
***... (3 Replies)
Discussion started by: ziosnim
3 Replies
LEARN ABOUT DEBIAN
mon::snmp
Mon::SNMP(3pm) User Contributed Perl Documentation Mon::SNMP(3pm)NAME
Mon::SNMP - decode SNMP trap
SYNOPSIS
use Mon::SNMP;
$trap = new Mon::SNMP;
$trap->buffer($snmptrap);
%traphash = $trap->decode;
$error = $trap->error;
DESCRIPTION
Mon::SNMP provides methods to decode SNMP trap PDUs. It is based on Graham Barr's Convert::BER module, and its purpose is to provide SNMP
trap handling to "mon".
It is not complete, so don't bother trying to use it unless you are ready to debug and write some code.
METHODS
new creates a new Mon::SNMP object.
buffer ( buffer )
Assigns a raw SNMP trap message to the object.
decode
Decodes a SNMP trap message, and returns a hash of the variable assignments for the SNMP header and trap protocol data unit of the
associated message. The hash consists of the following members:
version => SNMP version(1)
community => community string
ent_OID => enterprise OID of originating agent
agentaddr => IP address of originating agent
generic_trap => /COLDSTART|WARMSTART|LINKDOWN|LINKUP|AUTHFAIL|EGPNEIGHBORLOSS|ENTERPRISESPECIFIC/
specific_trap => specific trap type (integer)
timeticks => timeticks (integer)
varbindlist => { oid1 => value, oid2 => value, ... }
ERRORS
All methods return a hash with no elements upon errors which they detect, and the detail of the error is available from the
EXAMPLES
use Mon::SNMP;
$trap = new Mon::SNMP;
$trap->buffer($snmptrap);
%traphash = $trap->decode;
foreach $oid (keys $traphash{"varbindlist"}) {
$val = $traphash{"varbindlist"}{$oid};
print "oid($oid) = val($val)
";
}
ENVIRONMENT
None.
SEE ALSO
Graham Barr's Convert::BER module.
NOTES CAVEATS
Mon::SNMP depends upon Convert::BER to do the real work.
perl v5.14.2 2012-04-27 Mon::SNMP(3pm)