Flume NetCat Demo

Source: Internet
Author: User
Tags apache download

Preparatory work:

1.apache Download Flume

2. Unzip the Flume

3. Modify flume-env.sh, configure Java_home

Netcat Capture Demo:

1. Create the netcat-logger.conf in conf

 # defines the name of each component in the agent a1.sources  = r1a1.sinks  = K1a1.channels  = c1# Describe and configure the source component: R1a1.sources.r1.type  = Netcata1.sources.r1.bind  = Localhosta1.sources.r1.port  = 44444  # Describes and configures the sink component: K1a1.sinks.k1.type  = logger# describes and configures the channel component, Here is how the memory cache is used A1.channels.c1.type  = memorya1.channels.c1.capacity  = Span style= "color: #800080;" >1000  a1.channels.c1.transactioncapacity  = 100  # describes and configures the connection relationship between the source channel sink a1.sources.r1.channels  = C1a1.sinks.k1.channel  = C1 

2. Start the agent to collect data

Bin/flume-ng agent-c conf-f conf/netcat-logger.conf-n A1  -dflume.root.logger=info,console

-C conf Specifies the directory where the configuration files of the flume itself

-F Conf/netcat-logger.con Specify the acquisition scheme we describe

-N A1 Specify the name of our agent

3. Testing

telnet localhost 44444

Flume NetCat Demo

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.