Flume captures log data in real time and uploads it to Kafka __flume

Source: Internet
Author: User
Tags zookeeper

Flume real-time crawl log data and upload to Kafka

1.Linux OK zookeeper is configured, start zookeeper first

sbin/zkserver.sh start

(sbin/zkserver.sh Status View startup state) JPS can check to see Le process as Quorumpeermain

2. Start Kafka,zookeeper need to start before Kafka

bin/kafka-server-start.sh Config/server.properties &

3. Start consumer receive log

bin/kafka-console-consumer.sh--zookeeper localhost:2181--topic topic-004

(Before you can create topic; bin/kafka-topics.sh--create--zookeeper 127.0.0.1:2181--replication-factor 1--partitions 1--topic mytop Ic

4. View your deployment of the webserver log, when the page is operating, to see the log changes, to determine the changes in the log to be monitored log. For example, my own is:

Then I need to monitor the directory for Usr/local/nginx/access.log

5. Start Flume. Sbin/flume Start Source (multiple application after start up process)

Modify configuration file: Conf/flume-source-conf.properties the file path for monitoring is:


6. Operate the Web site, generate logs, and view Kafka under consumer to monitor the resulting log.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.