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. Change or regenerate agent ID

Change or regenerate agent ID

Scheduled Pinned Locked Moved Support
5 Posts 2 Posters 26.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.
  • W
    W
    wanetwa
    wrote on last edited by
    #1

    Unfortunately we are looking after older xp/7 windows systems, due to being ATM machines.
    We have some images of hard drives, which we are using to upgrade to ssd drives, but this is causing duplicate agent id.
    How can we generate a new agent id ?

    Thanks
    Chris

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

      Hello.

      Remove file "nxagentd.db" from data directory. Data directory location is logged on startup, something like this:

      2020.12.14 12:34:48.558 *I* [                   ] Data directory: /opt/netxms/stable/var/lib/netxms
      

      Out of curiosity: are you using our ATM monitoring solution, or made your own based on the NetXMS?

      1 Reply Last reply
      0
      • W
        W
        wanetwa
        wrote on last edited by
        #3

        Hi Alex
        Sorry for the delay in responding, have been away in remote areas doing service calls etc.
        That helped me fix the issue.
        For anyone else having the same issue, I would recommend delete the databse file from your master image, then new id will be created with the new database.
        In my case where we had already deployed and the units were remote and I couldn't delete the database file, as it was in use by the agent I resolved as follows.

        1. edit the agent file and add
          DataDirectory = c:\netxms\lib
          under the ConfigIncludeDir section.
        2. MAKE SURE you save the agent file.
        3. Restart the agent and adopt with the new agent id.

        Hope this helps anyone else in the same situation.

        I am currently creating my own solution with netxms, as I hadn't realised you already had an ATM solution.
        Our machines don't appear to be supported.

        I will PM after speaking to our management to discuss further.

        Thanks again for your help.

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

          I just realized that there is a simpler way to do that - run agent with "-T" argument:

          (nx-stable) ➜  netxms-stable git:(stable-3.8) nxagentd -h
          Usage: nxagentd [options]
          Where valid options are:
             …
             -T         : Reset agent identity
             …
          

          Agent will exit after reseting ID, so you can do this as Action (define in nxagentd.conf):

          Action=Agent.ResetID=C:\NetXMS\bin\nxagentd -T
          

          Then execute Agent.ResetID either using object tools, or with "nxaction" command (e.g. "nxaction -o IP Agent.ResetID").
          Once ID reset - restart agent (also, you can do this either with object tools, or by using "nxaction IP Agent.Restart")

          1 Reply Last reply
          0
          • W
            W
            wanetwa
            wrote on last edited by
            #5

            Thanks again Alex.

            Unfortunately I seem to be only able to run version 3.0.2258, as I haven't had the chance to test later net files etc.

            Hopefully all of this information will help other users.

            Regards
            Chris

            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