So, I have an index with ping data from host A to host B, and my data looks like this:
{ "@version" => "1", "@timestamp" => "2014-07-17T21:17:34.030Z", "host" => "host_a", "to_host" => "host_b", "value" => "25.6", "from_host" => "host_a", "stat_type" => "ping" }
The goal is to also store the 90th percentile data for the ping value ("value" in the above) in a moving window, for example. last hour, last day, etc.
I know I can do this with aggregation, but my question is this:
Does ElasticSearch support a way to automatically add aggregation output (or query for it) back to the index?
I know that I could just take the output, set up the fields, and then return the data using a helper application, but I was curious if this could be used only with ES.
To use an equivalent SQL example, I would look for something like this:
create table agg select id, count(*) as counts from data group by id;
source share