Hi,
I've just moved up to Net-SNMP 2.4rc2 (from 5.1.2) to use the embedded
perl traphandler.
I've been using the normal traphandling capabilities so far. There, the
trap values were passed simply:
OID value (no quotes or anything else)
Now, with TrapReceiver, I get values that contain the type and quotes,
as shown below: (I used the little program that comes with the distribution)
********** PERL RECEIVED A NOTIFICATION:
PDU INFO:
notificationtype TRAP
receivedfrom UDP: [205.236.40.165]:1027
version 1
errorstatus 0
messageid 0
community public
transactionid 892
errorindex 0
requestid 357155934
VARBINDS:
DISMAN-EVENT-MIB::sysUpTimeInstance type=67 value=Timeticks:
(54023610) 6 days, 6:03:56.10
SNMPv2-MIB::snmpTrapOID.0 type=6 value=OID:
COLUBRIS-SYSLOG-MIB::syslogSeverityNotification
COLUBRIS-SYSLOG-MIB::syslogMsgNumber.0 type=66 value=Gauge32: 147170
COLUBRIS-SYSLOG-MIB::syslogMsgFacility.0 type=4 value=STRING: "daemon"
COLUBRIS-SYSLOG-MIB::syslogMsgSeverity.0 type=2 value=INTEGER: 9
COLUBRIS-SYSLOG-MIB::syslogMsgText.0 type=4 value=STRING: "webauth:
Cannot find NOC certificate - disabling NOC authentication."
Note that the documentation says: (from the man page for
NetSNMP::TrapReceiver)
********** PERL RECEIVED A NOTIFICATION:
PDU INFO:
notificationtype TRAP
receivedfrom 127.0.0.1
version 1
errorstatus 0
messageid 0
community mycommunity
transactionid 2
errorindex 0
requestid 765160220
VARBINDS:
sysUpTimeInstance type=67 value=0:0:00:00.00
snmpTrapOID.0 type=6 value=linkUp
ifIndex.1 type=2 value=1
ifAdminStatus.1 type=2 value=1
ifOperStatus.1 type=2 value=1
ifDescr type=4 value="eth0"
I'm running snmptrapd without options (at least output options) and
there are no format statements in the conf files.
I figure there must be an easy way (some SNMP function) to parse these
values (the canonical values), and separate the actual data from the
type and formatting information?
I am just not familiar enough with the Net-SNMP to figure it out.
Thanks very much.
Mike
begin:vcard
fn:Mike Schmidt
n:Schmidt;Mike
org:Intello Technologies Inc.
adr;quoted-printable;quoted-printable:;;580 1=C3=A8re Rue;Saint-Jean-sur-Richelieu;Qu=C3=A9;J2X 3B4;Canada
email;internet:[EMAIL PROTECTED]
title:Vice-President
tel;work:450-358-2266 x223
tel;cell:514-835-9497
x-mozilla-html:FALSE
url:http://www.intello.com
version:2.1
end:vcard
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users