flume-ng 是一个分布式,高可用的日志收集系统。主要用来将分布在不同服务器上的业务日志汇总在一个集中的数据存储中心

一 安装与环境配置

下载地址 http://flume.apache.org/download.html , 下载Apache Flume binary至目标服务器解压

运行环境java版本:Java 1.6 or later (Java 1.7 Recommended)

配置JAVA_HOME变量

将解压文件路径/bin配置加入环境变量

二 命令参数

Usage: /home/dongxiao.yang/apache-flume-1.4.0-bin/bin/flume-ng <command> [options]...

commands:
help display this help text
agent run a Flume agent
avro-client run an avro Flume client
version show Flume version info

global options:
--conf,-c <conf> use configs in <conf> directory
--classpath,-C <cp> append to the classpath
--dryrun,-d do not actually start Flume, just print the command
--plugins-path <dirs> colon-separated list of plugins.d directories. See the
plugins.d section in the user guide for more details.
Default: $FLUME_HOME/plugins.d
-Dproperty=value sets a Java system property value
-Xproperty=value sets a Java -X option

agent options:
--conf-file,-f <file> specify a config file (required)
--name,-n <name> the name of this agent (required)
--help,-h display help text

avro-client options:
--rpcProps,-P <file> RPC client properties file with server connection params
--host,-H <host> hostname to which events will be sent
--port,-p <port> port of the avro source
--dirname <dir> directory to stream to avro source
--filename,-F <file> text file to stream to avro source (default: std input)
--headerFile,-R <file> File containing event headers as key/value pairs on each new line
--help,-h display help text

Either --rpcProps or both --host and --port must be specified.

Note that if <conf> directory is specified, then it is always included first
in the classpath.

配置文件简单例子

#define
agent1.sources = source1
agent1.channels = channel1
agent1.sinks = sink1 sink2

#Describe the source
agent1.sources.source1.type = exec
agent1.sources.source1.command = tail -F /srv/apps/taskworker/log/taskworker.log
agent1.sources.source1.interceptors=e1
agent1.sources.source1.interceptors.e1.type=timestamp

#Describe the sink
agent1.sinks.sink1.type = avro
agent1.sinks.sink1.hostname= 10.4.1.100
agent1.sinks.sink1.port = 10000

#Describe the channnel
agent1.channels.channel1.type = file
agent1.channels.channel1.checkpointDir = /home/dongxiao.yang/checkpoint
agent1.channels.channel1.dataDirs = /home/dongxiao.yang/data

#Bind the source and sink to the channel
agent1.sources.source1.channels = channel1
agent1.sinks.sink1.channel = channel1
agent1.sinks.sink2.channel = channel1

启动命令格式:

flume-ng agent --conf /home/dongxiao.yang/apache-flume-1.4.0-bin/conf/ --conf-file /home/dongxiao.yang/apache-flume-1.4.0-bin/conf/

--name agent1 -Dflume.root.logger=INFO,console -Duser.timezone=UTC

参考资料:http://flume.apache.org/FlumeUserGuide.html  官方文档

Apache Flume Distributed Log Collection for Hadoop.pdf  基于1.3版本,主要介绍了收集常见日志文件写入hdfs的几个结构

