Flume installation Configuration

Source: Internet
Author: User

Flume Installation ConfigurationOne: Download

: http://www.apache.org/dyn/closer.lua/flume/1.8.0/apache-flume-1.8.0-bin.tar.gz

Two: Unzip
[[Email protected] ~] # TAR-ZXVF apache-flume-1.8.0-bin.tar.gz-c/usr/local/

Renamed Flume convenient for later operation

[[email protected] local] # pwd/usr/local[root@s100 Local]#  lsapache-flume-1.8.0-bin  etc    Hadoop  Hive      include  Lib    libexec  sharebin                     Games  hbase   Hive.bak  java     lib64  sbin     src[root@s100 Local]#  mv Apache-flume-1.8.0-bin Flume
Three: Configure environment variables
[[email protected] conf] # Vim/etc/profile
# Flume export flume_home=/usr/local/flume export PATH=$PATH:$FLUME _home/bin

Perform:

[[email protected] conf] # Source/etc/profile
Four: Configure Flume
[[email protected] conf] # pwd/usr/local/flume/conf[root@s100 conf]#  lsflume-conf.properties.template  flume-env.sh.templateflume-env.ps1.template          log4j.properties

There is a flume-conf.properties.template file under the Flume configuration file, which is a template for flume configuration

Based on the template file, we configure a netcat and use flume to collect logs

[[email protected] conf] # Vim r_nc.conf

Depending on the template content, the configuration information is as follows:

# The configuration file needs to define the sources, # the channels and the sinks.# sources, channels and sinks is Defin Ed per agent, # in the case called ' Agent ' #声明三类组件agent. Sources = R1agent.channels = C1agent.sinks = k1# Configuration Source-r1 component Agent . Sources.r1.type = Netcatagent.sources.r1.bind = Localhostagent.sources.r1.port = 10000# port number, prompt to start successfully # Configure the CHANNEL-C1 component Agent.channels.c1.type = memory# Configuration Sink-k1 Component Agent.sinks.k1.type = logger# binding: Note the sagent.sources.r1.channels behind R1 and K1 = C1agent.sinks.k1.channel = C1
Five: Flume start
[[email protected] conf] # flume-ng agent-f r_nv.conf-n agent-dflume.root.logger=info.console

Format: Flume-ng agent-f Specify the file name (address, here because r_nv.conf is under Conf, so is followed by the r_nv.conf)-n name (that is, agent.sources = Agent in R1)-dflume.root.logger=info.consloe

...
18/05/25 15:42:56 INFO node. application:starting Sink K118/05/25 15:42:56 INFO node. Application:starting source R118/05/25 15:42:56 INFO source. Netcatsource:source starting18/05/25 15:42:56 INFO Source. netcatsource:created serversocket:sun.nio.ch.serversocketchannelimpl[/127.0.0.1:10000]

Here's a 127.0.0.1:10000 that says it's started successfully

Six: Native flume port Query and flume results

Open a new shell window (do not close the original flume as we print the data validation process in the console)

[[Email protected] ~] # NETSTAT-ANPT | grep+ TCP        0      0:: ffff:127.0.0.1:10000      :::*                        LISTEN      59845/java     

Port exists

Flume Log Monitoring Results query

Note: Ubuntu installs netcat:apt-get-y install netcat-traditional

Execution in the presence of the Netcat service: [[email protected] ~]# NC localhost 10000

This article copyright notice:

This article is the emperor of the small fairy

Blog Home Address: http://www.cnblogs.com/dxxblog/

Welcome to Beau Main Blog content criticism pointing, if the problem, can comment or email ([email protected])

Welcome reprint, Reprint please in the article page obvious location give the original link, thank you

Flume installation Configuration

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.