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!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...