Installation

Event parsing issues

sathishkompelly
Explorer

Hi,
We are seeing very often event parsing issues when monitoring a file, we added the below settings but still it is not breaking at the right point, it is breaking at uneven points like below samples. We are trying to parse the winevent logs. Please help me to get this parsed at the date point.

props.conf:-
[host::host01]
SHOULD_LINEMERGE = true
BREAK_ONLY_BEFORE_DATE = true
TRUNCATE = 10000

Sample Logs:-

7/10/19

10:27:22.000 AM
que identifier that can be used to xxxxxx-some text -xxxxx-xxxxxx - Key length indicates the length of the generated session key. This will be 0 if no session key was requested.

7/10/19
9:40:34.000 AM

identifier that can be xxxxxx-some text -xxxxx-xxxxxxx.

7/10/19
9:31:21.000 AM

ogged on. xxxx some text xxxxxxx This will be 0 if no session key was requested.

Tags (1)
0 Karma

ragedsparrow
Contributor

Greetings,

So, in a props.conf, there are 6 base settings that should be defined (also known as the "magic six"). They are as follows:

SHOULD_LINEMERGE=
LINE_BREAKER=
MAX_TIMESTAMP_LOOKAHEAD=
TIME_PREFIX=
TRUNCATE=
TIME_FORMAT=

Here is a good resource: https://www.hurricanelabs.com/splunk-tutorials/splunk-baseline-props-part-1-building-a-smart-foundat...

For what you've posted as your sample data, I would do something like this:

[host::host01]
SHOULD_LINEMERGE=true
LINE_BREAKER=([\r\n]+)(?=\d+\/)
NO_BINARY_CHECK=true
TIME_FORMAT=%D%n%T.%3N%n%p
TIME_PREFIX=^
MAX_TIMESTAMP_LOOKAHEAD=26
TRUNCATE=1000
0 Karma

sathishkompelly
Explorer

@ragedsparrow Thanks for the reply, when I added the settings it is taking multiple lines to a single event,

7/10/19
2:35:11.000 PM

Jul 10 12:34:56 xxxxxx-some text -xxxxx-xxxxxx - Key length indicates the length of the generated session key. This will be 0 if no session key was requested.
Jul 10 12:35:00 xxxxxx-some text -xxxxx-xxxxxxx.

SHOULD_LINEMERGE = true
LINE_BREAKER = ([\r\n]+)(?=\d+\/)
NO_BINARY_CHECK = true
TIME_FORMAT = %D%n%T.%3N%n%p
TIME_PREFIX = ^
MAX_TIMESTAMP_LOOKAHEAD = 7
TRUNCATE = 1000

0 Karma

ragedsparrow
Contributor

@sathishkompelly , in your original post you had different timestamps:

    7/10/19

10:27:22.000 AM
que identifier that can be used to xxxxxx-some text -xxxxx-xxxxxx - Key length indicates the length of the generated session key. This will be 0 if no session key was requested.

7/10/19
9:40:34.000 AM
identifier that can be xxxxxx-some text -xxxxx-xxxxxxx.

7/10/19
9:31:21.000 AM
ogged on. xxxx some text xxxxxxx This will be 0 if no session key was requested.

In this reply, you are giving a different timestamp:

7/10/19
2:35:11.000 PM
Jul 10 12:34:56 xxxxxx-some text -xxxxx-xxxxxx - Key length indicates the length of the generated session key. This will be 0 if no session key was requested.
Jul 10 12:35:00 xxxxxx-some text -xxxxx-xxxxxxx.

If the timestamp format changes, then this won't work. If it remains the same, as you originally posted, it should work

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...