Hi All,
I setup a new LibreNMS server a few days ago. It’s working great, except, for the life of me, I cannot get street addresses to resolve to GPS Latitude, Longitude coordinates.
When setting up firewalls, we always input the street address into the Device Settings. LibreNMS is awesome and picks up this info via SNMP. So, for all our WatchGuard firewalls, we see the street address of the device show up in the LibreNMS “Location” field.
Addresses are always formatted as - “1000 Parkway Dr, Santa Clara, CA 95050”
(That’s not a real address, just an example)
We want to be able to see where the device is on a map in the LibreNMS Overview page. Meaning, we need these addresses to resolve to GPS coordinates that LibreNMS can use to place a pin on the map.
I’ve read through this guide a dozen times now - World Map - LibreNMS Docs
I setup LibreNMS with Bing Maps integration first since it was free, and that did not work. The map loaded fine, but addresses did not resolve to coordinates.
Then, I setup a Google Cloud Platform account with a working billing account, and generated an API key that has access to all of the 17 Google Maps API’s.
In both cases (Bing and Google), I can get the map to load, but the location does not show properly. The address is there, but no Lat / Lng values are resolved by LibreNMS.
Note that the screenshot is of a test linux box I setup in NMS. I set the street address in sysLocation Override. sysLocation Override does not resolve to coordinates, nor does the regular sysLocation as reported by SNMP devices.
Here is my config.php file:
Here are the results of me running daily.sh and validate.php as the librenms user:
root@nms-vm:/opt/librenms# su - librenms
librenms@nms-vm:~$ ./daily.sh
Fetching new release information OK
Updating to latest release OK
Updating Composer packages OK
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK
librenms@nms-vm:~$ ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS | 1.66
DB Schema | 2020_07_29_143221_add_device_perf_index (172)
PHP | 7.4.3
Python | 3.8.2
MySQL | 10.3.22-MariaDB-1ubuntu1
RRDTool | 1.7.2
SNMP | NET-SNMP 5.8
====================================
[OK] Composer Version: 1.10.10
[OK] Dependencies up-to-date.
[OK] Database connection successful
[WARN] Your database schema has extra migrations (2020_07_29_143221_add_device_perf_index). If you just switched to the stable release from the daily release, your database is in between releases and this will be resolved with the next release.
[OK] Database schema correct
librenms@nms-vm:~$
When setting up the new server, I installed Ubuntu Server 20.04.1 LTS, then followed the LibreNMS installation document, and lastly I followed the migration FAQ. I imported the database from an older LibreNMS server, and I copied the config files over, but everything else is new. I did not copy over the RRD files, so new graphs and RRD files have generated without issue.
I’m using Nginx, MariaDB and PHP 7.4.
Interestingly, I can see API hits happening in the Bing Maps developer portal, as well as in the Google Cloud Platform, so LibreNMS is definitely using the API. Also, with it set to the Google API like it is now, I can see the map data says “Copyright 2020 Google” which it did not originally. Originally, it was using the OpenMap data. But alas, street addresses do not resolve to coordinates no matter what I do.
Is there anything else I can try? I’d love to get this working.
Thanks,
Julian