Getting Data In

Timezone

uagraw01
Motivator

My logs are that kind :

<July 13, 2020 10:55:02,572 PM CDT>

So i used TIME_FORMAT=%b %d, %Y %H:%M:%S, %3N%p%z

But it is not parsing and showing me error that " could not use strptime to parse timestamp from "july 13, 2020 10:52:03,907 PM CDT>

Please let me know how to solve this issue.

 

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Spacing is critical.  Make sure the sample data matches the format string.

 

TIME_FORMAT=%b %d, %Y %H:%M:%S,%3N %p %Z

 

---
If this reply helps you, Karma would be appreciated.

uagraw01
Motivator

IMG_20200714_225013__01.jpg

@richgalloway  Above is the error. Please help me how to fix this one.

0 Karma

richgalloway
SplunkTrust
SplunkTrust
I got the time zone decoder wrong. Try my updated reply.
---
If this reply helps you, Karma would be appreciated.
0 Karma

uagraw01
Motivator

@richgalloway I will try and let you know.

0 Karma

uagraw01
Motivator

@richgalloway Still showing the same error. Please let me know to fix this.

0 Karma

faizancool85
Path Finder

You can try adding TIME_PREFIX = \<

Tags (1)
0 Karma

uagraw01
Motivator

@faizancool85  yes added but still not working. But when i remove TIME_FORMAT completely and use only LINE_BREAKER=\w{3}\s\d{2},\s\d{4}\s\d{2}:\d{2}:\d{2},\d{3}\s\w{2}\s\w{3}

It is perfectly parsed. But i want to use time format also. Please let me know what is the reason that not get parsed or showing the above error as mentioned earlier.

 

 

0 Karma

faizancool85
Path Finder

@uagraw01  Can you paste here a sample data? 

0 Karma

uagraw01
Motivator

IMG_20200714_225013__01.jpg

@faizancool85  The same error which i pasted earlier.

0 Karma

richgalloway
SplunkTrust
SplunkTrust
A screen shot is not sample data. Sample data is something we can paste into our own Splunk instances to test possible solutions.
---
If this reply helps you, Karma would be appreciated.
0 Karma

uagraw01
Motivator

<July 13, 2020 10:55:02,572 PM CDT> <Error> <oracle.oam.binding> <OAM-00002> <Error occurred while handling the request.

 

This is the sample log.

0 Karma

richgalloway
SplunkTrust
SplunkTrust
Thanks for the sample. It works on my system using the settings we've discussed.
I find it interesting that an error is displayed even though the timestamps are interpreted correctly.
---
If this reply helps you, Karma would be appreciated.
0 Karma

uagraw01
Motivator

@richgalloway Yes same thing happened from my side. It is parsed but same error is displayed.

0 Karma

to4kawa
Ultra Champion

You don't need extra Time setting on props.conf

Splunk can extract timestamps

[ your sourcetype]
SHOULD_LINEMERGE=false
LINE_BREAKER=([\r\n]+)
NO_BINARY_CHECK=true
CHARSET=AUTO
TRANSFORMS-your_setting = your_setting


0 Karma

faizancool85
Path Finder

Looks like you're missing an Index-time setting, It's highly recommended to define below 6 index-time settings whenever your onboarding new data sources. I believe you're missing these.  Try to define with this to solve the issue.

  • TIME_PREFIX
  • TIME_FORMAT
  • MAX_TIMESTAMP_LOOKAHEAD
  • LINE_BREAKER
  • SHOULD_LINEMERGE
  • TRUNCATE
0 Karma

uagraw01
Motivator

@faizancool85  i used all these six settings but when i used TIME_FORMAT the above error is showing to me.

0 Karma
Get Updates on the Splunk Community!

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...