Unix and Linux Discussions Tagged with trap |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
6 |
15,757 |
UNIX for Advanced & Expert Users |
|
|
|
3 |
9,712 |
Shell Programming and Scripting |
|
|
|
5 |
3,751 |
Programming |
|
|
|
2 |
2,650 |
Shell Programming and Scripting |
|
|
|
4 |
3,343 |
UNIX for Advanced & Expert Users |
|
|
|
3 |
2,229 |
Shell Programming and Scripting |
|
|
|
11 |
11,773 |
Shell Programming and Scripting |
|
|
|
5 |
3,332 |
Solaris |
|
|
|
4 |
7,746 |
Infrastructure Monitoring |
|
|
|
3 |
2,433 |
Shell Programming and Scripting |
|
|
|
11 |
13,221 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
122,822 |
Linux |
|
|
|
1 |
11,215 |
Shell Programming and Scripting |
|
|
|
3 |
4,388 |
Shell Programming and Scripting |
|
|
|
5 |
14,735 |
Shell Programming and Scripting |
|
|
|
0 |
3,566 |
Infrastructure Monitoring |
|
|
|
4 |
3,113 |
Shell Programming and Scripting |
|
|
|
3 |
8,154 |
Shell Programming and Scripting |
|
|
|
2 |
7,709 |
Shell Programming and Scripting |
|
|
|
2 |
8,708 |
Programming |
|
|
|
3 |
7,061 |
Shell Programming and Scripting |
|
|
|
1 |
4,997 |
Shell Programming and Scripting |
|
|
|
2 |
4,036 |
Shell Programming and Scripting |
|
|
|
6 |
2,282 |
Shell Programming and Scripting |
|
|
|
5 |
6,796 |
Shell Programming and Scripting |
|
|
|
2 |
6,531 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
2,223 |
Shell Programming and Scripting |
|
|
|
2 |
41,815 |
IP Networking |
|
|
|
4 |
12,533 |
Shell Programming and Scripting |
|
|
|
1 |
3,722 |
Shell Programming and Scripting |
|
|
|
3 |
19,994 |
Shell Programming and Scripting |
|
|
|
4 |
8,716 |
Solaris |
|
|
|
0 |
6,928 |
Solaris |
|
|
|
0 |
12,268 |
IP Networking |
|
|
|
4 |
1,853 |
Shell Programming and Scripting |
|
|
|
3 |
10,430 |
Filesystems, Disks and Memory |
|
|
|
1 |
8,908 |
Shell Programming and Scripting |
|
|
|
1 |
3,421 |
Shell Programming and Scripting |
|
|
|
3 |
14,555 |
Shell Programming and Scripting |
|
|
|
1 |
5,797 |
UNIX for Advanced & Expert Users |
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)