I use a simple csv config file as shown below. A
input {
file {
path => "/Users/pgervais/Elk/mach.csv”
start_position => “beginning”
sincedb_path => “/dev/null”
}
}
filter {
csv {
convert => {
"ObsDate" => “date”
"ObsHour" => “integer”
"GPPLoadMIPS" => “float”
"zIIPLoadMIPS" => “float”
"GPPCapacityMIPS" => "float”
"zIIPCapacityMIPS" =>"float”
}
separator => “,”
autodetect_column_names => true
}
}
output {
elasticsearch {
hosts => "localhost"
index => "mach"
document_type => "mach_record"
}
stdout {}
}
According to csv filter docs, i should not get syntax errors on this. When i run it simply as a test using logstash-6.0.0/bin/logstash -f mach.conf -t i get the following error:
logstash-6.0.0/bin/logstash -f mach.conf -t
Sending Logstash's logs to /Users/pgervais/Elk/logstash-6.0.0/logs which is now configured via log4j2.properties
[2017-11-15T20:24:27,154][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"fb_apache", :directory=>"/Users/pgervais/Elk/logstash-6.0.0/modules/fb_apache/configuration"}
[2017-11-15T20:24:27,161][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"netflow", :directory=>"/Users/pgervais/Elk/logstash-6.0.0/modules/netflow/configuration"}
[2017-11-15T20:24:27,276][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2017-11-15T20:24:27,454][FATAL][logstash.runner ] The given configuration is invalid. Reason: Expected one of #, {, } at line 11, column 4 (byte 171) after input {
file {
path => "/Users/pgervais/Elk/mach.csv”
start_position => “beginning”
sincedb_path => “/dev/null”
}
}
filter {
csv {
convert => {
"
I also get errors when i try and specify the columns commnd:
columns => [ "Machine","ObsDate" , "ObsHour" , "GPPLoadMIPS", "zIIPLoadMIPS" , "GPPCapacityMIPS","zIIPCapacityMIPS" ]
It almost as if the csv is not loaded. So i checked via logstash-plugin logstash-6.0.0/bin/logstash-plugin list
The csv filter plugin is loaded.
Therefore why is the syntax as described in the logstash csv documentation generating errors?
I get this on version 5.6.4 and 6.00. i have followed the installation instructions.
What am i missing here?