Unable to send SNMP v2 traps by following the tutorial

Disc Magnet <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CALa9zsUrEfG0Cs5LFpQ0qmrFu1y7zBhJZ4=rcjDzrmTQqpC35A@mail.gmail.com>
I am following the tutorial at:
http://www.net-snmp.org/wiki/index.php/TUT:snmptrap#SNMPv2_Traps

I am using NET-SNMP version: 5.7.

I was able to successfully generate and receive SNMP v1 traps using
snmptrap and snmptrapd commands by following the tutorial. But I am
facingissues with generating an SNMP v2 trap.

I have the following content in
C:\usr\share\snmp\mibs\UCD-NOTIFICATION-TEST-MIB.txt:

        UCD-NOTIFICATION-TEST-MIB DEFINITIONS ::= BEGIN
              IMPORTS ucdExperimental FROM UCD-SNMP-MIB;

        ucdNotificationTestMib MODULE-IDENTITY
          -- omitted

        demotraps  OBJECT IDENTIFIER ::= { ucdExperimental 990 }
        demonotifs OBJECT IDENTIFIER ::= { demotraps 0 }

        demoNotif NOTIFICATION-TYPE
              OBJECTS { sysLocation }
              STATUS current
              DESCRIPTION "An example of an SMIv2 notification"
              ::= { demonotifs 18 }

        ucdNotificationGroup NOTIFICATION-GROUP
          -- omitted
        END

When I try to generate an SNMP v2 trap, I get errors:

        C:\usr\bin>snmptrap -v 2c -c public localhost ""
        UCD-NOTIFICATION-TEST-MIB::demoNotif SNMPv2-MIB::sysLocation.0 s
        "Just here"

        Expected LAST-UPDATED (demotraps): At line 7 in
        C:/usr/share/snmp/mibs/UCD-NOTIFICATION-TEST-MIB.txt

        Expected STATUS (END): At line 18 in
        C:/usr/share/snmp/mibs/UCD-NOTIFICATION-TEST-MIB.txt

        Expected "{" (EOF): At line 20 in
        C:/usr/share/snmp/mibs/UCD-NOTIFICATION-TEST-MIB.txt

        Bad object identifier: At line 20 in
        C:/usr/share/snmp/mibs/UCD-NOTIFICATION-TEST-MIB.txt

        Bad parse of NOTIFICATION-GROUP: At line 20 in
        C:/usr/share/snmp/mibs/UCD-NOTIFICATION-TEST-MIB.txt

Please help me to understand what I am doing wrong and fix it.

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.