I have a time series data in an index.
I am trying to find latest value of a field1 split by terms in field2.
Then apply a filter example field1=SUCCESS and count the resulting terms.
I just want to return only the final count.
I am from splunk background and exploring elasticsearch. In splunk I do index | stats latest(field1) as latest_status by field2 | where latest_status="SUCCESS" | stats count
Is there a equivalent for this in elasticsearch. Please help.
How are you pushing this data to ES?
If its with Logstash,
You can try this in your elasticsearch output.
If your input is JDBC for example,
Assuming your field2 is a time field,
Through the index api.
Whenever the validate function is called from client, the server processes it sends response back to client and logs in elasticsearch index through the rest api.
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.