Logstash筆記(二) ----input插件
在"hello World" 示例中,我們已經見到並介紹了Logstash 的運行流程和配置的基礎語法。 請記住一個原則:Logstash 配置一定要有一個 input 和一個 output。在演示過程中,如果沒有寫明 input,默認就會使用 "hello world" 裏我們已經演示過的 input/stdin ,同理,沒有寫明的 output 就是 output/stdout
如果有什麽問題的話,請查看該文檔:http://udn.yyuap.com/doc/logstash-best-practice-cn/input/index.html。以下是input插件的具體解釋:
(1),標準輸入。type和tags是logstash事件中特殊的字段。 type 用來標記事件類型
[[email protected] test]# vim stdin.conf input { stdin { add_field => {"key" => "value"} codec => "plain" tags => ["add"] type => "std-lqb" } } output { stdout { codec => rubydebug } } [[email protected]