怎么又是你

logstash配置output问题

Logstash | 作者 yuki_xl | 发布于2018年10月24日 | 阅读数:11020

因为之前是输出到es里的,运行了好几个月了,配置是没问题的。然后最近要改到kafka里,我就只修改了outpt,改为kafka,配置如下:
output {
stdout { codec => rubydebug }
kafka {
bootstrap_servers => "x.x.x.x:9092,x.x.x.x:9092"
topic_id => "logstashlog"
}
启动没有报错,但是有几行日志看着很奇怪
[2018-10-24T10:07:51,566][INFO ][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://logstash_system:xxxxxx@x.x.x.x:9200/_xpack
/monitoring/?system_id=logstash&system_api_version=2&interval=1s]}}
[2018-10-24T10:07:51,597][INFO ][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>http://logstash_system:xxxxxx@x.x.x.x:9200/, :path=>"/"}
[2018-10-24T10:07:52,580][WARN ][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=>#<URI::HTTP URL:http://logstash_system:xxxxxx@x.x.x.x:9200/&gt;}
[2018-10-24T10:07:52,590][INFO ][logstash.outputs.elasticsearch] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>[#<URI::HTTPURL:http://x.x.x.x:9200&gt;]}
明明没有配置es,为什么还有
[logstash.outputs.elasticsearch]这种日志。。后来我去yml文件里看到了有配置xpack,我把那两行删掉
启动就报错了
[2018-10-24T15:59:29,471][ERROR][logstash.outputs.elasticsearch] Attempted to send a bulk request to elasticsearch, but no there are no living connections in the connection pool. Perhaps Elasticsearch is unreachable or down? {:error_message=>"No Available connections", :class=>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::NoConnectionAvailableError", :will_retry_in_seconds=>64}
[2018-10-24T15:59:30,589][INFO ][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>http://logstash_system:xxxxxx@localhost:9200/, :path=>"/"}
[2018-10-24T15:59:30,840][WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>#<URI::HTTP:0x3efcebee URL:http://logstash_system:xxxxxx% ... gt%3B, :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://logstash_system:xxxxxx@localhost:9200/][Manticore::SocketException] 不允许联接 (connect failed)"}
启动时已经指定了配置文件了,救救孩子吧T^T
已邀请:

rochy - rochy_he

赞同来自:

看日志是执行了之前旧的配置文件,你看一下 logstash 扫描的配置文件夹下是不是有旧的配置文件
如果有的话 可以移到其他文件夹下

zqc0512 - andy zhou

赞同来自:

下载 解压一个新的logstash 配置看看。
肯定有地方没有修改完……

yuki_xl

赞同来自:

不知道为什么一定要配置xpack,日志还是会打印[logstash.outputs.elasticsearch]相关的东西,但重要的是kafka还能收到数据。所以算是完成了任务,但是对这个问题还是有点疑惑

要回复问题请先登录注册