Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
Professional Edition
-
None
-
Observium 18.9.9432 (10th September 2018)
OS Linux 3.10.0-862.3.3.el7.x86_64 [amd64] (CentOS 7)
Apache 2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.0.31
PHP 7.0.31 (OPcache: ENABLED)
Python 2.7.5
MySQL 5.5.56-MariaDB (extension: mysqli 5.5.56-MariaDB)
SNMP NET-SNMP 5.7.2
RRDtool 1.6.0
Fping 3.10 (IPv4 only)Observium 18.9.9432 (10th September 2018) OS Linux 3.10.0-862.3.3.el7.x86_64 [amd64] (CentOS 7) Apache 2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.0.31 PHP 7.0.31 (OPcache: ENABLED) Python 2.7.5 MySQL 5.5.56-MariaDB (extension: mysqli 5.5.56-MariaDB) SNMP NET-SNMP 5.7.2 RRDtool 1.6.0 Fping 3.10 (IPv4 only)
Description
Hi,
Currently running: 18.9.9432 (10th September 2018)
We are having an issue with parsing of the sysLocation string for devices.
We use "City, State" for our sysLocation string which worked in the past, however at some point this stopped working as newly added devices are not set to the correct location.
Example of incorrect parsing:
sysLocation string "Aurora, CO"
Resulting geolocation API query:
Geocoding ENABLED, try detect device coordinates:
by PARSING sysLocation (API: GOOGLE) - FOUND
GEO API REQUEST: https://maps.googleapis.com/maps/api/geocode/json?sensor=false&language=en&key=***&address=+CO
GEO LOCATION: United States (Country), Kansas (State), Montgomery (County), Coffeyville (City)
GEO COORDINATES: 37.0335516 (Latitude), -95.6376017 (Longitude)
The problem is the address being parsed to "+CO" and not "Aurora%2C+CO" as it is with devices that were added in the past.
We are not sure when this behavior changed.
This seems to be being cut off at the comma, not at the space.
It seems that we do this when google reports the address as "approximate", and then re-run the query with the first bit chopped off. We do this in case the first element is a business name and is confusing the API.
I've modified this code to only do this if the address is > 20 characters.