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

Need Traffic In/Out of All Sensors in one Go Using API

Votes:

0

Hello Experts,

We have alot of routers and switches whose ports I/O are monitored by PRTG. We have alot of sensors and I want to find Channels (Traffic In (Mbps), Traffic Out (Mbps)) output of all sensors on my PRTG server in one go. Output can be XML.

As far as I can see

/api/table.xml?content=sensortree

Above will give you all sensors but I cant see last traffic stats in Mbps but <lastvalue> which necessarily means the highest of I/O. So it doesnt work for me. I need Channel I/O values in Mbps for all sensors in one go.

I really appreciate your help here.

api channels mbps prtg sensor

Created on Sep 22, 2016 5:58:00 PM



2 Replies

Votes:

0

Dear BilalBhatti

While it is possible to output the current lastvalue (usually Traffic Total) of all traffic sensors with an API call like this

/api/table.xml?content=sensors&columns=objid,name&count=*&filter_type=snmptraffic

it is not possible to do this for additional channels. The current live data for all sensor channels can only be queried for a single sensor per API call, looking like

/api/table.xml?id=2123&content=channels&columns=name,objid,lastvalue

This example implies that the sensor in question has the object ID 2123. If you want to extract historic data instead of the current live value, this again can be done only sensor by sensor, with a historic data API call. Please find that one documented in the PRTG webinterface, menu Setup | PRTG API, tab "Historic Data". As first step, you need a list of object IDs for those sensors, that list is provided with the first example API call in this posting.

Created on Sep 23, 2016 10:12:54 AM by  Arne Seifert [Paessler Support]



Votes:

0

Yeah sensor by sensor is the only option now to get the desired I/O in Mbps instead of total traffic.

Created on Sep 23, 2016 10:15:49 AM




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.