gpt4 book ai didi

elasticsearch - Elasticsearch 的未知设置 'hosts'

转载 作者:行者123 更新时间:2023-11-29 02:53:58 25 4
gpt4 key购买 nike

我试图在我的 mac 上运行 logstash 配置文件,但每次我这样做时,我都会收到此错误:

 'Unknown setting 'hosts' for elasticsearch {:level=>:error} 
Error: Something is wrong with your configuration.
You may be interested in the '--configtest' flag which you can
use to validate logstash's configuration before you choose
to restart a running system.'

我正在检索 JIRA 数据并将其发送到 elasticsearch,但即使是这个简单的任务也会返回错误。这是我的代码:

 input{
exec {
command => "curl -u username:password https://mycompany.atlassian.net/rest/api/latest/search?maxResults=10"
interval => 300
}
}
output{
elasticsearch{
hosts => ["127.0.0.1:9200"]
index => "test"
}
}

最佳答案

您可能使用的是旧版本的 Logstash(2.0 之前的版本),只需重命名 hosts to host你会没事的:

   output{
elasticsearch{
host => ["127.0.0.1:9200"]
index => "test"
}
}

关于elasticsearch - Elasticsearch 的未知设置 'hosts',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39082203/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com