Splunk Search

Why am I not able to extract the _time field from the log?

sagarpatil09
Observer

I am trying to extract the _time from the log

Jul 28 12:00:49 104.128.100.1 420391: Jul 28 06:30:25.023: %Sample: Sample: cp :  QFP:0.0

but the Splunk is extracting the _time as 2022-07-28T12:00:49.000+05:30 I want it to extract the second time from log i.e Jul 28 06:30:25.023
i tried the approach 
In props.conf file added

[sourcetype]
TIME_PREFIX = ^\S{3}\s\d{1,2}\s[^\s]+\s[^\s]+\s[^\s]+\s
TIME_FORMAT = %b %d %H:%M:%S.%3Q
MAX_TIMESTAMP_LOOKAHEAD = 30
TZ = UTC

but not able to extract can someone pls help

Labels (2)
0 Karma

PickleRick
SplunkTrust
SplunkTrust
Jul 28 12:00:49 104.128.100.1 

This is the string from which Splunk tries to parse out the timestamp.

Increase your MAX_TIMESTAMP_LOOKAHEAD

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @sagarpatil09,

please try this options:

[your_sourcetype]
TIME_PREFIX = :\s+
TIME_FORMAT = %b %d %H:%M:%S.%3N

 Ciao.

Giuseppe

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!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...