setting-audit
Configures the audit settings.
Syntax
The basic syntax is:
couchbase-cli setting-audit -c [host]:8091 -u [admin] -p [password] [options]
Options
The following are the command options:
| Option | Description |
|---|---|
|
Log rotation interval in minutes. |
|
Target log directory (required). |
|
Audit enable (yes=1, no=0). |
Examples
Enable audit with the log, specify the rotating interval, and post the logs in a specified directory
couchbase-cli setting-audit -c 192.168.0.1:8091 -u Administrator -p password --audit-enabled=1 --audit-log-rotate-interval=15 --audit-log-path=../../logs
Response
SUCCESS: set audit settings
Enable audit with the log and specify the rotating interval
couchbase-cli setting-audit -c 192.168.0.1:8091 -u Administrator -p password --audit-enabled=1 --audit-log-rotate-interval=15
Response
ERROR: unable to set audit settings (400) Bad Request
{"errors":{"logPath":"The value must be a valid directory"}}
The log directory has to be set.