[英]Logstash start successfully but doesn't work
我有一個包含此設置和映射的索引。
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
}
}
}
}
這個字段也存在於我的.csv文件中,我想使用logstash將我的數據從 csv 文件發送到elasticsearch 。
這是我的 logstash 配置文件:
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 {}
}
如果使用此命令.\logstash -f..\config\logstash.conf
來自 logstash 的唯一消息是:
成功啟動 Logstash API 端點 {:port=>9600}並且它不向 elasticsearch 發送數據
請幫我。 謝謝你:)
即使在 Windows 上,也可以在路徑配置中使用正斜杠,並將sincedb_path
更改為NUL
。
在您的輸入中嘗試此配置
input {
file {
path => "E:/ElasticStack/Logstash/products.csv"
start_position => "beginning"
sincedb_path => "NUL"
}
}
嘗試將sincedb_path
參數設置為“NUL”。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.