I want to see the logs for last 5 minutes from particular timestamp.
I am constructing elastic log url dynamically for alert message (with timestamp i.e the alert triggered time). For specifying date range for logs, i don't have context of start time. So i have to look for last 5 min logs (alert trigger for 5 min ).
Ex:
start: "~5m ago" and end:alertTriggertrdTime
logPosition=(end:alertTriggertrdTime,position:!n,start:~5m ago,streamLive:!f)
But didn't workout for me. Could you please help us on this issue.
we have special routes to open the logs stream at a specific time:
/app/logs/link-to/logs?time=${TIMESTAMP}
where you replace ${TIMESTAMP} with a millisecond epoch value like 1635247161801. Then the Logs UI would set the time range to TIMESTAMP - 1 hour until TIMESTAMP + 1 hour and center on the given TIMESTAMP.
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.