If possible, I would like to "insert" (or have PRTG fetch) Geo Maps location data dynamically.

The reason is that my locations are non-static (ships) and it would be nice to have their current position displayed in the Geo Maps.

I could easily extract GPS-data from equipment onboard, and then perhaps make some script to punch in the geocodes into PRTG, but since the device configuration file (.prd) isn't really humanly readable, I'd need a few pointers on how to accomplish this.

What do you think?


Article Comments

You could change the location of the device using the API

Please use the following API call:

http://<yourserver>/api/setobjectproperty.htm?id=<objectid>&username=<youruser>&password=<yourpassword>&name=location&value=<location data>

You can alos supply a passhash instead of your password. Please take a look at the API documentation for more details.

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>&username=<youruser>&password=<yourpassword>&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".


Sep, 2011 - Permalink

In what format geocode location should be entered?? If we use someting like 51.938895, 4.403718 nothing is shown on the map.


May, 2013 - Permalink

The geocode format you state is correct - in the current version of PRTG it correctly resolves to an address in Rotterdam.

If you enter coordinates and nothing happens on the preview map, please update to the latest PRTG version. We improved this feature with PRTG version 13.2.3.1896/1897.

Please supply a location (e.g. postal address, city/country) or geocode (latitude and longitude, e.g. "40.714728,-73.998672"). This information will be used to set a marker for geo maps. Any adjusted marker position will be reset if you change text here. Note: For best results, please enter a postal address in the format: street, city, country

If you still do not see your geo information resolved on the map, please make sure the PRTG core server can connect to the external servers used for geo resolution. For details, please see Which domains and ports does the GeoMaps feature use?


May, 2013 - Permalink