6 Replies

0

Due to the geo location provider's terms of use, we may only query the geo location lookup service from a graphical user interface.

If you use the PRTG API to fill in the Location information, we're simply not allowed to automatically query geo information for any clear text locations you submit.

So, when adding location information via the PRTG API, please use geo locations together with the location name. For example, use:
/api/setobjectproperty.htm?id=<OBJECT ID HERE>&name=location&value=New York

New API Call to Set Geo Location

As of PRTG Network Monitor 13.3.5.2576 or later, there is a new API call to set the geo location of an object:
/api/setlonlat.htm?id=objectid&location=name_of_object_location&lonlat=longitude,latitude
Provide the object ID together with the parameters for location and/or longitude and latitude.

If only the location parameter is given, the Core Server will excute the geo location lookup (this can last up to three minutes). Provide the name of the location, e.g., "New York". It will be shown in the Location settings, no matter of longitude/latitude.

If the longitude/latitude parameter is given, the marker in the map will be set to this position, no matter of the location parameter. Provide longitude and latitude separated by a comma, e.g., "-73.998672,40.714728".

0

Thanks for the info.
I have populated all of my groups with lonlat and location data however all that appears to happen is they now show on the other side of Africa. Their location (related to each other) is correct, it's just not showing over the UK but in the middle of the Arabian Sea / Indian Ocean.
If I query an object (/api/getobjectproperty.htm?id=4997&name=lonlat&username=[username]&passhash=[passhash]) and get the result: 12.4.7.3507 52.7890249,-2.1169968

0

0

you have to switch your coordinates as the paramter name "lonlat" states the first part of the coordinate is the longitude (positive=east, negative=west), and the second part is the latitude (positive=north, negtive=south).

0

Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.