用于Elasticsearch的未知设置“主机”

西德斯(Sidharth)

我试图在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之前的版本),只需将其重命名hostshost,就可以了:

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

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章