Getting Data In

How do I check if my custom TIME_FORMAT is successfully parsing the time stamps of my events?

hexx
Splunk Employee
Splunk Employee

I am using TIME_FORMAT (see props.conf.spec for reference) in an attempt to accelerate the date-time parsing of my events, but I have no way to know if the strptime format I specified is successfully matching the time stamp string in my events and therefore avoiding all of the regular expression matching in $SPLUNK_HOME/etc/datetime.xml.

Is there any way that I could find out if my TIME_FORMAT is correct?

1 Solution

jrodman
Splunk Employee
Splunk Employee

In versions of Splunk 4.3 and above, Data Preview will identify TIME_FORMAT failures for you, allowing interactive editing/testing cycles TIME_FORMAT in data preview, or simply testing if your existing TIME_FORMAT in props.conf is operating.

Data Preview displaying strptime failure tooltip


In versions of Splunk 4.2 and earlier, there is no particular great workflow method. One method is to, for your particular sourcetype in props.conf, set DATETIME_CONFIG = /etc/null_datetime.xml with an xml file such as:

<datetime>
    <timePatterns>
    </timePatterns>
    <datePatterns>
    </datePatterns>
</datetime>

An alternate method is to change the log level for DateParserVerbose to DEBUG, which will cause strptime failures to be written to splunkd.log. This is very verbose however, so not recommended for high volume environments.

View solution in original post

jrodman
Splunk Employee
Splunk Employee

In versions of Splunk 4.3 and above, Data Preview will identify TIME_FORMAT failures for you, allowing interactive editing/testing cycles TIME_FORMAT in data preview, or simply testing if your existing TIME_FORMAT in props.conf is operating.

Data Preview displaying strptime failure tooltip


In versions of Splunk 4.2 and earlier, there is no particular great workflow method. One method is to, for your particular sourcetype in props.conf, set DATETIME_CONFIG = /etc/null_datetime.xml with an xml file such as:

<datetime>
    <timePatterns>
    </timePatterns>
    <datePatterns>
    </datePatterns>
</datetime>

An alternate method is to change the log level for DateParserVerbose to DEBUG, which will cause strptime failures to be written to splunkd.log. This is very verbose however, so not recommended for high volume environments.

yannK
Splunk Employee
Splunk Employee

All those years, it was there, just under my nose!

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...