New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


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

Votes:

0

Your Vote:

Up

Down

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 by  Raymond (0) 1

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



4 Replies

Accepted Answer

Votes:

0

Your Vote:

Up

Down

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 Support]

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



Votes:

0

Your Vote:

Up

Down

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 by  Terry Duong (0) 1



Votes:

0

Your Vote:

Up

Down

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 Support]



Votes:

0

Your Vote:

Up

Down

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

Created on May 24, 2017 11:21:54 PM by  Terry Duong (0) 1



Please log in or register to enter your reply.


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.