I'm trying to build an histogram which must count only the first occurrences (chronologically speaking) of all recorded events for the corresponding period (in my data, a specific event can occur several times with a different outcome each time). From what I gathered so far, this might be done by using data aggregations.
However, I'm having trouble finding examples in Kibana on how to give an aggregation as in input to filter the elements being counted...
I'm not sure that I have been clear enough, do not hesitate to ask for further info.
Let's say you detect an event being duplicated by its event_id field. By grouping by event_id and adding the min of your timestamp field to the result, the result index will only contain one document per event id (with the first occurence as its timestamp)
Thanks, I think I understand the general idea!
Since the transform job creates a new index, I guess I also have to store the outcome (correct/incorrect) of the first test, do I?
If you want to visualize it, yes - it's kind of similar to a sql query grouping by the event id - all fields you want to access to have to define together with the aggregation (because there could be multiple documents within each group).
You need an additional service (Logstash) to process the data, but it's more straight forward for this kind of thing. Transforms are better suited if you just want to access aggregations of the groups.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.