我在同一主機上運行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