You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "Thebault Julien (JIRA)" <ji...@apache.org> on 2015/11/20 22:24:10 UTC

[jira] [Created] (FLUME-2842) Priority in syslog messages is always present

Thebault Julien created FLUME-2842:
--------------------------------------

             Summary: Priority in syslog messages is always present
                 Key: FLUME-2842
                 URL: https://issues.apache.org/jira/browse/FLUME-2842
             Project: Flume
          Issue Type: Bug
          Components: Sinks+Sources
    Affects Versions: v1.5.2, v1.6.0
         Environment: - Linux xxxx 3.2.0-89-generic #127-Ubuntu SMP Tue Jul 28 09:28:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

- Flume 1.6.0
Source code repository: https://git-wip-us.apache.org/repos/asf/flume.git
Revision: 2561a23240a71ba20bf288c7c2cda88f443c2080
Compiled by hshreedharan on Mon May 11 11:15:44 PDT 2015
>From source with checksum b29e416802ce9ece3269d34233baf43f


            Reporter: Thebault Julien


Hello,

The facility field is always present in my body and i don t know why.
I try to change the keepFields directive (false, none), however the facility is always append.

{code:xml}
20 nov. 2015 22:07:43,780 INFO  [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.flume.sink.LoggerSink.process:94)  - Event: { headers:{Severity=4, Facility=1} body: 3C 31 32 3E 27 00 00 00 02 5F 69 64 00 19 00 00 <12>'...._id.... }
{code}

{code:title=flume.conf|borderStyle=solid}
agent_k.sources = r1 r2 
agent_k.sinks = k1 k2 
agent_k.channels = c1 c2 

# Describe/Configure the source.
agent_k.sources.r1.type = syslogudp
agent_k.sources.r1.bind = 0.0.0.0
agent_k.sources.r1.port = 9090
agent_k.sources.r1.keepFields = none

# Describe/Configure the channel.
agent_k.channels.c1.type = file
agent_k.channels.c1.checkpointDir = /hdfs/01/flume/xxx/tag/checkpoint/
agent_k.channels.c1.dataDirs = /hdfs/01/flume/xxx/tag/datadirs/

# Describe/Configure the sink.
agent_k.sinks.k1.type = logger

# Bind the source and sink to the channel.
agent_k.sources.r1.channels = c1
agent_k.sinks.k1.channel = c1
{code}

{code:title=client.py|borderStyle=solid}
import logging, logging.handlers
from bson import BSON
from bson import Binary
from bson import ObjectId

rootLogger = logging.getLogger('')
rootLogger.setLevel(logging.DEBUG)
socketHandler = logging.handlers.SysLogHandler(address=('xxx', 9090))
rootLogger.addHandler(socketHandler)

number = 2
def log():
    start = time.time()
    for i in xrange(number):
        msg = Binary(BSON.encode({'_id': str(ObjectId())}))
        rootLogger.warning(msg)
{code}

Thanks



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)