Continuous query


I am trying to replace InfluxDB with Elasticsearch and so far I've been 95% successful. The only thing I am struggling with is connected to our use of InfluxDB's "continuous queries".

In InfluxDB:
We run a CQ to calculate a success rate. Every minute, InfluxDB itself runs a query where it selects all approved transactions (RESULT:APPROVED) and divides them by number of all transactions( no filter). The value is then saved to new measurement.

In Elasticsearch:
I would like to do the same. I would like Elasticsearch to run, each 60s, 2 queries (count total, count approved), do some calculation (divide second one by first one) and save the result to new index(e.g. index:"rates", fields(rate_type=success_rate, rate_result=<calculated_value).

Is something like this possible in current version? If not, I could still make some small python script that would do all of this for me, but it would be neat of this could be done directly by ES.


Alerting feature (commercial) might be one answer for this.
Also checkout the new rollup feature which might be what you are looking for.

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