[ https://issues.apache.org/jira/browse/FLUME-3133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16094413#comment-16094413 ]
ASF GitHub Bot commented on FLUME-3133: --------------------------------------- GitHub user lingjinjiang opened a pull request: https://github.com/apache/flume/pull/147 [FLUME-3133] Add a 'ipHeader' config in both tcp and udp syslog source When I use the syslog source, I use the "host" header to tell where the event come from.However, when change the format of syslog service, the "host" header willl be missing. So I add a new config named "ipHeader" which looks like the "portHeader" in Multiport Syslog TCP Source. When this config is specified, a header will be added. For more detail: https://issues.apache.org/jira/browse/FLUME-3133 You can merge this pull request into a Git repository by running: $ git pull https://github.com/lingjinjiang/flume FLUME-3133 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flume/pull/147.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 #147 ---- commit 3c190e61017a8d160cc89d9d517f9b75e3a9abc0 Author: 凌晋江10186960 <ling.jinji...@zte.com.cn> Date: 2017-07-20T09:11:27Z [FLUME-3133] Add a 'ipHeader' config in both tcp and udp syslog source ---- > Add a ipHeader config in Syslog Sources > --------------------------------------- > > Key: FLUME-3133 > URL: https://issues.apache.org/jira/browse/FLUME-3133 > Project: Flume > Issue Type: Bug > Components: Sinks+Sources > Affects Versions: 1.7.0 > Reporter: Jinjiang Ling > Attachments: FLUME-3133.patch > > > When I use the syslog source to collect log from other hosts, my config like > this > {quote} > ... > a1.sources.r1.host = 0.0.0.0 > a1.sources.r1.ports = 5140 > ... > {quote} > I'm using the "host" header to tell where the event come from. > However, when the syslog format is changed, the "host" header will miss. > In this sence, I couldn't tell where the event come from. > So I add a new config "ipHeader", it's similar to "portHeader" in Multiport > Syslog TCP Source. > It can be used like this > {quote} > ... > a1.sources.r1.host = 0.0.0.0 > a1.sources.r1.ports = 5140 > a1.sources.r1.ipHeader = test_ip_header > ... > {quote} > Then I can get a header named "test_ip_header" in the event, the value is the > ip of host which send this event. -- This message was sent by Atlassian JIRA (v6.4.14#64029)