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

Changing the location by the API doesn't work

Votes:

0

Hello,

I would like to get the world map where all my devices and their states are shown. These devices don't have anything I could ping nor any OS, so they way I have to do it is to call the API to set the device's location by entering coordinates (latitude and longitude) that I store in my database. Trying to do so I'm facing two problems:

1. If I don't set device location at all and they try to change it by the API, nothing happens. The location is still empty and device is not shown on the world map.

2. If I set some location and then try to change it by the API, it works halfway. The world map is updated and shows new location of my device, but if I hover it there or enter device settings, there are still old coordinates shown.

I tried to do this by these two calls:

/api/setlonlat.htm?id=objectid&location=name_of_object_location&lonlat=longitude,latitude /api/setobjectproperty.htm?id=objectid&name=lonlat&value=longitude,latitude

I have the newest version of the PRTG installed (PRTG Network Monitor 20.2.59.1689 x64).

geomaps location prtg

Created on Jun 18, 2020 2:16:49 PM



Best Answer

Accepted Answer

Votes:

1

Hello,

Yes, I can confirm the same is happening to me. I'll submit a bugfix ticket for this.

Thanks!

Benjamin Day
[Paessler Suppport]

Created on Jun 23, 2020 9:37:51 PM by  Benjamin Day [Paessler Support] (1,441) 2 1



7 Replies

Votes:

0

Hello,

Can you please check the contents of the webserver log to see if these API calls are making it to the PRTG server, and not generating errors? The log is in the following folder.

C:\ProgramData\Paessler\PRTG Network Monitor\Logs\webserver

Please check the log for the day you tried this, and search for the API call you made.

Let me know if there is not an error in the log.

Benjamin Day
[Paessler Support]

Created on Jun 19, 2020 3:55:43 AM by  Benjamin Day [Paessler Support] (1,441) 2 1



Votes:

0

Hello, thank you for your reply. I tried to call the API using both browser and Postman. Both times I received response "OK". Example of log looks as following:

#636946 2020-06-18 13:10:36 127.0.0.1 "user100-prtgadmin" localhost 80 GET /api/setlonlat.htm id=42&lonlat=-74.044651,40.690063&username=prtgadmin&password=*** 200 "PostmanRuntime/7.1.1"

Best regards

Created on Jun 19, 2020 2:00:07 PM



Votes:

0

Hello,

Can you give me the exact calls you made? Don't send the username and password. Just the other parts.

I'm going to test them in my lab.

Benjamin Day
[Paessler Support]

Created on Jun 22, 2020 6:06:00 PM by  Benjamin Day [Paessler Support] (1,441) 2 1



Votes:

0

Hello, these are the exact API calls I made:

http://localhost/api/setlonlat.htm?id=42&lonlat=-0.127646,51.507462 http://localhost/api/setobjectproperty.htm?id=42&name=lonlat&value=-0.127646,51.507462

Created on Jun 23, 2020 8:13:40 AM



Accepted Answer

Votes:

1

Hello,

Yes, I can confirm the same is happening to me. I'll submit a bugfix ticket for this.

Thanks!

Benjamin Day
[Paessler Suppport]

Created on Jun 23, 2020 9:37:51 PM by  Benjamin Day [Paessler Support] (1,441) 2 1



Votes:

0

Hello, great to hear that! I suppose that it will be fixed in the next PRTG release? Do you know when could I expect one?

Created on Jun 24, 2020 1:44:06 PM



Votes:

0

Hello,

I do not know when it will be handled. You can check the release notes for future releases and see the entry for the bug.

Thanks!

Benjamin Day
[Paessler Support]

Created on Jun 24, 2020 7:09:39 PM by  Benjamin Day [Paessler Support] (1,441) 2 1




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.