mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
Fix review comments and new changes in config (#8515)
- Migrate and save only settings which are enabled - Rename logger_http to logger_webhook and logger_http_audit to audit_webhook - No more pretty printing comments, comment is a key=value pair now. - Avoid quotes on values which do not have space in them - `state="on"` is implicit for all SetConfigKV unless specified explicitly as `state="off"` - Disabled IAM users should be disabled always
This commit is contained in:
@@ -15,12 +15,12 @@ HTTP target logs to a generic HTTP endpoint in JSON format and is not enabled by
|
||||
|
||||
Assuming `mc` is already [configured](https://docs.min.io/docs/minio-client-quickstart-guide.html)
|
||||
```
|
||||
mc admin config get myminio/ logger_http
|
||||
logger_http:target1 auth_token="" endpoint="" state="off"
|
||||
mc admin config get myminio/ logger_webhook
|
||||
logger_webhook:target1 auth_token="" endpoint="" state="off"
|
||||
```
|
||||
|
||||
```
|
||||
mc admin config set myminio logger_http:target1 auth_token="" endpoint="http://endpoint:port/path" state="on"
|
||||
mc admin config set myminio logger_webhook:target1 auth_token="" endpoint="http://endpoint:port/path" state="on"
|
||||
mc admin service restart myminio
|
||||
```
|
||||
|
||||
@@ -28,21 +28,21 @@ NOTE: `http://endpoint:port/path` is a placeholder value to indicate the URL for
|
||||
|
||||
MinIO also honors environment variable for HTTP target logging as shown below, this setting will override the endpoint settings in the MinIO server config.
|
||||
```
|
||||
export MINIO_LOGGER_HTTP_STATE_target1="on"
|
||||
export MINIO_LOGGER_HTTP_AUTH_TOKEN_target1="token"
|
||||
export MINIO_LOGGER_HTTP_ENDPOINT_target1=http://localhost:8080/minio/logs
|
||||
export MINIO_LOGGER_WEBHOOK_STATE_target1="on"
|
||||
export MINIO_LOGGER_WEBHOOK_AUTH_TOKEN_target1="token"
|
||||
export MINIO_LOGGER_WEBHOOK_ENDPOINT_target1=http://localhost:8080/minio/logs
|
||||
minio server /mnt/data
|
||||
```
|
||||
|
||||
## Audit Targets
|
||||
Assuming `mc` is already [configured](https://docs.min.io/docs/minio-client-quickstart-guide.html)
|
||||
```
|
||||
mc admin config get myminio/ logger_http_audit
|
||||
logger_http_audit:target1 auth_token="" endpoint="" state="off"
|
||||
mc admin config get myminio/ audit_webhook
|
||||
audit_webhook:target1 auth_token="" endpoint="" state="off"
|
||||
```
|
||||
|
||||
```
|
||||
mc admin config set myminio logger_http_audit:target1 auth_token="" endpoint="http://endpoint:port/path" state="on"
|
||||
mc admin config set myminio audit_webhook:target1 auth_token="" endpoint="http://endpoint:port/path" state="on"
|
||||
mc admin service restart myminio
|
||||
```
|
||||
|
||||
@@ -50,9 +50,9 @@ NOTE: `http://endpoint:port/path` is a placeholder value to indicate the URL for
|
||||
|
||||
MinIO also honors environment variable for HTTP target Audit logging as shown below, this setting will override the endpoint settings in the MinIO server config.
|
||||
```
|
||||
export MINIO_LOGGER_HTTP_AUDIT_STATE_target1="on"
|
||||
export MINIO_LOGGER_HTTP_AUDIT_AUTH_TOKEN_target1="token"
|
||||
export MINIO_LOGGER_HTTP_AUDIT_ENDPOINT_target1=http://localhost:8080/minio/logs
|
||||
export MINIO_AUDIT_WEBHOOK_STATE_target1="on"
|
||||
export MINIO_AUDIT_WEBHOOK_AUTH_TOKEN_target1="token"
|
||||
export MINIO_AUDIT_WEBHOOK_ENDPOINT_target1=http://localhost:8080/minio/logs
|
||||
minio server /mnt/data
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user