数据存到Elasticsearch
代码语言:javascript
复制[root@h102 etc]# vim logstash-es-simple.conf
[root@h102 etc]# cat logstash-es-simple.conf
input {stdin{}}
output {
elasticsearch {hosts=>"localhost:9200"}
stdout {codec=>rubydebug}
}
[root@h102 etc]#
[root@h102 etc]# /opt/logstash/bin/logstash -f logstash-es-simple.conf
Settings: Default filter workers: 1
Logstash startup completed
simple test
{
"message" => "simple test",
"@version" => "1",
"@timestamp" => "2015-12-22T13:35:33.252Z",
"host" => "h102.temp"
}
getting started with logstash
{
"message" => "getting started with logstash",
"@version" => "1",
"@timestamp" => "2015-12-22T13:35:47.999Z",
"host" => "h102.temp"
}
hello example
{
"message" => "hello example",
"@version" => "1",
"@timestamp" => "2015-12-22T13:35:58.383Z",
"host" => "h102.temp"
}
...
...