Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. MIB compile error - ERROR 003: Parser error - syntax error in line 31

MIB compile error - ERROR 003: Parser error - syntax error in line 31

Scheduled Pinned Locked Moved Support
4 Posts 2 Posters 28.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    S
    snmpuser
    wrote on last edited by
    #1

    I'm trying to add a MIB to NetXMS, and when I compile I get the following error:

    /usr/local/share/netxms/mibs/RFC1155-SMI.txt: ERROR 003: Parser error - syntax error in line 31

    I am using the latest NetXMS v2.2.1 on CentOS 7.2.  Any ideas on why this is happening?  I have pasted the MIB below. 

    -- file: RFC1155-SMI.my
    -- Changes:
    --      Removed EXPORTS.
    --      Added explicit definitions of ccitt, null, iso, org, and dod.
    --      Commented out OBJECT-TYPE macro definition (since will use
    --        the definition from RFC1212).
    --      Commented out definitions of syntax types and replaced
    --        with SMIC directives to enable them.
    -- [email protected]

    RFC1155-SMI DEFINITIONS ::= BEGIN

            -- no IMPORTS

            -- Define OIDs
    --        ccitt        OBJECT IDENTIFIER ::= { 0 }
            null        OBJECT IDENTIFIER ::= { ccitt 0 }

    --        iso          OBJECT IDENTIFIER ::= { 1 }
            org          OBJECT IDENTIFIER ::= { iso 3 }
            dod          OBJECT IDENTIFIER ::= { org 6 }
            internet    OBJECT IDENTIFIER ::= { dod 1 }
            directory    OBJECT IDENTIFIER ::= { internet 1 }
            mgmt        OBJECT IDENTIFIER ::= { internet 2 }
            experimental OBJECT IDENTIFIER ::= { internet 3 }
            private      OBJECT IDENTIFIER ::= { internet 4 }
            enterprises  OBJECT IDENTIFIER ::= { private 1 }

            -- Make builtin items known
            SMI NetworkAddress
            SMI IpAddress
            SMI Counter
            SMI Gauge
            SMI TimeTicks
            SMI Opaque

            -- definition of object types

            --    OBJECT-TYPE MACRO ::=
            --    BEGIN
            --        TYPE NOTATION ::= "SYNTAX" type (TYPE ObjectSyntax)
            --                          "ACCESS" Access
            --                          "STATUS" Status
            --        VALUE NOTATION ::= value (VALUE ObjectName)
            --
            --        Access ::= "read-only"
            --                        | "read-write"
            --                        | "write-only"
            --                        | "not-accessible"
            --        Status ::= "mandatory"
            --                        | "optional"
            --                        | "obsolete"
            --    END
            --
            -- names of objects in the MIB
            --
            --      ObjectName ::= OBJECT IDENTIFIER
            --
            -- syntax of objects in the MIB
            --
            --      ObjectSyntax ::=
            --          CHOICE {
            --              simple
            --                  SimpleSyntax,
                  -- note that simple SEQUENCEs are not directly
                  -- mentioned here to keep things simple (i.e.,
                  -- prevent mis-use).  However, application-wide
                  -- types which are IMPLICITly encoded simple
                  -- SEQUENCEs may appear in the following CHOICE
            --
            --              application-wide
            --                  ApplicationSyntax
            --          }
            --
            --          SimpleSyntax ::=
            --              CHOICE {
            --                  number INTEGER,
            --                  string OCTET STRING,
            --                  object OBJECT IDENTIFIER,
            --                  empty  NULL
            --              }
            --
            --          ApplicationSyntax ::=
            --              CHOICE {
            --                  address NetworkAddress,
            --                  counter Counter,
            --                  gauge Gauge,
            --                  ticks TimeTicks,
            --                  arbitrary Opaque
                      -- other application-wide types, as they are
                      -- defined, will be added here
            --              }
            --
            --
                      -- application-wide types

            --          NetworkAddress ::=
            --              CHOICE {
            --                  internet IpAddress
            --              }
            --
            --          IpAddress ::=
            --              [APPLICATION 0]
            --                  IMPLICIT OCTET STRING (SIZE (4))
            --
            --          Counter ::=
            --              [APPLICATION 1]
            --                  IMPLICIT INTEGER (0..4294967295)
            --
            --          Gauge ::=
            --              [APPLICATION 2]
            --                  IMPLICIT INTEGER (0..4294967295)
            --
            --          TimeTicks ::=
            --              [APPLICATION 3]
            --                  IMPLICIT INTEGER (0..4294967295)
            --
            --          Opaque ::=
            --              [APPLICATION 4]
            --                  IMPLICIT OCTET STRING
    END

    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      Hi,

      your MIB file contains those strange lines:

              SMI NetworkAddress
              SMI IpAddress
              SMI Counter
              SMI Gauge
              SMI TimeTicks
              SMI Opaque

      instead of actual definitions that are commented out. I never encounter such notation and not sure if it is valid MIB file notation, but anyway NetXMS MIB compiler do not support it. And you don't need this MIB file anyway because NetXMS has RFC1155-SMI MIB included as part of standard MIB collection.

      Best regards,
      Victor

      1 Reply Last reply
      0
      • S
        S
        snmpuser
        wrote on last edited by
        #3

        Thanks for the prompt response Victor.  It appears some of the MIBs I received included an SMI file.  Does NetXMS provide SMI SNMP support or perhaps in the future roadmap?

        1 Reply Last reply
        0
        • V
          V
          Victor Kirhenshtein
          wrote on last edited by
          #4

          Hi,

          as far as I can find, SMI keyword is non-standard extension used by SMIC compiler. You will get same error if you will try to compile it with net-snmp for example (and likely any other MIB compiler). You should only add MIBs that use standard syntax, not compiler-specific extensions. And it is recommended not to add those already provided (as RFC1155-SMI or SNMPv2-SMI for example).

          Best regards,
          Victor

          1 Reply Last reply
          0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          Powered by NodeBB Contributors
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups