Compute difference between 2 timestamps

Hello, I want to calculate time elapsed between the start and end of a logfile, if I extract the timestamp for every line, can I calculate the min and max (or first and last) ones, and get the difference between them?
for example:

start: 2017-05-01 07:41:25
end: 2017-05-01 10:14:34
output: 02:33:09

Is this doable in logstash?

Might we worth taking a look at the elapsed filter:
https://www.elastic.co/guide/en/logstash/current/plugins-filters-elapsed.html

Thanks @Kryten, will take a look.

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