Getting Data In

How can I increase the interval of time between the arrival of events for proper line breaking?

sunrise
Contributor

Hi Splunkers,

Considering delayed syslog data, I have tried the following scripts which output messages to the monitored file by Splunk.

echo -n "Mon Sep 22 17:18:22 2014 +80:00 SESSIONID: "155" ENTRYID: "7" STATEMENT: "7" " >> sample.log
sleep 3
echo "USERID: "GHOST" USERHOST: "Oracle10gR2_linux" TERMINAL: "pts/1" ACTION: "3" RETURNCODE: "0" OBJ$CREATOR: "SYS" OBJ$NAME: "DUAL" OS$USERID: "oracle"" >> sample.log

props.conf is following.

[sample]
LINE_BREAKER = ([\r\n]+)\w{3}\s+\w{3}\s+\d+\s+\d+\:\d+\:\d+\s+\d{4}
TIME_FORMAT = "%a %b %d %H:%M:%S %Y"

Among 0 to 3 seconds as a sleep command argument, Splunk indexed this sample.log properly and it came to be a single event.
However, from 4 seconds, Splunk indexed it as two events.

So I was wondering how to expand this interval?
If you know anything about it, please let me know.

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

That would be governed by the time_before_close attribute in inputs.conf. The default value is 3 seconds which means Splunk will wait 3 seconds after reaching EOF for more events to arrive before forwarding/indexing them. Any events which arrive more than 3 seconds after Splunk reaches EOF will be treated as separate events.

---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

That would be governed by the time_before_close attribute in inputs.conf. The default value is 3 seconds which means Splunk will wait 3 seconds after reaching EOF for more events to arrive before forwarding/indexing them. Any events which arrive more than 3 seconds after Splunk reaches EOF will be treated as separate events.

---
If this reply helps you, Karma would be appreciated.

sunrise
Contributor

Thank you, richgalloway.
You're absolutely right.
Thank you very much for your help.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

You're welcome. Please accept the answer.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Join Us at the Builder Bar at .conf24 – Empowering Innovation and Collaboration

What is the Builder Bar? The Builder Bar is more than just a place; it's a hub of creativity, collaboration, ...

Combine Multiline Logs into a Single Event with SOCK - a Guide for Advanced Users

This article is the continuation of the “Combine multiline logs into a single event with SOCK - a step-by-step ...

Everything Community at .conf24!

You may have seen mention of the .conf Community Zone 'round these parts and found yourself wondering what ...