Skip to content

Instantly share code, notes, and snippets.

@rmoff
Created July 27, 2016 11:01
Show Gist options
  • Save rmoff/7b68871a1aa4ae8c7e703e759bfc2eff to your computer and use it in GitHub Desktop.
Save rmoff/7b68871a1aa4ae8c7e703e759bfc2eff to your computer and use it in GitHub Desktop.
source_agent.sources = syslog_tail
source_agent.channels = memoryChannel
source_agent.sinks = kafka_sink
# http://flume.apache.org/FlumeUserGuide.html#exec-source
source_agent.sources.syslog_tail.type = exec
source_agent.sources.syslog_tail.command = tail -F /var/log/messages
source_agent.sources.syslog_tail.batchSize = 1
source_agent.sources.syslog_tail.channels = memoryChannel
# http://flume.apache.org/FlumeUserGuide.html#memory-channel
source_agent.channels.memoryChannel.type = memory
source_agent.channels.memoryChannel.capacity = 100
## Write to Kafka
source_agent.sinks.kafka_sink.channel = memoryChannel
source_agent.sinks.kafka_sink.type = org.apache.flume.sink.kafka.KafkaSink
source_agent.sinks.kafka_sink.batchSize = 5
source_agent.sinks.kafka_sink.brokerList = confluent-01-node-01:9092
source_agent.sinks.kafka_sink.topic = syslogs
bin/flume-ng agent --name source_agent --conf ./conf/ --conf-file conf/flume-log-kafka.conf -Dflume.root.logger=DEBUG,console
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment