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

How to list out the probes object ID and it's name

Votes:

0

Is there any way to list out the probes object ID via the Web API, like the /api/table.xml.

api customize probe prtg web-interface

Created on May 29, 2015 4:24:30 AM

Last change on May 18, 2017 10:58:41 AM by  Luciano Lingnau [Paessler]



4 Replies

Accepted Answer

Votes:

0

Hello.

Have you checked the API's documentation?
It's accessible within your PRTG server under Setup > PRTG API.

In the current PRTG version (17.2.31) one can list out all PRTG Probes with the following query:

/api/table.xml?content=probes&output=xml&columns=objid,name&filter_parentid=0

Here we're using the filter_parentid=0 filter, since only probes can be a child object of the root, that query returns the complete probe list.

Best Regards,
Luciano Lingnau [Paessler Support]

Created on May 29, 2015 11:43:34 AM by  Luciano Lingnau [Paessler]

Last change on May 18, 2017 10:58:16 AM by  Luciano Lingnau [Paessler]



Votes:

0

Hello,

I couldn't find any api to grab data from the probe nodes (name,id). Please advise if it is possible.

I found a workaround to get the name of all probes by query groups' data from root (please see below code) but still no luck with getting their ids.

$prtgserver="your prtg address"

$authentication="&username=$prtgaccount&passhash=$prtghash"

$api="/api/table.xml?content=groups&output=csvtable&columns=objid,probe,name&id=0"

$probesList = Invoke-RestMethod "$prtgserver$api$authentication"|convertfrom-csv

$probesList = $probesList.Probe|sort-object |Get-Unique

Created on May 18, 2017 12:50:08 AM



Votes:

0

Hello there,
thank you for your reply.

My suggestion above doesn't appear to work anymore, but the following will:

/api/table.xml?content=probes&output=xml&columns=objid,name&filter_parentid=0

The trick here is using filter_parentid=0 to filter only objects that are directly below the Root, who's ID is always 0.

Best Regards,
Luciano Lingnau [Paessler Support]

Created on May 18, 2017 10:51:40 AM by  Luciano Lingnau [Paessler]



Votes:

0

Thanks Luciano, just tested the api, it's working as expected.

Created on May 24, 2017 11:21:54 PM




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.