logstash官方入门例子:
logstash-simple.conf
stdin { type => "stdin-type"}} output { stdout { debug => true debug_format => "json"} elasticsearch { embedded => true } }
执行命令:
java -jar logstash-1.1.9-monolithic.jar agent -f logstash-simple.conf
linux_syslog.conf
input { stdin { type => "stdin-type" } file { type => "linux-syslog" # Wildcards work, here :) path => [ "/var/log/*.log", "/var/log/messages", "/var/log/syslog" ] } } output { stdout { } elasticsearch { embedded => true } }
java -jar logstash-1.1.9-monolithic.jar agent -f linux_syslog.conf -- web --backend elasticsearch:///?local
直接结果截图: