flume.conf 1.4 KB

123456789101112131415161718192021222324252627282930
  1. a1.channels.c1.type = org.apache.flume.channel.kafka.KafkaChannel
  2. a1.channels.c1.kafka.bootstrap.servers = 10.26.27.71:8092,10.26.22.121:8092,10.26.22.120:8092,10.26.22.102:8092,10.26.22.122:8092
  3. a1.channels.c1.kafka.topic = api_easou_com_nginx
  4. a1.channels.c1.kafka.consumer.group.id = flume2kafka
  5. # Define an Avro source called r1 on a1 and tell it
  6. # to bind to 0.0.0.0:41414. Connect it to channel c1.
  7. #注意这里分出2个channel出来,一个是到k1,一个到k2
  8. #如果这里只出一个channel c1的话,下面2个sink channel都为c1,则消息就会随机分到2个sink上,而不是2个sink都有一份
  9. a1.sources.r1.channels = c1
  10. a1.sources.r1.type = exec
  11. a1.sources.r1.command = tail -F /data/log/resin-books/bo/visit/access.log
  12. a1.sources.r1.restart = true
  13. a1.sources.r1.selector.optional = c1
  14. a1.sources.r1.batchSize = 100000
  15. a1.sources.r1.interceptors = i1 i2 i3
  16. a1.sources.r1.interceptors.i1.type = timestamp
  17. a1.sources.r1.interceptors.i2.type = host
  18. a1.sources.r1.interceptors.i2.useIP = false
  19. a1.sources.r1.interceptors.i3.type = regex_filter
  20. a1.sources.r1.interceptors.i3.regex = ^\\s*$
  21. a1.sources.r1.interceptors.i3.excludeEvents = true
  22. #默认是replicationg,还有multiplexer
  23. #a1.sources.r1.selector.type = replicationg
  24. # Finally, now that we've defined all of our components, tell
  25. # a1 which ones we want to activate.
  26. a1.sources = r1
  27. a1.channels = c1
  28. a1.sinks =