版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/snake1900/article/details/66477040
logstash5.x Input-plugins
An input plugin enables a specific source of events to be read by Logstash.
Input-plugins 是 logstash 定制化的输入事件源,在5.x版本下一共有 52 种插件 可供选择。
例如:命令方式、kafka中读取 ,文件中读取,redis 中读取,http方式读取等。
stdin 插件
input{
stdin {}
}
作用:读取命令行输入,对logstash输出开发 , 运维Debug 必备插件
exec 插件
input{
exec {
command => ...
interval => ...
}
}
作用:执行一个shell 命令,并捕获其输出结果。
例如:与 tail 命令连用可以捕获日志文件变化。
kafka插件
input{
kafka{}
}
作用:消费 kafka 中的一个Topic Message。ELK 架构基本方式。
file 插件
input{
file{}
}
作用:从文件中读取。可以做为生产环境中调试的有效手段。