You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Sushil Singh <Su...@thalesgroup.com> on 2020/02/24 06:26:14 UTC
Query Regarding Log4j audit framework
Hi
I want to use log 4j audit for multiple applications but I have certain requirements
1) I want to add some function to logs such that hash of log messages can be sent along with log message itself
2) Is there a way to club same kind of Logs occuring frequently in a small window of time
3) Is there something we can use log api events to log to server also
please let me know how these can be achieved
Thanks,
Sushil
Re: Query Regarding Log4j audit framework
Posted by Sushil Singh <Su...@thalesgroup.com>.
Hi
I have created 2 JIRA TICKETS
https://issues.apache.org/jira/browse/LOG4J2-2797
https://issues.apache.org/jira/browse/LOG4J2-2798
Thanks
Sushil Pratap Singh
________________________________
From: Matt Sicker <bo...@gmail.com>
Sent: 27 February 2020 21:13
To: Sushil Singh <su...@guavus.com>
Cc: Log4J Users List <lo...@logging.apache.org>; Rajat Goel <ra...@guavus.com>
Subject: Re: Query Regarding Log4j audit framework
Ah, I see what you mean. I don’t think we have any specific plugin for
that, though they sound like reasonable feature requests. Could you file
Jira tickets for them?
On Thu, Feb 27, 2020 at 03:09 Sushil Singh <Su...@thalesgroup.com>
wrote:
> Thanks @Matt Sicker <bo...@gmail.com> for your reply
>
> But 2 of my problems remains unresolved
>
> 1) How can i add hash of the log itself and send it with log itself as a
> Log field so that we can verify it for tampering at a later stage
> 2) How can i aggregate log events for count along with log itself such
> that I can get the Log event and a count as a field in a window. So
> basically want to do windowed aggregation of logs before flushing
>
> Burst filter was more of controlling logs rather than aggregating
>
> Please let me know how it can be achieved
>
> Thanks
>
> Sushil Pratap Singh
>
>
>
> ------------------------------
> *From:* Matt Sicker <bo...@gmail.com>
> *Sent:* 24 February 2020 20:25
> *To:* Log4J Users List <lo...@logging.apache.org>
> *Subject:* Re: Query Regarding Log4j audit framework
>
> Not sure about 1. For 2, there’s the burst filter in log4j2 which supports
> that type of thing in general. As for 3, take a look at the various
> appenders available like Syslog/Socket/HTTP/JDBC.
>
> On Mon, Feb 24, 2020 at 00:26 Sushil Singh <Su...@thalesgroup.com>
> wrote:
>
> > Hi
> >
> >
> > I want to use log 4j audit for multiple applications but I have certain
> > requirements
> >
> > 1) I want to add some function to logs such that hash of log messages can
> > be sent along with log message itself
> > 2) Is there a way to club same kind of Logs occuring frequently in a
> small
> > window of time
> > 3) Is there something we can use log api events to log to server also
> >
> > please let me know how these can be achieved
> >
> > Thanks,
> >
> > Sushil
> >
> > --
> Matt Sicker <bo...@gmail.com>
>
--
Matt Sicker <bo...@gmail.com>
Re: Query Regarding Log4j audit framework
Posted by Ralph Goers <ra...@dslextreme.com>.
Log4j Audit uses Log4j so anything built into Log4j can be used. So I can think of a couple of ways to inject a hash:
1. Add the hash to your layout. If you used the PatternLayout you could implement a HashConverter to create it. In general, I suspect you should create a Jira issue for whichever Layout you want to use, such as JSONLayout, to have Log4j add one automatically.
2. I will be modifying the ContextDataInjector to add support for ContextDataProviders. This would allow you to create a provider that adds a hash to the ContextData.
If I understand your second item you simply want to do batching? You would handle that in the Appender. For example, the FlumeAppender handles batching.
Ralph
> On Feb 27, 2020, at 8:43 AM, Matt Sicker <bo...@gmail.com> wrote:
>
> Ah, I see what you mean. I don’t think we have any specific plugin for
> that, though they sound like reasonable feature requests. Could you file
> Jira tickets for them?
>
> On Thu, Feb 27, 2020 at 03:09 Sushil Singh <Su...@thalesgroup.com>
> wrote:
>
>> Thanks @Matt Sicker <bo...@gmail.com> for your reply
>>
>> But 2 of my problems remains unresolved
>>
>> 1) How can i add hash of the log itself and send it with log itself as a
>> Log field so that we can verify it for tampering at a later stage
>> 2) How can i aggregate log events for count along with log itself such
>> that I can get the Log event and a count as a field in a window. So
>> basically want to do windowed aggregation of logs before flushing
>>
>> Burst filter was more of controlling logs rather than aggregating
>>
>> Please let me know how it can be achieved
>>
>> Thanks
>>
>> Sushil Pratap Singh
>>
>>
>>
>> ------------------------------
>> *From:* Matt Sicker <bo...@gmail.com>
>> *Sent:* 24 February 2020 20:25
>> *To:* Log4J Users List <lo...@logging.apache.org>
>> *Subject:* Re: Query Regarding Log4j audit framework
>>
>> Not sure about 1. For 2, there’s the burst filter in log4j2 which supports
>> that type of thing in general. As for 3, take a look at the various
>> appenders available like Syslog/Socket/HTTP/JDBC.
>>
>> On Mon, Feb 24, 2020 at 00:26 Sushil Singh <Su...@thalesgroup.com>
>> wrote:
>>
>>> Hi
>>>
>>>
>>> I want to use log 4j audit for multiple applications but I have certain
>>> requirements
>>>
>>> 1) I want to add some function to logs such that hash of log messages can
>>> be sent along with log message itself
>>> 2) Is there a way to club same kind of Logs occuring frequently in a
>> small
>>> window of time
>>> 3) Is there something we can use log api events to log to server also
>>>
>>> please let me know how these can be achieved
>>>
>>> Thanks,
>>>
>>> Sushil
>>>
>>> --
>> Matt Sicker <bo...@gmail.com>
>>
> --
> Matt Sicker <bo...@gmail.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Query Regarding Log4j audit framework
Posted by Matt Sicker <bo...@gmail.com>.
Ah, I see what you mean. I don’t think we have any specific plugin for
that, though they sound like reasonable feature requests. Could you file
Jira tickets for them?
On Thu, Feb 27, 2020 at 03:09 Sushil Singh <Su...@thalesgroup.com>
wrote:
> Thanks @Matt Sicker <bo...@gmail.com> for your reply
>
> But 2 of my problems remains unresolved
>
> 1) How can i add hash of the log itself and send it with log itself as a
> Log field so that we can verify it for tampering at a later stage
> 2) How can i aggregate log events for count along with log itself such
> that I can get the Log event and a count as a field in a window. So
> basically want to do windowed aggregation of logs before flushing
>
> Burst filter was more of controlling logs rather than aggregating
>
> Please let me know how it can be achieved
>
> Thanks
>
> Sushil Pratap Singh
>
>
>
> ------------------------------
> *From:* Matt Sicker <bo...@gmail.com>
> *Sent:* 24 February 2020 20:25
> *To:* Log4J Users List <lo...@logging.apache.org>
> *Subject:* Re: Query Regarding Log4j audit framework
>
> Not sure about 1. For 2, there’s the burst filter in log4j2 which supports
> that type of thing in general. As for 3, take a look at the various
> appenders available like Syslog/Socket/HTTP/JDBC.
>
> On Mon, Feb 24, 2020 at 00:26 Sushil Singh <Su...@thalesgroup.com>
> wrote:
>
> > Hi
> >
> >
> > I want to use log 4j audit for multiple applications but I have certain
> > requirements
> >
> > 1) I want to add some function to logs such that hash of log messages can
> > be sent along with log message itself
> > 2) Is there a way to club same kind of Logs occuring frequently in a
> small
> > window of time
> > 3) Is there something we can use log api events to log to server also
> >
> > please let me know how these can be achieved
> >
> > Thanks,
> >
> > Sushil
> >
> > --
> Matt Sicker <bo...@gmail.com>
>
--
Matt Sicker <bo...@gmail.com>
Re: Query Regarding Log4j audit framework
Posted by Sushil Singh <Su...@thalesgroup.com>.
Thanks @Matt Sicker<ma...@gmail.com> for your reply
But 2 of my problems remains unresolved
1) How can i add hash of the log itself and send it with log itself as a Log field so that we can verify it for tampering at a later stage
2) How can i aggregate log events for count along with log itself such that I can get the Log event and a count as a field in a window. So basically want to do windowed aggregation of logs before flushing
Burst filter was more of controlling logs rather than aggregating
Please let me know how it can be achieved
Thanks
Sushil Pratap Singh
________________________________
From: Matt Sicker <bo...@gmail.com>
Sent: 24 February 2020 20:25
To: Log4J Users List <lo...@logging.apache.org>
Subject: Re: Query Regarding Log4j audit framework
Not sure about 1. For 2, there’s the burst filter in log4j2 which supports
that type of thing in general. As for 3, take a look at the various
appenders available like Syslog/Socket/HTTP/JDBC.
On Mon, Feb 24, 2020 at 00:26 Sushil Singh <Su...@thalesgroup.com>
wrote:
> Hi
>
>
> I want to use log 4j audit for multiple applications but I have certain
> requirements
>
> 1) I want to add some function to logs such that hash of log messages can
> be sent along with log message itself
> 2) Is there a way to club same kind of Logs occuring frequently in a small
> window of time
> 3) Is there something we can use log api events to log to server also
>
> please let me know how these can be achieved
>
> Thanks,
>
> Sushil
>
> --
Matt Sicker <bo...@gmail.com>
Re: Query Regarding Log4j audit framework
Posted by Matt Sicker <bo...@gmail.com>.
Not sure about 1. For 2, there’s the burst filter in log4j2 which supports
that type of thing in general. As for 3, take a look at the various
appenders available like Syslog/Socket/HTTP/JDBC.
On Mon, Feb 24, 2020 at 00:26 Sushil Singh <Su...@thalesgroup.com>
wrote:
> Hi
>
>
> I want to use log 4j audit for multiple applications but I have certain
> requirements
>
> 1) I want to add some function to logs such that hash of log messages can
> be sent along with log message itself
> 2) Is there a way to club same kind of Logs occuring frequently in a small
> window of time
> 3) Is there something we can use log api events to log to server also
>
> please let me know how these can be achieved
>
> Thanks,
>
> Sushil
>
> --
Matt Sicker <bo...@gmail.com>