Getting Data In

How do I configure props.conf to recognize the proper timestamp for my logs?

daniel333
Builder

Hello,

I have an issue where a small percentage of my logs are coming in dated 2011. I tracked it down to a field called usernum=* where some subset of the users account numbers match Epoch time format. So Splunk uses that time as the time. The correct field it should use it start.

I assume there is someway to set in the props.conf on the indexers to say

[mysourcetype]
Time_Use_Field=start

But for the life of me the time documentation is going over my head.

0 Karma

MuS
Legend

Hi daniel333,

try using TIME_PREFIX in props.conf

TIME_PREFIX = <regular expression>
* If set, splunk scans the event text for a match for this regex in event
  text before attempting to extract a timestamp.
* The timestamping algorithm only looks for a timestamp in the text
  following the end of the first regex match.
* For example, if TIME_PREFIX is set to "abc123", only text following the
  first occurrence of the text abc123 will be used for timestamp extraction.
* If the TIME_PREFIX cannot be found in the event text, timestamp extraction
  will not occur.
* Defaults to empty.

so, assuming your field looks like this start=epochyou can try this:

[mysourcetype]
TIME_PREFIX = start=

But also be aware of the second last line If the TIME_PREFIX cannot be found in the event text, timestamp extraction will not occur. So make sure the start fields is always available in your events.

Hope this helps ...

cheers, MuS

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!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...