I have an index with this settings and mappings.
PUT /amazon_products
{
"settings": {
"number_of_shards": 1,
"number_of_replicas": 0,
"analysis": {
"analyzer": {}
}
},
"mappings": {
"properties": {
"id": {
"type": "keyword"
},
"title": {
"type": "text"
},
"description": {
"type": "text"
},
"manufacturer": {
"type": "text",
"fields": {
"raw": {
"type": "keyword"
}
}
},
"price": {
"type": "scaled_float",
"scaling_factor": 100
}
}
}
}
This fields also exist in my file and i want to send my data from csv file to using .文件中,我想使用将我的数据从 csv 文件发送到 。
This is my logstash config file:
input {
file {
path => "E:\ElasticStack\Logstash\products.csv"
start_position => "beginning"
sincedb_path => "NULL"
}
}
filter {
csv {
separator => ","
columns => ["id","title","description","manufacturer","price"]
}
}
output {
elasticsearch {
hosts => "http://localhost:9200"
index => "amazon_products"
}
stdout {}
}
When if use this command The only message from logstash is:来自 logstash 的唯一消息是:
and it doesn't send data to elasticsearch并且它不向 elasticsearch 发送数据
Please Help Me. Thank You:)
Use forward slashes in your path configuration even on windows, also change the sincedb_path
to NUL
.
Try this config in your input
input {
file {
path => "E:/ElasticStack/Logstash/products.csv"
start_position => "beginning"
sincedb_path => "NUL"
}
}
try to set the sincedb_path
parameter to "NUL".
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.