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

Export sensor data via API

Votes:

0

Dear, how can I get data from a sensor and export via api? the way I'm doing is giving me a wrong value example of the message

This XML file does not appear to have any style information associated with it. The document tree is shown below. <prtg> <version> 20.3.61.1649 </version> <error> Sorry, the selected object cannot be used here or it does not exist. </error> </prtg>

api device prtgapi

Created on Nov 10, 2020 10:41:12 PM



2 Replies

Votes:

0

Hi Daniel,

It sounds like your API request is malformed

The syntax of an API request for a single sensor is as follows

https://prtg.example.com/api/table.xml?content=sensors&columns=objid,name,probe,group,favorite,lastvalue,device,downti
me,downtimetime,downtimesince,uptime,uptimetime,uptimesince,knowntime,cumsince,lastcheck,lastup,lastdown,minigraph,sche
dule,basetype,baselink,notifiesx,intervalx,access,dependency,position,status,comments,priority,message,parentid,tags,ty
pe,active&count=*&filter_objid=1001&username=prtgadmin&password=password

The filter_objid filter specifies the ID of the object to retrieve. In this example, this retrieves the XML for the single sensor with ID 1001

If you are using PowerShell, you can also do this a lot easier with PrtgAPI

Get-Sensor -Id 1001

Regards,

lordmilko

Created on Nov 11, 2020 6:26:44 AM



Votes:

0

Thank you for your response Lordmilko.

I would also add the manual of the PRTG API, which includes the list of information we can get (included in your API request).

https://www.paessler.com/manuals/prtg/live_multiple_object_property_status

Regards.

Created on Nov 11, 2020 6:58:48 AM by  Florian Lesage [Paessler Support]




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.