| 知乎专栏 | 多维度架构 | 微信号 netkiller-ebook | QQ群:128659835 请注明“读者” |
# curl 'http://localhost:9200/_search?pretty'
{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 1.0,
"hits" : [
{
"_index" : ".kibana",
"_type" : "config",
"_id" : "5.2.2",
"_score" : 1.0,
"_source" : {
"buildNum" : 14723
}
}
]
}
}
elasticsearch 的配置不能省略 9200 端口,否则将无法链接elasticsearch
elasticsearch {
hosts => ["127.0.0.1:9200"]
}
#cd /etc/logstash/conf.d
#vim logstash_server.conf
input {
redis {
port => "6379"
host => "127.0.0.1"
data_type => "list"
key => "logstash-redis"
type => "redis-input"
}
}
output {
stdout {
codec => rubydebug
}
}