What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

GeoMap bug when location is populated from API

Votes:

0

If you populate the location field of a group via the API the geomap picture doesn't display the correct location. To make it correct the map you have to go to the group location box and press enter.

api geo-maps location

Created on Jan 21, 2013 10:30:19 AM



6 Replies

Accepted Answer

Votes:

0

Dear Andy,

this is by design.

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

/api/setobjectproperty.htm?id=<OBJECT ID HERE>&name=lonlat&value=74.007118,40.714550


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".

Created on Jan 21, 2013 11:40:43 AM by  Stefan Messner [Paessler Support]

Last change on Aug 7, 2013 2:15:31 PM by  Gerald Schoch [Paessler Support]



Votes:

0

Thank you for the update. Are you saying I need to use co-ordinates rather than postcodes?

Created on Jan 21, 2013 2:59:44 PM



Votes:

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

Created on Jan 24, 2013 10:00:36 AM



Votes:

0

oh, FYI I tried switching from MapQuest to Nokia and get the same result.

Created on Jan 24, 2013 10:04:29 AM



Votes:

0

Dear Andy,

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).

For your example you set the point like so:

/api/setobjectproperty.htm?id=4997&name=lonlat&value=-2.1169968,52.7890249

Created on Jan 29, 2013 1:07:23 PM by  Stefan Messner [Paessler Support]

Last change on Jan 29, 2013 1:07:38 PM by  Stefan Messner [Paessler Support]



Votes:

0

Woohoo! Well spotted Stefan, thank you! :o)

Created on Jan 29, 2013 2:48:18 PM




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.