一、logstath是什么
logstath是elk的l,可以直接把他理解成水管,既可以做采集器又可以做发送端,用做数据传输。
二、logstath怎么使用
logstath分三个部分,input、output、filter,每个部分都有相应的插件使用。通过配置文件来进行插件的配置。
配置文件的结构如下:
# This is a comment. You should use comments to describe
# parts of your configuration.
input {
...
}
filter {
...
}
output {
...
}
在logstath目录下运行,试一下命令行输入和命令行输出的效果。-e 后面跟配置内容。
./bin/logstash -e 'input{stdin{}} output{stdout{}}'
也可以将配置内容写在一个配置文件里:
/home/myConf.conf: input{stdin{}} output{stdout{}}
然后这么运行:
./bin/logstash -f /home/myConf.conf
后续会陆续介绍插件的使用,有问题之处烦请在留言中指出,非常感谢。