我在同一主机上运行logstash(192.168.56.100)和elasticsearch(192.168.56.100),但elasticsearch只是创建索引而没有接收数据。我尝试在不同的主机上运行logstash(192.168.56.101),并且elasticsearch(192.168.56.100)可以接收数据。这是我的elasticsearch和logstash配置elasticsearch未从本地主机接收
示例数据: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
当你登录到你的ES机器(192.168.56.100)并运行'curl 127.0.0.1:9200'你会得到一个响应吗? –
yaah我得到了响应先生 – john