I was trying to write a calculated item using the avg function, but it failed with this error:
Cannot evaluate function [avg(5m)
(Note that the error message omitted the data item being averaged, this is how the function actually appears in the formula: avg("ifOutOctets.1",5m)). After trial and error I discovered that since the item in question is only polled once every 5 minutes (currently) that average was failing because there was only 1 item in the 5 minute interval. Changing the function to last() solved the problem.
However, I was using avg because I want to be able to change the polling interval (say to 150s or 100s) for the item in question, and not ignore the intermediate values in the calculated item.
The calculated item doesn't need to be updated more often than every 5 minutes regardless of the update interval of the underlying data; so I set its update interval to 500 and figured I'd just grab the average of all the underlying data over that 5 minutes, but because of the above problem I couldn't get it to work (and will have to remember to update the calculated item when the underlying data item gets updated (to change last into avg or vs/versa)).
It just occurred to me that perhaps by the the time calculated item got processed the underlying item was slightly more than 5 minutes old (although there should be a new one by then), so I tried changing the interval to 325s, but its still failing.
Cannot evaluate function [avg(5m)
(Note that the error message omitted the data item being averaged, this is how the function actually appears in the formula: avg("ifOutOctets.1",5m)). After trial and error I discovered that since the item in question is only polled once every 5 minutes (currently) that average was failing because there was only 1 item in the 5 minute interval. Changing the function to last() solved the problem.
However, I was using avg because I want to be able to change the polling interval (say to 150s or 100s) for the item in question, and not ignore the intermediate values in the calculated item.
The calculated item doesn't need to be updated more often than every 5 minutes regardless of the update interval of the underlying data; so I set its update interval to 500 and figured I'd just grab the average of all the underlying data over that 5 minutes, but because of the above problem I couldn't get it to work (and will have to remember to update the calculated item when the underlying data item gets updated (to change last into avg or vs/versa)).
It just occurred to me that perhaps by the the time calculated item got processed the underlying item was slightly more than 5 minutes old (although there should be a new one by then), so I tried changing the interval to 325s, but its still failing.
Comment