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!

Get Agentic with Splunk Lantern: Connect to Cisco Cloud Control, Transform ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...

July Community Events: Master ITSI 5.0 & Automate Splunk

Struggling with alert fatigue or feeling like you're spending more time on infrastructure maintenance than ...

New Release of Federated Search: Bringing Splunk Analytics to More of Your Data

Organizations today are generating more data than ever and storing it across cloud object stores, data lakes, ...