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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...