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. Dynamic IP adresses on Nodes creating duplicate nodes - options?

Dynamic IP adresses on Nodes creating duplicate nodes - options?

Scheduled Pinned Locked Moved Support
5 Posts 2 Posters 14.8k 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.
  • P
    P
    paul
    wrote on last edited by
    #1

    I have set ResolveDNStoIPOnStatusPoll to yes to try and get NetXMS to pick up when the IP has changed however I have also got UseSNMPTrapsForDiscovery turned on.

    Before Status polling can update the IP address when it does it's next status poll, the device with the new IP has already sent a trap - causing NetXMS to add a new duplicate node via Discovery.

    I could set NetworkDiscoverMergeDuplicateNodes to yes - except that deletes the old Node with all the old node DCI history - which I want to keep.

    Is there a way to delay the Discovery processing of traps for 5 minutes till status polling has had a chance to update the IP address?

    Alternatively - and as a better solution - a simple option - RetryProcessingTrapsFromUnknownIPafterxxxMinutes - which allows Status Polling to update the IP of the existing Node and when xxx has passed (5 minutes as the default) - the trap is then properly associated to the correct device, no discovery is triggered, and no duplicate is created.

    I cannot turn off UseSNMPTrapsForDiscovery as that I find the thousands of devices that are turned on only a few times each year - all with dynamic IP's.

    1 Reply Last reply
    0
    • P
      P
      paul
      wrote on last edited by
      #2

      Turned off discovery from traps, exported all the duplicates and then deleted them.

      Long Term Solution will be, when I have time, to have a filter script on discovery so that when a node is discovery from a trap, filter script does a DNS resolution and if the name comes back as an existing node, do not add node - just let status polling with the resolve DNStoIP set to yes update the node that now has a new IP.

      It means I lose that first trap - but I can live with that. I just hope the above allows the DNStoIP pick up the new IP and then pick up the SYS_NODE_UP against the new IP - which I expect it will.

      1 Reply Last reply
      0
      • P
        P
        paul
        wrote on last edited by
        #3

        Well - it all looked hopeful - except my nodes have an IP as their primary Host Name and not the Node name - which prevents the IP being updated.

        Cannot find anywhere on how to set primaryHostName for a node or even where it is stored. Only reference I found is here:
        https://wiki.netxms.org/wiki/NXSL:CreateNode

        I want to add to my status or configuration poll hook - or even just as a script - a way to set Primary Host Name to the Node name.

        if (($node->primaryHostName != $node->name)) {
           if (($node->name != null) && ($node->primaryHostName != ""))
            {
              ChangeThePrimaryHostNameOfTheObject($node, $node->name);
            }
        }
        

        any help would be appreciated.

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

          Do those nodes respond to SNMP or only send traps? If interface list can be read then theoretically NetXMS server should match discovered node to existing one by MAC address.
          Also, nodes discovered via traps pass through same discovery filter script, so you may do additional filtering here - for example, get DNS name from IP address and check if it is name of existing node. If your DNS is consistent that should prevent duplicate creation.

          Best regards,
          Victor

          1 Reply Last reply
          0
          • P
            P
            paul
            wrote on last edited by
            #5

            These nodes do respond to snmp but DNS may not have updated at the point in time the first trap is received.

            Agree - the filtering script on discovery looks to be the best option but status polling at one minute intervals may be easier - just use discovery script to wait two minutes and see if device now updated. I could also possibly use sysDescription in the filter script as the - do not add if match.

            Will look again into the MAC matching theory and once I have identified what PrimaryName is as a $node variable, will try again.

            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