Getting Data In

Can not parse timestamp

kennmunklarsen
New Member

I have a problem with this file:

-----------------------------------
CLIENT                        100
GUID                          4F281780E49E1DC0E10080000A1E8680
INPUT_DATA                    SAP_SYSTEM=LD1;SAP_CLIENT=100;TITLE=Visning af tatusrecord;Function code that PAI triggered=BACK;WE02.SAPLEDI5.0100.SAPLEDI5.0100.EDI_INTDS.DOCNUM[0]()=0000000000049301;
OUTPUT_DATA                   SAP_SYSTEM=LD1;SAP_CLIENT=100;
CREATED_AT                    20120201123559
CREATED_BY                    SZT
CHANGED_AT                    20120201123559
CHANGED_BY                    SZT
TIMESTAMP                     20120201093938
TRX_NAME                      WE02
USERNAME                      SZT
CLIENT_PC                     172.28.240.189
TECHNOLOGY                    10
----------------------------------------

I use the following configuration:

BREAK_ONLY_BEFORE=^CLIENT\s+\d{3}
NO_BINARY_CHECK=1
SHOULD_LINEMERGE=true
MAX_TIMESTAMP_LOOKAHEAD=14
TIME_FORMAT=%Y%m%d%H:%M:%S
TIME_PREFIX=TIMESTAMP\s+

But it is like Splunk reads to much into the timestamp even though I use “MAX_TIMESTAMP_LOOKAHEAD=14”

Splunk reports this error.
-Could not use strptime to parse timestamp from "20120201093938\nTRX_NAME WE02\nUSERNAME SZT\n
CLIENT_PC"

Hope some one can help me

Tags (2)
0 Karma

sowings
Splunk Employee
Splunk Employee

Your TIME_FORMAT specifies colons; the time stamp I can see from your event sample doesn't have any. Try %Y%m%d%H%M%S.

0 Karma

Drainy
Champion

Splunk is quite clever, sometimes its better to let it try and handle as much as possible, using the data above the following props performs the multiline extraction and timestamping correctly;

BREAK_ONLY_BEFORE=CLIENT\s+
NO_BINARY_CHECK=1
SHOULD_LINEMERGE=true
TIME_PREFIX=TIMESTAMP

Drainy
Champion

Who knows! I didn't have time to test it. Sometimes in Splunk if you try to be too specific you can end up with conflicting configurations that try to do things in different orders. There are probably a few wonky bits 🙂 Feel free to click the tick next to my answer to accept if its all working now!

0 Karma

kennmunklarsen
New Member

It works!, but why did the other configuration not work?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Get Agentic with Splunk Lantern: Connect to Cisco Cloud Control, Transform ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...

July Community Events: Master ITSI 5.0 & Automate Splunk

Struggling with alert fatigue or feeling like you're spending more time on infrastructure maintenance than ...

New Release of Federated Search: Bringing Splunk Analytics to More of Your Data

Organizations today are generating more data than ever and storing it across cloud object stores, data lakes, ...