Uploaded image for project: 'Flume'
  1. Flume
  2. FLUME-2842

Priority in syslog messages is always present

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.6.0, 1.5.2
    • None
    • Sinks+Sources
    • None

    Description

      Hello,

      The priority 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.

      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.... }
      
      flume.conf
      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
      
      client.py
      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)
      

      Thanks

      Attachments

        Activity

          People

            Unassigned Unassigned
            Lujeni Thebault Julien
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: