Getting Data In

How to get Splunk to index a small 1.5KB CSV file?

vr2312
Contributor

I am trying to make Splunk read/index a CSV that is of 1.5KB.

I have used the traditional CRCSALT=>SOURCE> tag in the inputs.conf, however, that does not seem to work.

Any ideas, how i can make the file read? It is a once a week feed and it does not process the files.

1 Solution

vr2312
Contributor

Using "initCrcLength = XX" in the inputs.conf fixed the issue.

View solution in original post

0 Karma

vr2312
Contributor

Using "initCrcLength = XX" in the inputs.conf fixed the issue.

0 Karma

hardikJsheth
Motivator

Please add following stanza for your source type in props.conf on indexer. Without this, Splunk will not index csv file correctly.

[sourcetype]
INDEXED_EXTRACTIONS=CSV

Also if the CSV file is already read, splunk will not re read it without clearing fish bucket. To know more about how to clear fishbucket, refer answer from Yann.https://answers.splunk.com/answers/72562/how-to-reindex-data-from-a-forwarder.html

0 Karma

vr2312
Contributor
[monitor:///Data/scripts/email_listener/logs/username/usernames*.csv]

sourcetype = username
source = username
host = username
index = main
crcSalt = <SOURCE>
0 Karma

somesoni2
Revered Legend

Are you using batch OR monitor in inputs.conf?

0 Karma

jkat54
SplunkTrust
SplunkTrust

Should be crcSalt=<SOURCE> capitalization / case sensitivity matters.

Also i think its a typo but there should be a less than sign on left side of SOURCE and greater than sign on right side.

0 Karma

vr2312
Contributor
[monitor:///Data/scripts/email_listener/logs/username/usernames*.csv]

sourcetype = username
source = username
host = username
index = main
crcSalt = <SOURCE>
0 Karma

vr2312
Contributor

Yes. It is a typo. That is what happens when you break your head against such unforeseen issues.

And thus the capslock was ON.

But this did not work. 😞

0 Karma

jkat54
SplunkTrust
SplunkTrust

Can you post the csv file somewhere like pastebin.com?

If its 1.5KB that means its ~ 1500B which means it has well over 256 characters if in ASCII because each ASCII character = 1Byte on disk. So there's enough data to form a proper CRC salt.

Also if you could provide the inputs.conf and props.conf stanzas for the data source maybe there is a config issue there.

0 Karma

vr2312
Contributor

I am unable to use the crcSalt = [] in the comment box. It is getting invisible.

0 Karma

vr2312
Contributor

@jkat54

Sorry to get back to you on this after a long time.

Inputs.conf :
[monitor:///Data/scripts/email_listener/logs/username/usernames*.csv]
sourcetype = username
source = username
host = username
index = main
crcSalt=

THere is no props.conf created.

Also assume the CSV contains numbers in one single column. Contains random numbers for around 132 rows.

0 Karma

jkat54
SplunkTrust
SplunkTrust

put the 'code' in codeblocks. Highlight it and click the 101010 button.

This will make

 crcSalt=<SOURCE> 

show up

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...