Hello i want to request the API and get a result with the name of all my device, theirs IP address and filter this request only for the device where the ping is UP Could you help me to build this request please ? Thanks !


Article Comments

Attention: This article is a record of a conversation with the Paessler support team. The information in this conversation is not updated to preserve the historical record. As a result, some of the information or recommendations in this conversation might be out of date.

Hi Kevin,

You can do this fairly easily via PowerShell using PrtgAPI

Get-Device | where { ($_ | Get-Sensor ping).Status -eq "Up" } | select name,host

Regards,

lordmilko


Apr, 2020 - Permalink

Hi Thanks for yout reply, but is it possible to get the same result with the LIve Data API ?

I have tried this request

/api/table.csv?content=sensors&output=csvtable&columns=device,sensor,status&id=11326&noraw=1&usecaption=true&filter_status=3&filter_type=ping&count=3000
/api/table.csv?content=devices&output=csvtable&columns=device,host&id=11326&noraw=1&usecaption=true&count=3000

But i can't get in one request this information : device,host when the PING of the device is UP

Is it possible to merge the content data, like /api/table.csv?content=sensors,devices&..... ?


Apr, 2020 - Permalink