Splunk Search

csv files can't ignore headers

mmekroud
Explorer

Dear all,

Actually working on csv files on Splunk (v6.2.3), i have such troubles to index them correctly,

contains data are like the followings:

filed1; field2; filed3; DATE
content1; content2; content3; 23-02-2015
content4; content5; content6; 24-02-2016
...

So, when I set the input.conf and transforms.conf it recognize my fields but I still get in my search the csv header on the first line of my field , and "DATE" is shown as DATE: DATEcontent1;

bellow my props & transforms configuration

props.conf:

[source::.../report_*.csv]

CHECK_FOR_HEADER = true
SHOULD_LINEMERGE=false
INDEXED_EXTRACTIONS = csv
TIME_FORMAT = %Y-%m-%d
KV_MODE = none
TZ = UTC

report_extract=extract_field

Transforms.conf:

[report_extract=extract_field]
DELIMS = ";"
FIELDS ="filed1","field2","field3","DATE"

thanks in advance for your help,

regards,
mm

Tags (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Try adding the following to your props.conf file. Then you shouldn't need the transforms.conf stanza.

FIELD_DELIMITER=;
HEADER_FIELD_DELIMITER=;
TIMESTAMP_FIELDS=DATE
TIME_FORMAT=%d-%m-%Y
---
If this reply helps you, Karma would be appreciated.
0 Karma

mmekroud
Explorer

Thank you richgalloway for your reply,
i added what you suggest and removed the transforms.conf , but this time , it doesn't recover any field

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!

Observability Simplified: Combining User Experience, Application Performance & ...

Tech Talk Observability Simplified: Combining User Experience, Application Performance & Network ...

Event Series May & June: From Network Visibility to Service Intelligence

Unifying the Network: Moving from Alert Noise to Service Intelligence with Splunk ITSI In today’s hybrid ...

Global Splunk User Group Events: May + June 2026

Your Splunk Community Awaits: Discover Upcoming User Group Events Worldwide    Staying ahead in the fast-paced ...