开启Flume:
bin/flume-ng agent -f /opt/modules/flume-1.7.0-bin/conf/collectLog.conf -n a1
-f :要用的配置文件
-n:配置文件中agent的名字(我这里用的是a1)
但是
从这台成功的机器直接发这个文件夹并运行flume,用相同的命令启动一直出错:
bin/flume-ng agent -f /opt/modules/flume-1.7.0-bin/conf/collectLog.conf -n a1
后面才知道还有很多参数:
/opt/modules/flume-1.7.0-bin/bin/flume-ng agent -f /opt/modules/flume-1.7.0-bin/conf/collectLog.conf -c /opt/modules/flume-1.7.0-bin/conf/ -n a1 -Dflume.root.logger=INFO,console
-c: 指定conf/目录
-Dflume…:指定log类型