Getting Data In

Unable to parse timestamp from xml tag

v2k007
Engager

I am facing problem with timestamp from xml file entry.
Following is the sample tag from xml file

 <row Id="82949" UserId="3893" Name="Teacher" Date="2008-09-15T08:55:03.957" />

I have specified following timeformat and timeprefix to detect timestamp.

Timestamp format = %Y-%m-%d'T'%H:%M:%S.%3N
Timestamp prefix = \d{4}-\d{2}-\d{2}+T\d{2}:\d{2}:\d{2}.\d{3}

I am getting following error could not use strptime to parse timestamp from "" />"

I am new to Splunk, so help on this issue is really appreciated. Thanks in advance.

Tags (2)
0 Karma
1 Solution

cpetterborg
SplunkTrust
SplunkTrust

The prefix is what comes BEFORE the timestamp:

Timestamp prefix = Date="

View solution in original post

v2k007
Engager

It worked 🙂 Thanks somesoni2 and cpetterborg

0 Karma

cpetterborg
SplunkTrust
SplunkTrust

The prefix is what comes BEFORE the timestamp:

Timestamp prefix = Date="

somesoni2
Revered Legend

First remove single quote from time fromat and dont use time prefix.

Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...