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

Add IP address to headers in flume log4j appender

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.0
    • Fix Version/s: 1.8.0
    • Component/s: Sinks+Sources
    • Labels:
      None

      Description

      Add client's host address to log event headers in Flume NG Log4j Appender. By receiving such events through AvroSource, one can route events based on origin host in the receiving Flume agent.

        Issue Links

          Activity

          Hide
          denes Denes Arvay added a comment -

          Thanks for the patch Andras Beni, thanks for the review Attila Simon

          Show
          denes Denes Arvay added a comment - Thanks for the patch Andras Beni , thanks for the review Attila Simon
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Jenkins build Flume-trunk-hbase-1 #251 (See https://builds.apache.org/job/Flume-trunk-hbase-1/251/)
          FLUME-3072. Add IP address to headers in Flume Log4j appender (denes: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=f2996cca55bbb852dc10512ca3369ae7fd56c44f)

          • (edit) flume-ng-clients/flume-ng-log4jappender/src/test/java/org/apache/flume/clients/log4jappender/TestLoadBalancingLog4jAppender.java
          • (edit) flume-ng-clients/flume-ng-log4jappender/src/main/java/org/apache/flume/clients/log4jappender/LoadBalancingLog4jAppender.java
          • (edit) flume-ng-clients/flume-ng-log4jappender/src/main/java/org/apache/flume/clients/log4jappender/Log4jAppender.java
          • (edit) flume-ng-clients/flume-ng-log4jappender/src/main/java/org/apache/flume/clients/log4jappender/Log4jAvroHeaders.java
          • (edit) flume-ng-clients/flume-ng-log4jappender/src/test/java/org/apache/flume/clients/log4jappender/TestLog4jAppender.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Jenkins build Flume-trunk-hbase-1 #251 (See https://builds.apache.org/job/Flume-trunk-hbase-1/251/ ) FLUME-3072 . Add IP address to headers in Flume Log4j appender (denes: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=f2996cca55bbb852dc10512ca3369ae7fd56c44f ) (edit) flume-ng-clients/flume-ng-log4jappender/src/test/java/org/apache/flume/clients/log4jappender/TestLoadBalancingLog4jAppender.java (edit) flume-ng-clients/flume-ng-log4jappender/src/main/java/org/apache/flume/clients/log4jappender/LoadBalancingLog4jAppender.java (edit) flume-ng-clients/flume-ng-log4jappender/src/main/java/org/apache/flume/clients/log4jappender/Log4jAppender.java (edit) flume-ng-clients/flume-ng-log4jappender/src/main/java/org/apache/flume/clients/log4jappender/Log4jAvroHeaders.java (edit) flume-ng-clients/flume-ng-log4jappender/src/test/java/org/apache/flume/clients/log4jappender/TestLog4jAppender.java
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/flume/pull/121

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/flume/pull/121
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit f2996cca55bbb852dc10512ca3369ae7fd56c44f in flume's branch refs/heads/trunk from Andras Beni
          [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=f2996cc ]

          FLUME-3072. Add IP address to headers in Flume Log4j appender

          Log4jAppender and LoadBalancingLog4jAppender resolve local hosts address at startup and
          add it to each event's header with the key "flume.client.log4j.address".

          This closes #121.

          (Andras Beni via Denes Arvay)

          Show
          jira-bot ASF subversion and git services added a comment - Commit f2996cca55bbb852dc10512ca3369ae7fd56c44f in flume's branch refs/heads/trunk from Andras Beni [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=f2996cc ] FLUME-3072 . Add IP address to headers in Flume Log4j appender Log4jAppender and LoadBalancingLog4jAppender resolve local hosts address at startup and add it to each event's header with the key "flume.client.log4j.address". This closes #121. (Andras Beni via Denes Arvay)
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user andrasbeni opened a pull request:

          https://github.com/apache/flume/pull/121

          FLUME-3072 Add IP address to headers in flume log4j appender

          Log4jAppender and LoadBalancingLog4jAppender resolve local hosts address at startup.
          The hostname is added to each event's header with the key "flume.client.log4j.address".

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/andrasbeni/flume FLUME-3072

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/flume/pull/121.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #121


          commit ea5021f483234651515b1e1b93c8f0935806b82a
          Author: Andras Beni <andrasbeni@cloudera.com>
          Date: 2017-03-15T05:50:12Z

          FLUME-3072 Add IP address to headers in flume log4j appender

          Log4jAppender and LoadBalancingLog4jAppender resolve local hosts address at startup.
          The hostname is added to each event's header with the key "flume.client.log4j.address".


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user andrasbeni opened a pull request: https://github.com/apache/flume/pull/121 FLUME-3072 Add IP address to headers in flume log4j appender Log4jAppender and LoadBalancingLog4jAppender resolve local hosts address at startup. The hostname is added to each event's header with the key "flume.client.log4j.address". You can merge this pull request into a Git repository by running: $ git pull https://github.com/andrasbeni/flume FLUME-3072 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flume/pull/121.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #121 commit ea5021f483234651515b1e1b93c8f0935806b82a Author: Andras Beni <andrasbeni@cloudera.com> Date: 2017-03-15T05:50:12Z FLUME-3072 Add IP address to headers in flume log4j appender Log4jAppender and LoadBalancingLog4jAppender resolve local hosts address at startup. The hostname is added to each event's header with the key "flume.client.log4j.address".

            People

            • Assignee:
              andrasbeni Andras Beni
              Reporter:
              andrasbeni Andras Beni
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development