大数据学习之路54-利用tail -F来实时采集最新数据到HDFS

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_37050372/article/details/82147357

如果我们需要不断的采集log4j的日志文件中不断新增的记录,我们可以通过命令采集,我们的采集方案与之前不同的地方如下:

    agent1.sources.source1.type = exec
    agent1.sources.source1.command = tail -F /root/logs/log/access_log
    agent1.sources.source1.fileHeader = false

exec的意思是,通过命令采集。

猜你喜欢

转载自blog.csdn.net/qq_37050372/article/details/82147357