Getting Data In

Sourcetype / Line-breaking issue with multi-timestamp events

flle
Path Finder

Hi,

I am having an issue with line breaking.
My events look like this:

2012-04-17 11:24:45 ***************** rule violation! *****************
contract number:    1234         rule violation action: 2 (FREEZE TRANSACTION)
session id: xxxxx60M94FTrGmGL8zSjtYkJ38LTmtvrnXmnBjhTMGN2np4VVMy!486267940!1329214508088
tool type: Browser
matched rule: XXXXX => rule violation action: 2 (FREEZE_TRANSACTION)
first request: 
    requestURI...................: /ClientCustomer/root/extras/login
    request-timestamp............: 2012-04-17 11:15:08,090
    AL_ENV_REMOTE_ADDR...........: 192.168.1.5
    ISP..........................: CH-CABLECOM (ZURICH, SWITZERLAND)
    User-Agent...................: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/534.50.2 (KHTML, like Gecko) Version/5.0.6 Safari/533.22.3

... cut ...

Besides the timestamp at the beginning of the event there are several others in within the event (i.e. request-timestamp). I want to break only before the initial timestamp. For this I created a sourcetype with data preview by importing an ascii log file. The created props.conf:

[req_validator]
BREAK_ONLY_BEFORE = \d+-\d+-\d+\s+\d+:\d+:\d+\s+\*
SHOULD_LINEMERGE = true
NO_BINARY_CHECK = 1
pulldown_type = 1

This works just fine.
Then I took this source type definition and copied it to a Splunk forwarder config which reads this logfile in real time. Props.conf on the forwarder:

[req_validator]
BREAK_ONLY_BEFORE = \d+-\d+-\d+\s+\d+:\d+:\d+\s+\*
SHOULD_LINEMERGE = true

I removed pulldown_type and NO_BINARY_CHECK because both should be irrelevant for my source type.

inputs.conf:

[monitor:///opt/logs/client/app/CustomerClient/req_validator.log]
disabled = false
index = xyz 
sourcetype = req_validator

The log file is read ok, in Search I can see that Splunk uses the source type req_validator, but the line breaks are wrong. It breaks before every line with a timestamp. It somehow looks like the default line break behaviour.
I also tried several things with TIME_FORMAT and TIME_PREFIX but nothing worked.

So is there any default configuration parameters which are automatically set/active in props.conf or inputs.conf which might interfere with my line-break config?

Thanks for any hints

Regards
Florian

0 Karma
1 Solution

Ayn
Legend

What kind of forwarder is this? Non-heavy forwarders (Light and Universal) don't do this kind of parsing of events, so if that's the case for you you should be applying the settings on your indexer, not the forwarders.

View solution in original post

Ayn
Legend

What kind of forwarder is this? Non-heavy forwarders (Light and Universal) don't do this kind of parsing of events, so if that's the case for you you should be applying the settings on your indexer, not the forwarders.

flle
Path Finder

Solved. It's a universal forwarder, so no parsing of sourcetype definitions in props.conf on the forwarde. After defining it on the indexers it works as expected.

0 Karma
Get Updates on the Splunk Community!

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...