Elastic Search by Date Range


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 ).


     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.

Hi @Raghavendra_B,

we have special routes to open the logs stream at a specific time:


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.

Does that help in your use-case?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.