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!

Now Available: Cisco Talos Threat Intelligence Integrations for Splunk Security Cloud ...

At .conf24, we shared that we were in the process of integrating Cisco Talos threat intelligence into Splunk ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Easily Improve Agent Saturation with the Splunk Add-on for OpenTelemetry Collector

Agent Saturation What and Whys In application performance monitoring, saturation is defined as the total load ...