Installation

time prefix match only part of the events

sarit_s
Communicator

hello,
i have this configuration in my props.conf file:
[f170_system]
BREAK_ONLY_BEFORE = ^\w\s\d+\s\d{2}:\d{2}:\d{2}
DATETIME_CONFIG =
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
TIME_PREFIX = ^
TIME_FORMAT = %b %d %H:%M:%S
MAX_TIMESTAMP_LOOKAHEAD = 30
category = Custom
pulldown_type = true

and i have events from two types:

Nov 11 21:43:17 : Info:copyconfig

Sep 20 23:29:54 manager: 

for those who has ":" after timestamp the timestamp is incorrect so for example, splunk shows 6.2.2019 while in the event is 11.11.18

for those who has "manager:" after timestamp everything is ok.

any idea why ?

Tags (1)
0 Karma
1 Solution

nickhills
Ultra Champion

Looks ok to me, but you could try reducing the Timestamp lookahead to 15
I'd also # out or remove the DATETIME_CONFIG line
Is there any reason why you are using BREAK_ONLY_BEFORE as opposed to LINE_BREAKER?

If my comment helps, please give it a thumbs up!

View solution in original post

0 Karma

nickhills
Ultra Champion

Looks ok to me, but you could try reducing the Timestamp lookahead to 15
I'd also # out or remove the DATETIME_CONFIG line
Is there any reason why you are using BREAK_ONLY_BEFORE as opposed to LINE_BREAKER?

If my comment helps, please give it a thumbs up!
0 Karma

sarit_s
Communicator

fixed ! thanks ! can you add it as an answer so i will be able to approve 🙂
maybe you can explain to me why the DATETIME_CONFIG made this problem ? or maybe it is the Timestamp lookahead ?
looks like im missing something very basic

0 Karma

nickhills
Ultra Champion

Date_config has 3 potential values, "NONE", "CURRENT" or "/etc/datetime.xml" (or another config file)
The default is /etc/datetime.xml, so i wonder if leaving it as 'DATETIME_CONFIG=' was confusing things.

The lookahead specifies how many characters after the prefix the date exists in - "Sep 20 23:29:54" is exactly 15 characters, so setting this specifically forces Splunk to look only in those 15 characters for the time.

If my comment helps, please give it a thumbs up!
0 Karma

sarit_s
Communicator

thanks !

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

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

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

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...