Splunk Search

timestamp for csv

friskyapple
Explorer

I'm just starting out with splunk and have a few CSVs that i'm trying to import. the main one contains library records from the past decade. It originally contained both in and out time, but i've broken it down to be as simple as possible to start with and given it just the initial check out time. The times are all written in the same manner. There's about 134000 entries total. 

game_id,attendee_id,event_id,check_out_time
328,7199,5,2010-09-05 01:32:57
228,7241,5,2010-09-05 01:33:13
379,7327,5,2010-09-05 01:33:51
96,6729,5,2010-09-05 01:34:37

when i go to import this data , the timestamp is always wrong:

splunk.PNG

 I've read through numerous forum posts on splunk and other websites and had multiple people double check the csv; I cannot identify why it struggles to pull the correct timestamp for these events. 

 

Any help will be greatly appreciated. 

0 Karma
1 Solution

bowesmana
SplunkTrust
SplunkTrust

@friskyapple 

You should use capital Y for 4 digit years. Your lower case y is a two digit year.

However, that timestamp is ISO8601 so I would expect it to extract it automatically

You also need to add the MAX_DAYS_AGO setting to allow it to pick up dates in 2010 as by default it will only go back 2000 days. See that setting here

https://docs.splunk.com/Documentation/Splunk/8.0.5/Admin/Propsconf

View solution in original post

to4kawa
Ultra Champion

2010-09-05 01:32:57

%Y-%m-%d %T

not %y

but you don't need time settings. 

splunk can extract time automatically.

bowesmana
SplunkTrust
SplunkTrust

@friskyapple 

You should use capital Y for 4 digit years. Your lower case y is a two digit year.

However, that timestamp is ISO8601 so I would expect it to extract it automatically

You also need to add the MAX_DAYS_AGO setting to allow it to pick up dates in 2010 as by default it will only go back 2000 days. See that setting here

https://docs.splunk.com/Documentation/Splunk/8.0.5/Admin/Propsconf

friskyapple
Explorer

holy cow it worked, thank you!! I cannot express my thanks enough.

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!

From Data to Insight: Announcing the Winners of the Splunk Dashboard Contest

Hi Splunkers, First off, thank you to everyone who participated in our very first From Data to Insight: The ...

Splunk Developers: Construct Your Future at the .conf26 Builder Bar

Calling all Splunk architects, platform admins, and app developers: the site is open, and the blueprints are ...

Quick connection discovery mode for forwarders

When a Splunk forwarder loses connectivity to its indexers, it does not always reconnect immediately. In many ...