Splunk Search

Date code being interpreted incorrectly

lautero
New Member

I had an IBM reporting program exporting CSV data with Splunk reading it correctly for a few hours. During this period, I also exported 30 days worth of historical data, and had it all imported correctly.

As soon as the clock ticked past midnight on the 10th of May, everything started going a bit weird. Events from yesterday (10/May/2012) were interpreted as the 12th of May 2010. Events from today are going in as the 12th of May 2011.

Here is an example of CSV data that worked correctly

devicename,volumename,9/05/12 18:05,

And here is an example of CSV data that did not work correctly

devicename,volumename,11/05/12 09:19

As you can see, the date codes in both are in the same format. One worked correctly, one didn't, and I can't work out why.

The data is picked up with this section of inputs.conf

monitor://C:\IBM\TPC\data\log\reports\splunk_mdiskgrp]
alwaysOpenFile= 1
disabled = false
sourcetype=ibm-tpc-mdg

I've tried in vain to add this kind of thing to the props.conf based on what I found online, with no success. Full disclosure: I have no idea what I'm doing.

[ibm-tpc-mdg]
TIME_FORMAT = %d/%m/%y %H:%M
MAX_TIMESTAMP_LOOKAHEAD = 57
TIME_PREFIX = (?i).*?,(?P<FIELDNAME>\d+/\d+/\d+\s+\d+:\d+)(?=,)

I'm hoping someone has seen this kind of thing before!

Tags (3)
0 Karma

kristian_kolb
Ultra Champion

The TIME_PREFIX should not have a field-extractig regex in it. It should match the text just BEFORE the timestamp starts, but not the timestamp itself.

Try this:

TIME_PREFIX = ^[^,]+,[^,]+,\s*

Hope this helps,

Kristian

0 Karma

kristian_kolb
Ultra Champion

could you post a couple of actual log events?

/k

0 Karma

Ayn
Legend

Did you check this after a restart, and only on events that have been indexed after you made your changes? Because the events that are already in the indexed will not be affected by these changes.

0 Karma

lautero
New Member

Thanks Kristian, I've given that a shot but it hasn't made any difference.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Event Series: Telemetry Pipeline Management

Balancing Scale and Spend: Gaining Control Over High-Volume Metrics in Splunk Observability Cloud As ...

Kick the Tires Before You Commit: A Hands-On Tour of the Splunk Observability Cloud ...

Evaluating an enterprise observability platform usually goes like this: fill out a form, get a free trial with ...

Deep insights, no barriers: Splunk Observability Cloud Free Edition

As software delivery cycles continue to accelerate, observability shouldn’t be a luxury — it should be a ...