elasticsearch没有从localhost接收

时间:2017-07-07 13:54:57

标签: elasticsearch logstash kibana logstash-configuration elasticsearch-5

我在同一主机上运行logstash(192.168.56.100)和elasticsearch(192.168.56.100),但elasticsearch只创建索引而不接收数据。我尝试在不同的主机上运行logstash(192.168.56.101),而elasticsearch(192.168.56.100)可以接收数据。这是我的elasticsearch和logstash配置

示例数据:12345~78904

input {
  file {
    path => "/tmp/tmp.log"
  }
}

filter {
    grok {
     match => ["message" , '%{INT:shopID}~%{INT:userID}']
   }
}

output {
  elasticsearch {
    hosts => "127.0.0.1:9200"
    index => "shop"
  }
}





# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 0.0.0.0
#
# Set a custom port for HTTP:
#
http.port: 9200

elasticsearch版本5.1.1 - logstash版本2.4.0

1 个答案:

答案 0 :(得分:0)

logstash日志中是否有任何错误?请尝试在elasticsearch.yml 0.0.0.0_local_中设置127.0.0.1https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html#network-interface-values

相关问题