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. snmpOID is no longer returning the OID starting with dot

snmpOID is no longer returning the OID starting with dot

Scheduled Pinned Locked Moved Support
5 Posts 3 Posters 36.1k 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.
  • L
    L
    lhpaladin
    wrote on last edited by
    #1

    Hi,

    $node.snmpOID
    

    is no longer returning the OID starting with dot (.) , many scripts will need adjustments in version 5.0.
    Is it a bug or implementation change?

    1 Reply Last reply
    0
    • F
      F
      Filipp Sudanov
      wrote on last edited by
      #2

      This is intended change. We keep list of breaking changes in the documentation, it's worth checking prior to upgrade:
      https://www.netxms.org/documentation/adminguide/installation.html#major-changes-between-releases

      1 Reply Last reply
      0
      • L
        L
        lhpaladin
        wrote on last edited by
        #3

        Thanks for the answer. It's better

        1 Reply Last reply
        0
        • G
          G
          gkaudewitz
          wrote on last edited by
          #4

          Does this mean, that using OIDs in SNMP-requests as functionparameter also have to be done without leading "."?

          What is the behavior if result of a SNMP-request is an OID itsself? Is this value returned without leading "."?

          1 Reply Last reply
          0
          • F
            F
            Filipp Sudanov
            wrote on last edited by
            #5

            NXSL functions accept OIDs both with and without the leading dot. Returned values are without the dot. So both of below lines will print "System description: 1.3.6.1.4.1.14988.1"

            println("System description: " .. $node.createSNMPTransport()?.getValue(".1.3.6.1.2.1.1.2.0") );
            println("System description: " .. $node.createSNMPTransport()?.getValue("1.3.6.1.2.1.1.2.0") );

            ?. is safe dereference which appeared in 5.0 - should createSNMPTransport() return null, this will not produce script error.

            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