1、在flume的conf目录下新建一个文件
2、创建netcat-logger.conf 指定flume agent采集数据
vi netcat-logger.conf
3、启动agent采集数据
bin/flume-ng agent -c conf -f conf/netcat-logger.conf -n a1 -Dflume.root.logger=INFO,console
-c conf 指定flume自身的配置文件所在目录
-f conf/netcat-logger.con 指定我们所描述的采集方案
-n a1 指定我们这个agent的名字
4、安装telnet工具
yum -y install telnet
5、在另一个服务器上使用telnet向监听端口的主机上发送消息
新监听案例
1、copy spooldir-hdfs-sink.conf 到flume下面的conf目录中
2、执行命令
bin/flume-ng agent -c conf -f conf/spooldir-hdfs-sink.conf -n agent1 -Dflume.root.logger=INFO,console
2、创建netcat-logger.conf 指定flume agent采集数据
vi netcat-logger.conf
3、启动agent采集数据
bin/flume-ng agent -c conf -f conf/netcat-logger.conf -n a1 -Dflume.root.logger=INFO,console
-c conf 指定flume自身的配置文件所在目录
-f conf/netcat-logger.con 指定我们所描述的采集方案
-n a1 指定我们这个agent的名字
4、安装telnet工具
yum -y install telnet
5、在另一个服务器上使用telnet向监听端口的主机上发送消息
新监听案例
1、copy spooldir-hdfs-sink.conf 到flume下面的conf目录中
2、执行命令
bin/flume-ng agent -c conf -f conf/spooldir-hdfs-sink.conf -n agent1 -Dflume.root.logger=INFO,console