elasticsearch Elasticsearch:遇到可重试的错误
我已经编写了一个Logstash配置文件,这样它就可以从一个文件中读取日志消息,然后将数据传输到elasticsearch 配置文件的位置:pipe.conf /etc/logstash/conf.d pipe.conf包含以下内容:elasticsearch Elasticsearch:遇到可重试的错误,elasticsearch,logstash,elasticsearch,Logstash,我已经编写了一个Logstash配置文件,这样它就可以从一个文件中读取日志消息,然后将数据传输到elasticsearch 配置文件的位置:pipe.conf /etc/logstash/conf.d pipe.conf包含以下内容: input { file { path => "/var/log/elasticsearch/file.log" sincedb_path => "/dev/null" start_posit
input
{
file
{
path => "/var/log/elasticsearch/file.log"
sincedb_path => "/dev/null"
start_position => "beginning"
type => "doc"
}
}
output
{
elasticsearch
{
hosts => ["localhost:9200"]
action => "create"
index => ["logs"]
}
}
当Logstash运行时,会发生错误
"[Ruby-0-Thread-10@[main]>worker3: :1] elasticsearch - Encountered a retryable error. Will Retry with exponential backoff {:code=>400, :url=>"http://localhost:9200/_bulk"}"
默认操作是创建。因此,我们需要增加行动。
elasticsearch{
主机=>[”http://localhost:9200"]
索引=>“日志”
}