首页
学习
活动
专区
圈层
工具
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

logstash之input配置stdin类型详解

代码语言:javascript
复制
配置示例
input {
	stdin {
		type => "demo-stdin"
		add_field => {"test" => "hello"}
        codec => "plain"
		tags => ["stdin-test"]
	}
}
output {
	stdout{
		codec=>rubydebug
	}
}
启动
bin/logstash -f /etc/logstash/conf.d/demo-input-stdin.conf
输入test
返回
{
    "@timestamp" => 2017-06-12T07:39:40.278Z,
          "test" => "hello",
      "@version" => "1",
          "host" => "192-168-56-201",
       "message" => "test",
          "type" => "demo-stdin",
          "tags" => [
        [0] "stdin-test"
    ]
}
下一篇
举报
领券