Logstash之inputs配置:

 

input plugin doc:

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

ELK 学习笔记之 Logstash之inputs配置

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

1. stdin input plugin

参数:

ELK 学习笔记之 Logstash之inputs配置

建立stdin-sample.conf:

input {

 stdin {}

}

output {

 stdout {}

}

执行:

./logstash -f stdin-sample.conf

输入即所得

ELK 学习笔记之 Logstash之inputs配置

2. file input plugin

参数:

ELK 学习笔记之 Logstash之inputs配置

建立 file-sample.conf:

input{

file{

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

type => "mongodblog"

start_position => "beginning"

}

}

output{

stdout{}

}

执行:

./logstash -f file-sample.conf

ELK 学习笔记之 Logstash之inputs配置

MongoDB的日志都读进来来。

 

相关文章:

  • 2021-11-24
  • 2021-10-30
  • 2021-09-06
  • 2021-07-10
  • 2022-02-15
  • 2021-07-04
  • 2021-09-04
猜你喜欢
  • 2021-04-29
  • 2021-06-12
  • 2022-02-21
  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
相关资源
相似解决方案