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. How can I filter the auto-discovered devices through snmp community

How can I filter the auto-discovered devices through snmp community

Scheduled Pinned Locked Moved Support
3 Posts 2 Posters 29.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.
  • J
    J
    justrest
    wrote on last edited by
    #1

    How can I filter the auto-discovered devices through snmp community, the current script is
    sub main()
    {
        transport = $1->createSNMPTransport(161,"stonewell2000");
        if(transport != null)
        {
            sysname = transport->getValue(".1.3.6.1.2.1.1.5.0"); 
            if(sysname != null && sysname !="" && sysname !=" ")
            {
                return true;
            }
        } 
        return false;
    }

    But the script reports an error, suggesting that if $1 is replaced by $node or $ NewNode , it will also report the same error, please ask the experts for guidance, thank you very much!

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

      You cannot create SNMP transport because node object is not created yet. Currently community string used for discovery is not accessible to filtering script. Closest thing that you can do is to leave only one community string in network credentials and require SNMP support for newly discovered nodes. That way automatic discovery will only try that one community string, and devices that will not respond will not be marked as SNMP capable and will not pass filter. However, you will have to manually enter correct community string for devices that added manually and use different community string.

      Best regards,
      Victor

      1 Reply Last reply
      0
      • J
        J
        justrest
        wrote on last edited by
        #3

        ok,thank you very much!!

        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