Hello:
We have created a REST endpoint on one of our applications that is returning data for an HTTP Data Advanced sensor. Some of the channels in this feed represent average response times for operations within the application. The sensor is setup to poll once an hour, but even with that, sometimes there's no occurrences of the operation to average, so a value of 0 is returned for the given channel in the JSON data. PRTG captures this, but this causes issues when reporting... For example, if I setup a daily report on the channels with hourly precision on the table and graphs, the summary table averages all the hourly intervals and the 0s pull down the overall daily average. A simple average isn't accurate either (as each hourly interval may represent a variable sample size), but this would be more accurate than including the zeros. Is there any way to accomplish what we're trying to do (report the average response time over the reporting period)?
Here's an example output:
{"channel":"OperationName Calls","value":10,"unit":"Custom","customUnit":"calls","mode":"Difference","float":0}, {"channel":"OperationName Elapsed","value":236.4,"unit":"TimeResponse","float":1} {"channel":"OperationName Calls","value":17,"unit":"Custom","customUnit":"calls","mode":"Difference","float":0}, {"channel":"OperationName Elapsed","value":214.9,"unit":"TimeResponse","float":1}
When PRTG polls the endpoint again, there may not have been any more occurrences of OperationName. The "Elapsed" channel is the average of the calls since the last poll interval. Since there haven't been any (calls is still 17), 0 is returned:
{"channel":"OperationName Calls","value":17,"unit":"Custom","customUnit":"calls","mode":"Difference","float":0}, {"channel":"OperationName Elapsed","value":0,"unit":"TimeResponse","float":1}
Thanks, Andy
Add comment