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. Hide or ignore notPresent interfaces

Hide or ignore notPresent interfaces

Scheduled Pinned Locked Moved Support
3 Posts 3 Posters 18.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.
  • T
    T
    troffasky
    wrote on last edited by
    #1

    With some Cisco SB switches, if you put them in stack mode then every possible potential interface in a stack is enumerated with SNMP. For example  gi1/0/1 - gi8/0/52 [and the equivalent FastEthernet as well] even if this is a "stack" of just one switch. As an example, I am look at an SG500-28P that has nearly 1000 interfaces, of which only 28 are real physical interfaces, a few are VLANs and the rest are just "imaginary".

    They all have an operation state of "notPresent" so should be straightforward enough to filter out, hide or disregard, but can I do this in NetXMS?

    1 Reply Last reply
    0
    • A
      A
      Alex Kirhenshtein
      wrote on last edited by
      #2

      in Script Library there is a script call Hook::CreateInterface. You can put any code there, which will be executed when new interface is about to be created. If you return "true" (or hook is empty) - interface will be created, if false - it will be ignored.

      This will not affect existing interfaces, and you'll have to delete them either by hand (filter them by name, for example, and bulk delete) or using script

      for (n : GetAllNodes()) {
          println(n->name . "(" . n->id . ")");
          for (i : n->interfaces) {
              println("\t" . i->name);
              if (...) { i->delete(); }
          }
      }
      

      Check NXSL documentation for more information: https://www.netxms.org/documentation/nxsl-latest/

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

        I think that it could be good idea to ignore notPresent interfaces by default on the server level. We will discuss that internally and likely add as configurable option. But for now hook script is a way to go.

        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