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

Geo Location update based on sensor data

Votes:

0

Hi there!

I need help to figure out on how to create a Powershell executable file that could update Geo Location based on sensor data that already captures the Latitude and Longitude of an object. I couldn't find a Powershell script that updates Geo Location based on sensor data. I found a post with a Powershell script that could update Geo Location already but I don't understand how to read the script. Could someone assist me how I could achieve the objective?

Here is the link to the post I just mentioned: https://kb.paessler.com/en/topic/73671-limited-snmp-location-and-geomaps

PS. I use API to capture the sensor data for location, then another API key to manipulate the location of the object.

Sample API key to capture location data /api/table.json?content=channels&columns=objid,lastvalue&id=objid&username=username&passhash=passhash

Output example { "prtg-version": "22.1.75.1594", "treesize": 0, "channels": [ { "objid": -4, "objid_raw": "*000000004", "lastvalue": "", "lastvalue_raw": "" }, { "objid": 1, "objid_raw": 1, "lastvalue": "49.487540 N", "lastvalue_raw": 49.4875 }, { "objid": 2, "objid_raw": 2, "lastvalue": "11.130186 E", "lastvalue_raw": 11.1301 } ] }

Sample API key to update Geo Location /api/setlonlat.htm?id=objid&lonlat=49.487540,11.130186&username=username&passhash=passhash

geolocation powershell prtg

Created on Feb 14, 2023 3:14:33 AM



Replies

Nobody has replied yet


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.