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

PRTG API unable to find sensor by objid

Votes:

0

Hello everybody, i want to find a specific sensor by it's objid. So i tried it with the use of the PRTG API.

When i enter this URL the Sensor is found:
https://prtg_url/sensor.htm?id=9885

But when i try this URL (using the API) the is not found:
https://prtg_url/api/table.xml?content=sensors&output=xml&columns=objid,sensor&id=9885

Can anybody help me out of this? Why can't i find my sensor using the API with the id?

Greetings Daniel

api objid prtg-api sensor

Created on Jul 22, 2022 10:08:15 AM

Last change on Jul 25, 2022 6:35:23 AM by  Felix Wiesneth [Paessler Support]



Best Answer

Accepted Answer

Votes:

0

Hello,

thanks for the hint. In the meanwhile i found a working solution for the problem. I use &filter_objid= instead of only &id in the API call.

It works perfectly.

Greetings Daniel

Created on Jul 26, 2022 5:56:59 AM



2 Replies

Votes:

0

Hello,

the part "id=" refers to the node in which the sensor is searched. It should be the parent device of the sensor, or one of the device groups in the structure, or probe node.

Then it returns all sensors of that node though. In order to get info about a single sensor (or other objects), you can query single properties using /api/getobjectproperty.htm?id=...

Created on Jul 25, 2022 3:39:38 PM by  Arne Seifert [Paessler Support]



Accepted Answer

Votes:

0

Hello,

thanks for the hint. In the meanwhile i found a working solution for the problem. I use &filter_objid= instead of only &id in the API call.

It works perfectly.

Greetings Daniel

Created on Jul 26, 2022 5:56:59 AM




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.