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. Python的程序结构[2] -> 类/Class[0] -> 类的特殊属性

    类的特殊属性 / Special Property of Class Python 中通过 class 进行类的定义,类可以实例化成实例并利用实例对方法进行调用. 类中还包含的一些共有的特殊属性. 特 ...

  2. 设置iframe高度自适应屏幕高度

    写在前面: 最近在搭建项目前台页面框子的时候,把iframe设置成了固定的高度,导致不同的电脑尺寸访问的时候,高度差异较大,故查了下,将iframe设置成自动适应屏幕高度的方式,这里记录下. 还是直接 ...

  3. 发掘StateListAnimator的全部潜能

    原文地址:https://blog.stylingandroid.com/statelistanimator/ 原文作者:Leave a reply 译文出自:安卓巴士 译者: MrlLee 校对者: ...

  4. 【Linux】CentOS7上安装JDK 和卸载 JDK 【rpm命令的使用】

    之前有过一篇在CentOS7上安装JDK的文章:http://www.cnblogs.com/sxdcgaq8080/p/7492426.html 在这里又说一次,是要使用rpm命令安装JDK的rpm ...

  5. nginx -- 启动, 重启, 关闭

    Nginx的启动.停止与重启 重启:  nginx -s reload 启动 启动代码格式:nginx安装目录地址 -c nginx配置文件地址 例如: [root@LinuxServer sbin] ...

  6. [置顶] kubernetes资源类型--RC和RS

    Replication Controller(RC) RC是K8S中的另一个核心概念,应用托管在K8S后,K8S需要保证应用能够持续运行,这是RC的工作内容. 主要功能 确保pod数量:RC用来管理正 ...

  7. selenium _WaitForSingleObject(self._handle, 0) == _WAIT_OBJECT_0

    在关闭driver时,如果用close,而不是用quit,会出现如下错误: Exception ignored in: <bound method Popen.__del__ of <su ...

  8. django 配置上传图片和文件

    在django中经常遇到要上传文件的需求,这里记录下如何配置用户上传的文件保存 首先在setting中添加 TEMPLATES = [ { 'BACKEND': 'django.template.ba ...

  9. mipmap一

    讲一下mipmap 生成的时候 指定texture 的mipmaplevel 8 然后memory自动就会那么大的 画的时候要在lineraspace(因为我是gpucopy所以不涉及这个问题 可能) ...

  10. hive启动报错:system:java.io.tmpdir等

    解决方法:在hive-site.xml中添加 <property>    <name>system:java.io.tmpdir</name>    <val ...