Query: mon::snmp
OS: debian
Section: 3pm
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
Mon::SNMP(3pm) User Contributed Perl Documentation Mon::SNMP(3pm)NAMEMon::SNMP - decode SNMP trapSYNOPSISuse Mon::SNMP; $trap = new Mon::SNMP; $trap->buffer($snmptrap); %traphash = $trap->decode; $error = $trap->error;DESCRIPTIONMon::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.METHODSnew 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, ... }ERRORSAll methods return a hash with no elements upon errors which they detect, and the detail of the error is available from theEXAMPLESuse 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) "; }ENVIRONMENTNone.SEE ALSOGraham Barr's Convert::BER module.NOTESCAVEATSMon::SNMP depends upon Convert::BER to do the real work. perl v5.14.2 2012-04-27 Mon::SNMP(3pm)
Related Man Pages |
---|
snmptrap(1) - osx |
snmptrap(1) - redhat |
snmptrap(1) - v7 |
snmpinform(1) - x11r4 |
mon::snmp(3pm) - debian |
Similar Topics in the Unix Linux Community |
---|
SNMP log dump |
SNMP Traps |
How do i set time in 24 hour format? |
SNMP installation |
SNMP - what am I seeing? |