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 to get the IP address of remote (different zone) computers?

How to get the IP address of remote (different zone) computers?

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

    Why doesn't NetXMS know the IP addresses of remote computers?  The computers all have the agent installed and connect to the server using a TLS tunnel.

    I have email alerts adding "IP address: %a" to the message body.  With these systems I see "UNSPEC".  In the console > object details > overview, "Primary IP address" also shows "UNSPEC".

    I also include "%[FQDN]" in the message, which is a 1-line script of "return GetDCIValueByName($node,"System.FQDN");".  I do get an FQDN.  How can I get an address?  Do I have to define it in the client config file?

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

      Yes, in case of tunnel NetXMS does not store the IP address. The thing is that IP address from which the tunnel connection arrives is not necessary the IP of the node - it can be a NAT, etc. And if we take list of interfaces for a node - the could be several interfaces and we don't know which one is primary.

      You could get list of interfaces via NXSL script - the script should filter out loopback interface and if there are several interfaces - select one of them. There is currently no hook script on tunnel connection, you can run your script from configuration poll hook.

      Here's an example script that prints list of interfaces:

      for(i : $node->interfaces)
      {
        println i->name;
        for(a : i->ipAddressList)
          println "   " . a->address . "/" . a->mask;
      }
      

      Also, there's a system event SYS_TUNNEL_OPEN - this event occurs when the tunnel is established, in the context of that node. So you can create a rule in EPP and run some script from there.

      It's not possible to update node's IP address from script, but you can create a cusome attribute on node and keep IP address there.

      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