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: count the number of sensors in a group by status

Votes:

0

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

api sensors total

Created on Jun 13, 2013 10:52:23 PM



1 Reply

Accepted Answer

Votes:

0

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

Created on Jun 14, 2013 6:32:14 AM by  Konstantin Wolff [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.