rutos-rutx: Map GPS lat and lon to os module#15033
rutos-rutx: Map GPS lat and lon to os module#15033murrant merged 1 commit intolibrenms:masterfrom QuadPiece:patch-1
Conversation
Makes GPS position appear on geographic maps.
|
Great! But because tests didn't fail, this means none of the test files include those two OIDs, can you add them to one of the snmprec and update the test data (or at least add example snmp data here). |
|
How does this behave when locations change? I played with this a while ago and found there were some issues updating the lat/lon for the location associated with the device |
|
It updates the location associated with the device. If multiple devices link to that location, it will update it for all of them. If multiple devices try to update a shared location, it will bounce around constantly. For mobile devices, they all should have their own location. (This should probably be in the docs...) |
The GPS coordinates and map position updates, at least it did when I tested. If you use geo locations, my experience is that if you have a location with the same name, but different GPS coordinates, it will get duplicated:
I will nab some sample data from the router as soon as I have access to it and try adding it to an snmprec and test file if I can figure it out. |
|
@murrant I attempted to add test data for my device, but unfortunately failed. Turns out my device wasn't detected out of the box (RUT956 was added to the definitions file locally on our install). So I attempted to follow the docs and added my own device as a variant in When running I most likely have done something wrong. But if it helps, this appears to be the GPS OIDs: This appears to already be present in an snmprec from a different device: librenms/tests/snmpsim/rutos-rutx_rutx11.snmprec Line 1331 in 1f97b44 |
lat/long is not selected in the dump function for OS module :) |
|
Well shit :) Ok lets merge this the snmp data is included. |
|
This pull request has been mentioned on LibreNMS Community. There might be relevant details there: |
Makes GPS position appear on geographic maps.


Teltonika routers have GPS hardware and it's discovered by LibreNMS, but for some reason only gets graphed.
This maps the coordinates to the OS module, which makes its position appear on the pretty map.
As the GPS coordinates are already there and discovered by LibreNMS, simply used erroneously, I do not believe updated test data is needed.
Web UI before:
Web UI after:
GPS coordinates were available before, but in the form of a graphed count:
This is still the case and this count has not been removed.
DO NOT DELETE THE UNDERLYING TEXT
Please note
Testers
If you would like to test this pull request then please run:
./scripts/github-apply <pr_id>, i.e./scripts/github-apply 5926After you are done testing, you can remove the changes with
./scripts/github-remove. If there are schema changes, you can ask on discord how to revert.