Getting Data In

CSV timestamp based on 2 columns

aasabatini
Motivator

Hi folks,

I need an help, I have to index a csv file, currently this csv file have a column for a date and another one for the hous, I need to merge these to columns to extract the timestamp aat index time with a props file.

Example

Field 1  datehour
abc16-06-202116:00  17:00
abc16-06-2021 16:00  17:00
abcetc....etc...
abcetc...etc...

 

on the hour column I need only the first value

thanks in advance

Ale

“The answer is out there, Neo, and it’s looking for you, and it will find you if you want it to.”
Labels (3)
Tags (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

props.conf has settings for that.

[mysourcetype]
INDEXED_EXTRACTIONS = CSV
TIMESTAMP_FIELDS = date,hour
TIME_FORMAT = %d-%m-%Y,%H:%M

I'm not 100% certain about the separator to use in TIME_FORMAT so the comma may have to change.

---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

props.conf has settings for that.

[mysourcetype]
INDEXED_EXTRACTIONS = CSV
TIMESTAMP_FIELDS = date,hour
TIME_FORMAT = %d-%m-%Y,%H:%M

I'm not 100% certain about the separator to use in TIME_FORMAT so the comma may have to change.

---
If this reply helps you, Karma would be appreciated.

aasabatini
Motivator

Thanks @richgalloway 

works fine!

Ale

“The answer is out there, Neo, and it’s looking for you, and it will find you if you want it to.”
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 ...