【发布时间】:2017-12-11 20:39:25
【问题描述】:
我在同一台主机上运行 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 版
【问题讨论】:
-
当你登录到你的 ES 机器 (192.168.56.100) 并运行
curl 127.0.0.1:9200时,你会得到响应吗? -
是的,先生,我得到了回应
标签: elasticsearch logstash kibana logstash-configuration elasticsearch-5