Issue with importing CVS file

Hello all;

I am using the following config. to import CVS file using logstash but when I call it, it give me the error that I have listed in item number 2. I would appreciate your assistance.

Thanks

item #1
input {
file {
path => "/users/mkazemi/desktop/elastic/data/cars.csv"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
csv {

	separator => ","

	columns => [ "maker", "model", "mileage", "manufacture_year", "engine_displacement", "engine_power", 
	"body_type", "color_slug", "stk_year" , "transmission", "door_count", "seat_count", "fule_type","date_created", 
	"date_last_seen", "price_eur"]
}

mutate {convert => ["mileage", "integer"] }
mutate {convert => ["price_eur", "float"] }
mutate {convert => ["engine_power", "integer"] }
mutate {convert => ["door_count", "integer"] }
mutate {convert => ["seat_count", "integer"] }

}
output {
elasticsearch {
hosts => "localhost"
index => "cars"
document_type => "sold_cars"
}
stdout {}
}

Item #2

C:\Users\mkazemi\Desktop\Elastic\logstash\bin>logstash -f /users/mkazemi/desktop/elastic/data/logstash_car.config

Sending Logstash's logs to C:/Users/mkazemi/Desktop/Elastic/logstash/logs which is now configured via log4j2.properties
[2018-05-04T16:03:41,619][INFO ][logstash.agent ] No config files found in path {:path=>"C:/users/mkazemi/desktop/elastic/data/logstash_car.config"}
[2018-05-04T16:03:41,624][ERROR][logstash.agent ] failed to fetch pipeline configuration {:message=>"No config files found: /users/mkazemi/desktop/elastic/data/logstash_car.config. Can you make sure this path is a logstash config file?"}

What happens if you include the drive letter in the path to the config?

Thanks Badger for Response, I add C: in the beginning of my path but I got the same message

C:\Users\mkazemi\Desktop\Elastic\logstash\bin>logstash -f /users/mkazemi/desktop/elastic/data/logstash_car.config
Sending Logstash's logs to C:/Users/mkazemi/Desktop/Elastic/logstash/logs which is now configured via log4j2.properties
[2018-05-04T16:32:32,019][INFO ][logstash.agent ] No config files found in path {:path=>"C:/users/mkazemi/desktop/elastic/data/logstash_car.config"}
[2018-05-04T16:32:32,035][ERROR][logstash.agent ] failed to fetch pipeline configuration {:message=>"No config files found: /users/mkazemi/desktop/elastic/data/logstash_car.config. Can you make sure this path is a logstash config file?"}

I do not see a drive letter in the path to the config. Can you try running

logstash -f C:/users/mkazemi/desktop/elastic/data/logstash_car.config

Please use appropriate markup when posting logs. Using an indent of 4 spaces is what I did there.

Thanks Badger for input this is what I did as you said but I got the following error message. Pls advise

C:\Users\mkazemi\Desktop\Elastic\logstash\bin>logstash -f C:/users/mkazemi/desktop/data/logstash_car.config

Sending Logstash's logs to C:/Users/mkazemi/Desktop/Elastic/logstash/logs which is now configured via log4j2.properties

[2018-05-08T10:32:22,965][ERROR][logstash.agent ] failed to fetch pipeline configuration

{:message=>"URI scheme not supported: C:/users/mkazemi/desktop/data/logstash_car.config\n
Either pass a local file path or "file|http://" URI"}

Reading it again I think you had it correct the first time (without the drive letter). Is logstash_car.config really in the data directory?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.