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 Discrepancy between channels list and values

Votes:

0

When there are multiple datapoints per single channel (such as bandwidth sensors, netflow sensors), the channel list shows as simply "Bytes Sent", but in the data, there are multiple entries bound to the same channel ID, making it impossible to choose the right one.

For example:

  1. 1, we query list of channels by sensor: Channel List:
 {
      "objid": 1,
      "objid_raw": 1,
      "channel": "",
      "channel_raw": "",
      "sensor": "",
      "sensor_raw": "",
      "name": "Bytes Sent"
    },

Data:

<value channel="Bytes Sent (volume)" channelid="1">3,691 KByte</value>
<value_raw channel="Bytes Sent (volume)" channelid="1">3779761.8783</value_raw>
<value channel="Bytes Sent (speed)" channelid="1">24 kbit/s</value>
<value_raw channel="Bytes Sent (speed)" channelid="1">2986.0656</value_raw>

Does not match.

If using numeric ID to match, it'll match on both, resulting in the last item being used.

api channels histdata

Created on Dec 15, 2015 7:26:42 PM

Last change on Dec 16, 2015 10:07:55 AM by  Luciano Lingnau [Paessler]



Best Answer

Accepted Answer

Votes:

0

You might want to try the parameter usecaption=true with the JSON query - it should be more verbose with the channel names.

Created on Dec 28, 2015 5:20:29 PM by  Stephan Linke [Paessler Support]



6 Replies

Votes:

0

Dear neuralfraud

The sensor measures the volumes and computes the volume difference over the time difference. The speed is the 'real' value for the channel. The reason is that the actual scanning of the sensor can slightly differ from the interval which is configured. The speed computation uses the actual time difference to the last scan and provides the real speed.

Created on Dec 16, 2015 11:51:50 AM by  Arne Seifert [Paessler Support]



Votes:

0

Is it not possible for the channel table to know that there are (volume), (speed), and other sub-channels?

Are there any other instance where there might be multiple sub-channels? Such as, detailed netflow?

Created on Dec 16, 2015 2:45:29 PM



Votes:

0

Can you post the API calls you're using to get those results?

Created on Dec 18, 2015 9:06:37 AM by  Stephan Linke [Paessler Support]



Votes:

0

channel query:

http://neuralfraud-pc:3000/api/datasources/proxy/3/table.json?username=apiuser&password=********&content=channels&columns=objid,name&id=<sensor ID>

Historic data: http://neuralfraud-pc:3000/api/datasources/proxy/3/historicdata.xml?username=apiuser&password=********&id=<sensor ID>&sdate=2015-12-19-06-07-38&edate=2015-12-19-12-07-38&avg=0&pctshow=false&pctmode=false

(note, calls a proxied through a backend service)

I have to use XML for actual results because JSON output doesn't include channel names or ID.

For example: { "histdata": [ { "datetime": "12\/19\/2015 6:07:41 AM", "datetime_raw": 42357.463669016, "value": "2 msec", "value_raw": 2, "coverage": "100 %", "coverage_raw": 10000 } ] }

Same exact call, just JSON instead of XML. Anyhow, if subchannels are always going to be speed and volume, then it really doesn't matter. I'm more concerned if a sensor does something different. As long as that never happens, I can manage the results accurately.

Created on Dec 19, 2015 5:17:00 PM



Votes:

0

Ah okay, now I get it. Since we'll be working on the API next year, this will be taken into consideration :) Thanks for your input!

Created on Dec 21, 2015 8:16:55 AM by  Stephan Linke [Paessler Support]



Accepted Answer

Votes:

0

You might want to try the parameter usecaption=true with the JSON query - it should be more verbose with the channel names.

Created on Dec 28, 2015 5:20:29 PM by  Stephan Linke [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.