FlumeNG用于收集tomcat日志,具体场景为将/opt/tomcat下的日志存储到/var/log/data目录。配置包括source1类型为exec,command为tail -n +0 -F /opt/tomcat/logs/catalina.out;sink1类型为file_roll,directory为/var/log/data;channel1类型为file,checkpointDir为/var/checkpoint,dataDirs为/var/tmp,capacity为1000,transactionCapacity为100。运行命令:bin/flume-ng agent --conf --conf-file tomcat.conf --name agent1 -Dflume.root.logger=INFO,console。