Logstash 启动成功但不工作
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 文件中,我想使用 [=20] 将我的数据从 csv 文件发送到 elasticsearch =] logstash 。
这是我的 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 发送数据
请帮我。谢谢 :)
尝试将 sincedb_path
参数设置为 "NUL"。
即使在 windows 上,也要在路径配置中使用正斜杠,还要将 sincedb_path
更改为 NUL
。
在您的输入中尝试此配置
input {
file {
path => "E:/ElasticStack/Logstash/products.csv"
start_position => "beginning"
sincedb_path => "NUL"
}
}
我有一个包含此设置和映射的索引。
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 文件中,我想使用 [=20] 将我的数据从 csv 文件发送到 elasticsearch =] logstash 。
这是我的 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 发送数据
请帮我。谢谢 :)
尝试将 sincedb_path
参数设置为 "NUL"。
即使在 windows 上,也要在路径配置中使用正斜杠,还要将 sincedb_path
更改为 NUL
。
在您的输入中尝试此配置
input {
file {
path => "E:/ElasticStack/Logstash/products.csv"
start_position => "beginning"
sincedb_path => "NUL"
}
}