Getting Data In

hour component of timestamp ignored, because there is no minute component

imrago
Contributor

I would like to extract this timestamp:

2013-07-03,8

with

%Y-%m-%d,%H

but I am unable to that because:
If <strptime-style format> contains an hour component, but no minute component, TIME_FORMAT ignores the hour component. It treats the format as an anomaly and considers the precision to be date-only. Splunk Docs

How could I disable that feature?

Tags (2)
0 Karma

chimbudp
Contributor

You can use REGEX , in this case :
You may need to edit the props.conf

BREAK_ONLY_BEFORE =
* When set, Splunk creates a new event only if it encounters a new line that matches the
regular expression.
* Defaults to empty.

MUST_BREAK_AFTER =
* When set and the regular expression matches the current line, Splunk creates a new event for
the next input line.
* Splunk may still break before the current line if another rule matches.
* Defaults to empty.

MUST_NOT_BREAK_AFTER =
* When set and the current line matches the regular expression, Splunk does not break on any
subsequent lines until the MUST_BREAK_AFTER expression matches.
* Defaults to empty.

MUST_NOT_BREAK_BEFORE =
* When set and the current line matches the regular expression, Splunk does not break the
last event before the current line.
* Defaults to empty.
* List item

0 Karma

imrago
Contributor

The line breaking is working fine and Splunk is finding the timestamps.

The problem is that only the date part is used.

0 Karma

chimbudp
Contributor

This site may be helpful in creating regex :
http://gskinner.com/RegExr/

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...