Splunk Search

Time is not getting extracted properly ?

lohitkidu
Path Finder

Hi All,

I am not able to extract time format from events like below

07/03/2016 Mon Mar 7 10:42:25 2016 Info: End Logfile
10:42:31.000

As it can be seen original time is 10.42.25 whereas splunk is parsing time as 10:42:31.000 . It is off by 6 seconds and it varies among other events how much it is getting off by. Below is my props.conf for this sourcetype:
[abc]
TIME_PREFIX=^
TIME_FORMAT=%c

But it is not working . What am i doing wrong ?

Tags (1)
0 Karma
1 Solution

Richfez
SplunkTrust
SplunkTrust

"07/03/2016 Mon Mar 7 10:42:25"

Could be matched by

[abc]
TIME_PREFIX=^
TIME_FORMAT=%d/%m/%Y %a %b %H:%M:%S

Derived from careful study of the date and time format variables. I'm not 100% positive %c matches that. (I generally try to not use 'magic' variables in those, because magic is a bit fiddly and has a way of biting the hand that's feeding it.)

View solution in original post

0 Karma

lohitkidu
Path Finder

Correct rich7177. Seems like %c is not working here. I do not know why

I have matched it with
TIME_FORMAT=%a %b %d %H:%M:%S %Y

0 Karma

Richfez
SplunkTrust
SplunkTrust

"07/03/2016 Mon Mar 7 10:42:25"

Could be matched by

[abc]
TIME_PREFIX=^
TIME_FORMAT=%d/%m/%Y %a %b %H:%M:%S

Derived from careful study of the date and time format variables. I'm not 100% positive %c matches that. (I generally try to not use 'magic' variables in those, because magic is a bit fiddly and has a way of biting the hand that's feeding it.)

0 Karma

alemarzu
Motivator

Hi there

Thats weird mate, what Splunk version are you running ? Because timestamp recognition works just fine for me on 6.2.3 & 6.3.0

0 Karma
Get Updates on the Splunk Community!

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 ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...