[root@hadoop01 test_conf]# cat test-http-logger.conf
myagent.sources=mysource1
myagent.channels=mychannel1
myagent.sinks=mysink1
myagent.sources.mysource1.channels=mychannel1
myagent.sinks.mysink1.channel=mychannel1
myagent.sources.mysource1.type=http
#监听的http所在的主机
myagent.sources.mysource1.bind=hadoop01
#监听http的端口号
myagent.sources.mysource1.port=9999
#由于http中常用的是json格式的数据,所以这里使用JSONHandler
myagent.sources.mysource1.handler=org.apache.flume.source.http.JSONHandler
myagent.channels.mychannel1.type=memory
myagent.sinks.mysink1.type=logger
myagent.sinks.mysink1.maxBytesToLog=100
[root@hadoop01 test_conf]# flume-ng agent -c /usr