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!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...