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. GPS Directly from SNMP?

GPS Directly from SNMP?

Scheduled Pinned Locked Moved Support
8 Posts 3 Posters 17.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.
  • Z
    Z
    zshnet
    wrote on last edited by
    #1

    Hi all,

    We have a bunch of Airfiber 24's which have GPS receivers. They report GPS based on SNMP (one for Lat, one for Long), and I'd love to directly plug that into the geolocation attribute. Is there any way to do this? If not, I'll just use NXshell to take the data and plug it directly.

    Thanks,
    Zach

    1 Reply Last reply
    0
    • T
      T
      tomaskir
      wrote on last edited by
      #2

      You can write a NXSL script which will read the GPS loc and assign it to the node.
      I can then be for example a Hook::ConfigurationPoll, or similiar.

      Check out the setGeoLocation method of the NXSL "Node" object:
      https://wiki.netxms.org/wiki/NXSL:Node

      Or, like you mentioned, you can do it with nxshell.

      1 Reply Last reply
      0
      • Z
        Z
        zshnet
        wrote on last edited by
        #3

        Cool! I'll see whether my team thinks that's a good architecture choice. Don't want code in too many places, but I do like NXSL.

        On a side-note: Do you know if links are possible on the World Map? Or is it just icons?

        Thanks,
        Zach

        1 Reply Last reply
        0
        • T
          T
          tomaskir
          wrote on last edited by
          #4

          No, world map is geolocation only for now.

          There are multiple requests on the forums and in bug-tracer to allow topology and links etc. to diplay on the world map.
          As far as I know, Victor said its planed, but I dont think any time soon.

          1 Reply Last reply
          0
          • Z
            Z
            zshnet
            wrote on last edited by
            #5

            Huh. Is there an easy way to find where the world map code exists? I'd be interested in taking a look at what it does, but I'm unfamiliar with the NetXMS code structure. Would I find that in the bug tracker?

            Thanks,
            Zach

            1 Reply Last reply
            0
            • T
              T
              tomaskir
              wrote on last edited by
              #6

              http://git.netxms.org/public/netxms.git?js=1
              Development happens in the "develop" branch.

              You can find good guides on how to get the client running in Eclipse here on the forums and on the wiki.
              Example: https://www.netxms.org/forum/windows/compilation-of-a-netxms-console-in-eclipse/

              1 Reply Last reply
              0
              • Z
                Z
                zshnet
                wrote on last edited by
                #7

                Thanks so much for all your replies! Super helpful, and I appreciate it.

                Thanks,
                Zach

                1 Reply Last reply
                0
                • meshnetM
                  meshnetM
                  meshnet
                  wrote on last edited by
                  #8

                  I've found a scripting example here:

                  https://wiki.netxms.org/wiki/Script_Example:_Setting_node_geolocation_from_SNMP

                  It reads

                  Adjust the OIDs in SNMPGetValue as required.

                  transport = CreateSNMPTransport($node);
                  if (transport == null) {
                    return null;
                  }
                  
                  lat = SNMPGetValue(transport, ".1.2.3.4.1");
                  long = SNMPGetValue(transport, ".1.2.3.4.2");
                  
                  if (lat == null || long == null) {
                    return null;
                  }
                  
                  geoLoc = GeoLocation(lat, long);
                  $node->setGeoLocation(geoLoc);
                  
                  return 0;
                  
                  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