Bucket Logging is the process in which the operations that are performed on bucket will be logged by Amazon.
You can choose your target bucket, where logs will be delivered. The target bucket would be a different bucket from the logged bucket.
When a log file is delivered to the target bucket, The format of the name of the log file is:-
TargetPrefix
YYYY-mm-DD-HH-MM-SS-
UniqueString
Target Prefix may be the
bucket name
that is being logged or as per your choice.
Here YYYY, mm, DD, HH, MM and SS are the digits of the year, month, day, hour, minute, and seconds (respectively) when the log file was delivered.
When
bucket logging
is enabled for particular bucket, then automatically
write
and
Read_ACP
permission is assigned for the log_delivery user.
So, Why use Bucket Logging?
:
1. To know, what operations has been performed on bucket?
2. Specify the time of operations performed and name of user by whom it is being performed.
3. Specify the file/object name on which the operation was performed and also size of the file/object.
The log files consist of a sequence of log records. Log records appear in no particular order. Each log record represents one request and consists of the following space delimited fields:
|
Field name |
Purpose |
|
Bucket Owner |
The canonical user id of the owner of the source bucket. |
|
Bucket |
The name of the bucket, against which the request was processed. |
|
Time |
The time at which the request was proceed. |
|
Remote-IP |
This shows the Internet address of the requestor. |
|
Requestor |
The canonical User Id of the request. |
|
Request-Id |
The request ID is a unique string generated by Amazon S3 . |
|
Operation |
Either SOAP or REST. |
|
Key |
‘-‘when no operation is performed on key, Otherwise name of the key. |
|
Request-URI |
The request-URI of the http request header. |
|
HTTP status |
The numeric http status code of the response. |
|
Error Code |
The Amazon S3
Error Code
, or '-' if no error occurred. |
|
Bytes Sent |
The number of response bytes sent, excluding HTTP protocol overhead, or '-' if zero. |
|
Object Size |
The total size of the object. |
|
Total Time |
The total number of milliseconds from the time your request is received to the time that the last byte of the response is sent. |
|
Turn-Around Time |
The number of milliseconds that Amazon S3 spent for processing your request. |
|
Referrer |
The value of the HTTP Referrer header, if present. HTTP user-agents (e.g. browsers) typically set this header to the URL of the linking or embedding page when making a request. |
|
User-Agent |
The value of the HTTP User-Agent header. |
Now, how to set “Bucket Logging” with Bucket Explorer:
Bucket Explorer make simple for you.
1.Just right click on the bucket that you want to set bucket logging and choose option
Bucket Logging operation -> Set Logging
, the dialog box will appear : -
2. Bucket Logging status shows bucket is already logged or not.
If logged then it displays the “
target
” bucket name otherwise
“
Not Logged
”.
3. Default Prefix is the bucket name that you want to log,
You can also change this.
4. Select the target bucket from combobox, in which you want to deliver the log files.
5. Click on Set Grantee button.
6. A set grantee panel appears, click on add access by Email Id/canonical Id button.
7. Enter Email Id of user /canonical ID of account with which you want to share the log files.
8. Set the permissions for the users that you have added.
9. Click on Ok button to set the permissions. The Set Grantee panel disappears.
10. Now, Click on OK button to save the grantee permissions and to enable the bucket logging.
11. Right click to target bucket and choose option Update Bucket Access control List.
12. It displays a window in which you can see the permissions for the "Log delivery users".
13. Bucket Explorer automatically set "Write" and "Read_ACP" permissions.
Note -
Set Grantee -
This option is used for adding the details of the users with which you want to share the bucket logging files.
Related Topics: