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

API XML Query

Votes:

0

I am trying to create an XML API to retrieve some information so i can create a custom PRTG map for one of my sites. So i have a group with Wireless Access points, each access point only has a ping sensor against it. Not interested in any other details except up/down. The ID of the group is 40629.

To get me started in my quest can someone point me in the correct direct to collect this data. So i will have to create 3x xml api calls one for UP one for DOWN and one for Paused. i will then put this in a table along with other network devices.

I have done some basic calls but i cannot target this group and not sure how to narrow down to the states i would like. I hate to ask for examples but i am wondering if someone can get me started.

https://xx.xx.xx.xx/api/table.xml?id=40629?content=sensors&username=api&passhash=bignumber

Thanks all in advance

api prtg sensor xml

Created on Mar 9, 2022 1:42:57 PM

Last change on Mar 14, 2022 12:20:43 PM by  Florian Lesage [Paessler Support]



1 Reply

Votes:

0

Hello,

Thank you for your message.

To get all Ping sensors from a group and in specific state I invite you to use the following API call:

https://PRTGSERVER/api/table.json?content=sensors&columns=objid,name,group,device,status,type,active&count=*&filter_group=GROUPNAME&filter_type=@sub(ping)&filter_status=STATUS&username=USERNAME&passhash=PASSHASH

Where all uppercase values correspond to the following:

Regarding the data returned by PRTG, you have the possibility to add/remove columns depending on your needs. You will find a list of available columns here: API manual.

In case you want to generate the report in XML, you need to replace "table.json" with "table.xml". For CSV, also use "table.xml" and add "&output=csvtabale" (without quotes) in the API call.

If you have questions, do not hesitate.

Regards.

Created on Mar 14, 2022 12:34:24 PM by  Florian Lesage [Paessler Support]

Last change on Mar 14, 2022 12:36:51 PM 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.