Aggregate Function on non-zero values only


(Akshay Singhvi) #1

I have a kibana timelion query to plot the actual performance metrics as follows:

.es(index=my_index,timefield=@timestamp,metric=avg:Actual).lines(show=True).points(show=True).label(Performance)

For this I want to add an aggregate line of its average values For which the query is as follows :

.es(index=my_index,timefield=@timestamp,metric=avg:Actual).aggregate(avg)

The problem is aggregate is performed on the whole time range selected which includes past or future time frames where the data is not present. Thus the average falls drastically below the actual average. How to write the aggregate query to ensure it does not consider the NULL or absence of values in the selected time range and give avg of only the numerically available data points which would be more close to original average.


(Nathan Reese) #2

That is not currently possible. You can open a feature request.


(Akshay Singhvi) #3

Thanks Nathan.I have raised a feature request here


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.