# 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 } }
5.x type类型如果是date,那么系统默认使用 ISO8601 格式。 6.x 修复了这个问题。"ctime": "2017-12-18 11:21:57"
原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。