BKHariprasad-2463 avatar image
0 Votes"
BKHariprasad-2463 asked BKHariprasad-2463 commented

How to parse SNMP traps in C#?

Hi All,
We have a C# console application built on .Net core. We have requirement to parse SNMP trap in C#. My question is is there any method/class available in to parse below sample SNMP trap?

Sample SNMP trap:

2020-08-04 04:56:45

04:56:44 2020/08/04 PDU INFO:
notificationtype TRAP
version 0
receivedfrom UDP: []:38977->[]:162
errorstatus 0
messageid 0
community admin
transactionid 1056
errorindex 0
requestid 0
DISMAN-EVENT-MIB::sysUpTimeInstance type=67 value=Timeticks: (57947996) 6 days, 16:57:59.96
SNMPv2-MIB::snmpTrapOID.0 type=6 value=OID: IF-MIB::linkUp
IF-MIB::ifIndex.19 type=2 value=INTEGER: 19
IF-MIB::ifAdminStatus.19 type=2 value=INTEGER: 1
IF-MIB::ifOperStatus.19 type=2 value=INTEGER: 1
SNMP-COMMUNITY-MIB::snmpTrapAddress.0 type=64 value=IpAddress:
SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 type=4 value=STRING: "admin"
SNMPv2-MIB::snmpTrapEnterprise.0 type=6 value=OID: SNMPv2-SMI::enterprises.25506.11.1.219

Can anyone please let us know the best way to get this done!!
Any help is appreciated. Thank you in advance!!

Best Regards,

· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

If possible could you please tell me which DLL and class do I need to use?

Best Regards,

0 Votes 0 ·
JackJJun-MSFT avatar image JackJJun-MSFT BKHariprasad-2463 ·

@BKHariprasad-2463, Welcome to Microsoft Q&A, Currently there is no class library to support the SNMP trap related questions in Microsoft, You could do some searches in google, like keyword parse SNMP traps with c#.

Thansk for your understanding.

0 Votes 0 ·
Show more comments

0 Answers