[
https://issues.apache.org/jira/browse/HDDS-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584617#comment-16584617
]
Dinesh Chitlangia commented on HDDS-98:
---------------------------------------
[~xyao], [~anu] I performed initial testing in my local setup.
After starting ozone, I executed:
{{./bin/ozone freon}}
The audit logs contains following kind of entries:
# Initially, you will only see Write events being logged as the Read events
were turned off until 2018-08-17 23:42:23,201
# Then, I turned on Read events and starting from 2018-08-17 23:42:23,201 , I
performed some read operations like listVolume, listKey, listBucket, getVolume
etc and also some write operations like deleteKey, deleteBucket...
# Thus, the runtime reload of log4j2 configs has also been tested with this
approach.
# Both success and failure type of events have been logged successfully for
read/write ops.
# To get log4j2 working, I passed -Dlog4j2.configurationFile in addition to
existing -Dlog4j.configuration for datanodes. I was able to confirm that these
two parameters don't conflict with each other and logging was neat. Even though
log4j2 provides a feature where existing slf4j/log4j1.x code can be made to run
through log4j2 event parser, we wanted to avoid that as it may bring in unseen
complications in existing logging and likewise an increased scope of
testing(unnecessary at this time). Thanks to [~arpitagarwal] for highlight that
lot of end users may have highly customized configurations in slf4j and can
lead to issues.
* For logging failure events, I am also capturing the exception in the audit
log. This is controlled by log4j2 configs and currently my settings enforce
that only first 3 lines of stack trace will be logged. We can modify this as
needed.
* Instead of space/tab separated values in a log entry, I have used | as the
delimiter. This is keeping in mind the future scenario where we may write a log
parser.
Here is the first set of logs [^audit.log] for your review/feedback
Here are the sample configs used for the above test.[^log4j2.properties]
Looking forward to your feedback/comments. Thank you.
> Adding Ozone Manager Audit Log
> ------------------------------
>
> Key: HDDS-98
> URL: https://issues.apache.org/jira/browse/HDDS-98
> Project: Hadoop Distributed Data Store
> Issue Type: Sub-task
> Reporter: Xiaoyu Yao
> Assignee: Dinesh Chitlangia
> Priority: Major
> Attachments: audit.log, log4j2.properties
>
>
> This ticket is opened to add ozone manager's audit log.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]