Getting Data In

If I have two time fields in an event, how do I configure Splunk to use the 2nd one as the timestamp?

jpelletier_splu
Splunk Employee
Splunk Employee

My log file looks like below. I need Splunk to ID the time_of_stop time -- instead of the the time included with the date of stop prefixed with T

Should I use the field extractor to extract the T00:00:00? The time essentially is in two places and I want Splunk to grab the second one...

/_4mse-ku6q/1747516"> date of stop 2015-07-08T00:00:00 date of stop  time of stop18:20:00time of stopMCP1st district, Rockville
0 Karma
1 Solution

somesoni2
Revered Legend

Try something like this (props.conf on Indexer/HF)

[YourSourceType]
TIME_FORMAT=%Y-%m-%dT00:00:00 date of stop time of stop%H:%M:%S
TIME_PREFIX=date of stop\s+
MAX_TIMESTAMP_LOOKAHEAD=53
...Other settings....

View solution in original post

somesoni2
Revered Legend

Try something like this (props.conf on Indexer/HF)

[YourSourceType]
TIME_FORMAT=%Y-%m-%dT00:00:00 date of stop time of stop%H:%M:%S
TIME_PREFIX=date of stop\s+
MAX_TIMESTAMP_LOOKAHEAD=53
...Other settings....

jpelletier_splu
Splunk Employee
Splunk Employee

This worked great with some minor tweaks! THANKS

0 Karma

ppablo
Retired

Hi @jpelletier

Glad you found a solution through @somesoni2 🙂 Don't forget to resolve yours posts by clicking "Accept" directly below the answer that best addressed your question. Also, be sure to upvote other users' answers/comments that helped you out to award them karma points. It's also good practice to share the final configuration with your minor tweaks so others are aware of the exact solution that worked for you. Thanks!

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...