내용

글번호 729
작성자 허진경
작성일 2017-09-11 09:30:26
제목 log_agent.conf
내용 # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # 생략… # The configuration file needs to define the sources, # the channels and the sinks. # Sources, channels and sinks are defined per agent, # in this case called 'agent' logAgent.sources = logSource logAgent.channels = memoryChannel logAgent.sinks = hdfsSink # For each one of the sources, the type is defined logAgent.sources.logSource.type = spooldir # The channel can be defined as follows. logAgent.sources.logSource.channels = memoryChannel logAgent.sources.logSource.spoolDir=/home/hadoop/temp logAgent.sources.logSource.fileHeader=true # Each sink's type must be defined logAgent.sinks.hdfsSink.type = hdfs #Specify the channel the sink should use logAgent.sinks.hdfsSink.channel = memoryChannel logAgent.sinks.hdfsSink.hdfs.path=hdfs://master:9000/user/flume/logs/%y%m%d/%H logAgent.sinks.hdfsSink.hdfs.round=true logAgent.sinks.hdfsSink.hdfs.roundUnit=minute logAgent.sinks.hdfsSink.hdfs.fileType=DataStream logAgent.sinks.hdfsSink.hdfs.filePrefix=api logAgent.sinks.hdfsSink.hdfs.inUseSuffix=.log logAgent.sinks.hdfsSink.hdfs.useLocalTimeStamp=true logAgent.sinks.hdfsSink.hdfs.rollInterval = 300 logAgent.sinks.hdfsSink.hdfs.rollSize = 2048 # rollSize를 2048 으로 하고 rollInterval = 300을 것은 # 2048byte 또는 5분 단위로 저장하라. # Each channel's type is defined. logAgent.channels.memoryChannel.type = memory