Logstash showing error

here is my logstash_car.conf file

file{
path => "C:\Users\ravi\Downloads\data\car.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","fuel_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{}

}

if i am running the logstash it showing following error

C:\Users\ravi\Downloads\logstash-5.4.2\logstash-5.4.2\bin>logstash -f logstash_c
ar.conf
Sending Logstash's logs to C:/Users/ravi/Downloads/logstash-5.4.2/logstash-5.4.2
/logs which is now configured via log4j2.properties
[2017-06-28T20:03:41,532][ERROR][logstash.agent ] Cannot create pipeli
ne {:reason=>"Expected one of #, input, filter, output at line 1, column 1 (byte

  1. after "}

i am not getting how to resolve this error

You do not seem to have an input block wrapping the file input.

1 Like

thank you so much Christian. now its working

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