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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...