首页 > 其他 > 详细

ELK 学习笔记之 Logstash之inputs配置

时间:2017-09-23 12:53:14      阅读:236      评论:0      收藏:0      [点我收藏+]

Logstash之inputs配置:

 

input plugin doc:

https://www.elastic.co/guide/en/logstash/current/index.html

技术分享

插件很多,选两个常用的使用下。

1. stdin input plugin

参数:

技术分享

建立stdin-sample.conf:

input {

 stdin {}

}

output {

 stdout {}

}

执行:

./logstash -f stdin-sample.conf

输入即所得

技术分享

2. file input plugin

参数:

技术分享

建立 file-sample.conf:

input{

file{

path => ["/usr/local/mongodb/logs/mongodb.log"]

type => "mongodblog"

start_position => "beginning"

}

}

output{

stdout{}

}

执行:

./logstash -f file-sample.conf

技术分享

MongoDB的日志都读进来来。

 

ELK 学习笔记之 Logstash之inputs配置

原文:http://www.cnblogs.com/AK47Sonic/p/7580772.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!