You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flume.apache.org by Cameron Gandevia <cg...@gmail.com> on 2013/09/11 10:19:04 UTC
Log4jAppender Hostname Interceptor
Hi
Is it possible to register the Hostname Interceptor when using the
log4jappender? I would like to add the hostname header of the machine that
generated the log event without modifying the event body.
Thanks
Re: Log4jAppender Hostname Interceptor
Posted by Cameron Gandevia <cg...@gmail.com>.
Hi
Thanks for the reply. You are correct we use the log4jappender without
running a local agent to send events to second tier remote agents. We would
like the header to reflect the host of the original event not the remote
agent. Just wanted to make sure this functionality didn't already exist
before I worked on a patch.
On Wed, Sep 11, 2013 at 10:05 AM, Hari Shreedharan <
hshreedharan@cloudera.com> wrote:
> You could inspect the event in an interceptor and insert into the event
> header right? The hostname interceptor inserts the hostname of the agent
> that received the events - not the one that generated it. Unless you are
> running the agent on the same machine as the process that generated the log
> event, this is not what you want.
>
>
> Thanks,
> Hari
>
> On Wednesday, September 11, 2013 at 1:19 AM, Cameron Gandevia wrote:
>
> Hi
>
> Is it possible to register the Hostname Interceptor when using the
> log4jappender? I would like to add the hostname header of the machine that
> generated the log event without modifying the event body.
>
> Thanks
>
>
>
--
Thanks
Cameron Gandevia
Re: Log4jAppender Hostname Interceptor
Posted by Hari Shreedharan <hs...@cloudera.com>.
You could inspect the event in an interceptor and insert into the event header right? The hostname interceptor inserts the hostname of the agent that received the events - not the one that generated it. Unless you are running the agent on the same machine as the process that generated the log event, this is not what you want.
Thanks,
Hari
On Wednesday, September 11, 2013 at 1:19 AM, Cameron Gandevia wrote:
> Hi
>
> Is it possible to register the Hostname Interceptor when using the log4jappender? I would like to add the hostname header of the machine that generated the log event without modifying the event body.
>
> Thanks