Hi,
I have this requirement to verify the gap between logstash and elasticsearch processing .
For this , I need to get the max timestamp of the recent index entry.
Any input from the community regrading this ?
Hi,
I have this requirement to verify the gap between logstash and elasticsearch processing .
For this , I need to get the max timestamp of the recent index entry.
Any input from the community regrading this ?
Run a max aggregation on the @timestamp field.
Thanks for the update.
The output is showing all the metadata , how can I remove the metadata just to get the required value string .
Say
{
"aggs": {
"max_timestamp": {
"max": {
"field": "@timestamp"
}
}
}
}'
{"took":171,"timed_out":false,"_shards":{"total":135,"successful":135,"skipped":0,"failed":0},"hits":{"total":15841418,"max_score":0.0,"hits":},"aggregations":{"max_timestamp":{"value":1.527507651411E12,"value_as_string":"2018-05-28T11:40:51.411Z"}}}
in this I just need only "2018-05-28T11:40:51.411Z" should be displayed as the output.
I think you will need to parse it out from that response.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
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.