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
This can't be done "only for reporting", but PRTG includes something called "Spike Filter. The spike filter can be defined within the channel's settings (click on the settings gear of the channel, enable the spike filter and set the minimum and maximum values).
The spike filter will disregard values above and below the filters Max and Min value, so a minimum value of 0,1 or 0,001 would means that zeros will no longer be taken into account. Please note that this will not affect the sensor's data, it will still be stored (the zero) but PRTG will ignore readings above the minimum in graphs and tables and this applies to all current data already recorded/stored by the sensor.
Best Regards,
Mar, 2016 - Permalink