flume-ng tmp的更多相关文章

  1. Flume NG 简介及配置实战

    Flume 作为 cloudera 开发的实时日志收集系统,受到了业界的认可与广泛应用.Flume 初始的发行版本目前被统称为 Flume OG(original generation),属于 clo ...

  2. Flume NG 配置详解(转)

    原文链接:[转]Flume NG 配置详解 (说明,名词对应解释 源-Source,接收器-Sink,通道-Channel) 配置 设置代理 Flume代理配置存储在本地配置文件.这是一个文本文件格式 ...

  3. Flume NG部署

    本次配置单节点的Flume NG 1.下载flume安装包 下载地址:(http://flume.apache.org/download.html) apache-flume-1.6.0-bin.ta ...

  4. Flume NG Getting Started(Flume NG 新手入门指南)

    Flume NG Getting Started(Flume NG 新手入门指南)翻译 新手入门 Flume NG是什么? 有什么改变? 获得Flume NG 从源码构建 配置 flume-ng全局选 ...

  5. 高可用Hadoop平台-Flume NG实战图解篇

    1.概述 今天补充一篇关于Flume的博客,前面在讲解高可用的Hadoop平台的时候遗漏了这篇,本篇博客为大家讲述以下内容: Flume NG简述 单点Flume NG搭建.运行 高可用Flume N ...

  6. 【转】Flume(NG)架构设计要点及配置实践

    Flume(NG)架构设计要点及配置实践   Flume NG是一个分布式.可靠.可用的系统,它能够将不同数据源的海量日志数据进行高效收集.聚合.移动,最后存储到一个中心化数据存储系统中.由原来的Fl ...

  7. Flume NG简介及配置

    Flume下载地址:http://apache.fayea.com/flume/ 常用的分布式日志收集系统: Apache Flume. Facebook Scribe. Apache Chukwa ...

  8. flume ng系列之——flume安装

    flume版本:1.5.0 1.下载安装包: http://www.apache.org/dyn/closer.cgi/flume/1.5.0/apache-flume-1.5.0-bin.tar.g ...

  9. Flume OG 与 Flume NG 的区别

    1.Flume OG:Flume original generation 即Flume 0.9.x版本    Flume NG:Flume next generation ,即Flume 1.x版本 ...

  10. 【Flume NG用户指南】(1)设置

    作者:周邦涛(Timen) Email:zhoubangtao@gmail.com 转载请注明出处:  http://blog.csdn.net/zhoubangtao/article/details ...

随机推荐

  1. HDU 1394.Minimum Inversion Number-最小逆序数-完全版线段树(单点增减、区间求和)

    HDU1394.Minimum Inversion Number 这个题求最小逆序数,先建一个空的树,然后每输入一个值,就先查询一下,查询之后,更新线段树,然后遍历一遍,每次将第一个数放到最后之后,减 ...

  2. Number Triangles

    题目描述 Consider the number triangle shown below. Write a program that calculates the highest sum of nu ...

  3. Logger Rate Limiter -- LeetCode

    Design a logger system that receive stream of messages along with its timestamps, each message shoul ...

  4. 如何将netbeans生成的项目文件打包发布到其他的Tomcat服务器上?

    首先在netbeans中将项目文件生成.war文件,一个war包就是有特性格式的jar包,它是将一个Web程序的所有内容进行压缩得到,在netbeans中,在项目名称上右击鼠标->"清 ...

  5. IE8兼容性问题

    由于业务的需要,我们竟然还要支持IE8,听着就让人很心酸呀.不过在进行适配的过程中,会发现还是有一定规律的,基本上帮相关问题改了,页面也就能正常显示了.下面就总结下对IE8适配过程中所进行的修改. 1 ...

  6. Android中调用系统所装的软件打开文件(转)

    Android中调用系统所装的软件打开文件(转) 在应用中如何调用系统所装的软件打开一个文件,这是我们经常碰到的问题,下面是我所用到的一种方法,和大家一起分享一下! 这个是打开文件的一个方法: /** ...

  7. sql server 性能调优 资源等待之网络I/O

    原文:sql server 性能调优 资源等待之网络I/O 一.概述 与网络I/O相关的等待的主要是ASYNC_NETWORK_IO,是指当sql server返回数据结果集给客户端的时候,会先将结果 ...

  8. 【log4j】springboot项目启动 ,使用的druid数据源,log4j报错 log4j:WARN Please initialize the log4j system properly.

    springboot项目启动 ,使用的druid数据源,log4j报错 -- :: --- [ restartedMain] o.hibernate.annotations.common.Versio ...

  9. [置顶] kubernetes资源对象--limitranges

    概念 LimitRange(简称limits)基于namespace的资源管理,包括pod和container的最小.最大和default.defaultrequests等. 一旦创建limits,以 ...

  10. ES6里的修饰器Decorator

    修饰器(Decorator)是一个函数,用来修改类的行为. 一.概述 ES6 引入了这项功能,目前 Babel 转码器已经支持Decorator 首先,安装babel-core和babel-plugi ...