Getting Data In

How to set up props.conf so that each source is a single event

mux
Explorer

Currently we are monitoring a directory with batch jobs logs in it and it is not breaking correctly.

[monitor:///home/prod/department/interface/joblogs/*]
sourcetype = joblogs
index = finance
disabled = false

And I am trying to break the files up here.

[joblogs]
BREAK_ONLY_BEFORE = (E r r o r\s+L o g|J o b\s+L o g)
NO_BINARY_CHECK=1
SHOULD_LINEMERGE = True

We are setting the source to the log file name so each different file has a unique source name. I do not want to change the sourcetype name or split the sourcetypes by file. Ideally I am looking to break each file into one event based on the source so that each different file would be 1 event within the index. It is currently breaking the logs into several events.

0 Karma
1 Solution

lguinn2
Legend

No problem, do this

[joblogs]
NO_BINARY_CHECK=1
SHOULD_LINEMERGE = false
LINE_BREAKER = ((*FAIL))
TRUNCATE = 99999999

I used this answer for the info.

View solution in original post

lguinn2
Legend

No problem, do this

[joblogs]
NO_BINARY_CHECK=1
SHOULD_LINEMERGE = false
LINE_BREAKER = ((*FAIL))
TRUNCATE = 99999999

I used this answer for the info.

mux
Explorer

Thank you I believe this will do the trick, I will double check in the AM after the batch jobs have run tonight.

0 Karma

Lowell
Super Champion

Does the word "Error Log" really have spaces between every letter like that? Literally "E r r o r L o g" or is it possible that you have some kind of character set issue? (like UTF-16 or something). That's a long-shot, but it may be relevant.

0 Karma

kristian_kolb
Ultra Champion

Could you post a few samples? And also, indicate
at what points the file is currently being broken.

0 Karma
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...