Hi, i need to show a graph with the number of "ping" sensors that are up and down in a network with more than 5000 ping sensors, so i was wondering if there is a way to get the count, instead of call for all the sensors and do the count manually in my system


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,
sure, you can create an API call which only will get the ping sensors from a certain group in a certain status. The following example call will give you the object IDs of all Ping Sensors in a group with status down in JSON format:

http(s)://YOUR_PRTG_SERVER/api/table.json?content=sensors&output=json&columns=objid&filter_type=ping&filter_group=GROUP_NAME&filter_status=5

Please replace the expressions with capital letters to fit your needs

The call will produce JSON as output and will also include a statement called treesize which holds the value for all sensors of the above type.

You might also want to add a further parameter count=10000 to make sure all sensors are picked up because the default output is limited to 500 sensors

http(s)://YOUR_PRTG_SERVER/api/table.json?content=sensors&output=json&columns=objid&filter_type=ping&filter_group=GROUP_NAME&filter_status=5&count=10000


Best regards


Jun, 2013 - Permalink