I am using Elapsed Filter Plugin for calculating the time between start_session and session_timeout events in my logs.
Here are some events with Timestamps
[27/Apr/2015:10:41:45 -0500] 1 ENG NORMAL TOUCH START_SESSION
[27/Apr/2015:10:41:45 -0500] 1 ENG NORMAL TOUCH DISPLAY_LANGUAGE_SELECT
[27/Apr/2015:10:43:50 -0500] 1 ENG NORMAL TOUCH SESSION_TIMEOUT
Now my elapsed filter configuration looks something like this
Now I see this elapsed.time = 15478784.435 which is ideally from the doucmentation is in seconds. But if you calculate the actual time between timestamps of the start and timeout events show above it should be just 125 secs.
Could someone pls explain what's going on here and what's 15478784.435 number?
I am not so into Ruby but i looked at the source of elapsed. The following snippet:
The method is invoked by LogStash every 5 seconds.
def flush()
expired_elements = [] @mutex.synchronize do
increment_age_by(5)
expired_elements = remove_expired_elements()
end
return create_expired_events_from(expired_elements)
end
needs to be (imoo):
The method is invoked by LogStash every 5 seconds.
def flush()
expired_elements = []
increment_age_by(5) @mutex.synchronize do
expired_elements = remove_expired_elements()
end
return create_expired_events_from(expired_elements)
end
otherwise the elapsed time for every element/event gets increased 5 secs the number of elements/events times. So "increment_age_by(5)"needs to be outside the loop!
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.