GPS Directly from SNMP?
-
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 -
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:NodeOr, like you mentioned, you can do it with nxshell.
-
-
-
-
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/ -
-
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;
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