Csv file no reading?

i am trying to read cvs file. i see similar post but see no definite answer. is it the pointer issue that cvs file does not have pointer?

If so, logstash doesn't work for static cvs file?

my config below:
input {
file {
path => "/Desktop/sample.csv"
start_position => "beginning"
ignore_older => 0
sincedb_path => "/dev/null"
}
}

filter {
csv {
columns => ["ets_ccsdk_events","archivedb","archivepk","authsrc","blob","blobcompression","brioaccountid","brioaccountname","briomeetingname","briomeetingsessionid","briousersessionid","code","collectiondts","collectionenv","collectionhost","documentid","documentlength" ]
}
}

output {
stdout { codec => rubydebug }
}

~
~

With your settings of start_position, ignore_older, and sincedb_path Logstash should indeed read the file. Please show the output of these commands:

ls -l /Desktop/sample.csv
ls -ld /Desktop

Hi Below is the output. Is anything wrong with it?

yangyan-osx:~ yangyan$ ls -l Desktop/sample.csv
-rw-r--r--@ 1 yangyan staff 4161113 Sep 20 17:48 Desktop/sample.csv
yangyan-osx:~ yangyan$ ls -ld Desktop
drwx------+ 18 yangyan staff 612 Sep 22 15:00 Desktop

Those are not the commands I asked you to run. Please run exactly what I asked for.

Sorry, pls see below. What does it mean..?

yangyan-osx:~ yangyan$ ls -l /Desktop/sample.csv
ls: /Desktop/sample.csv: No such file or directory
yangyan-osx:~ yangyan$ ls -ld /Desktop
ls: /Desktop: No such file or directory

You have configured Logstash to read /Desktop/sample.csv but there is no such file (as the command above proves). The actual filename seems to be /Users/yangyan/Desktop/sample.csv or similar, so that's what your Logstash configuration should point to.

2 Likes