A newer version of this documentation is available.

View Latest

setting-audit

Configures the audit settings.

Syntax

The basic syntax is:

couchbase-cli setting-audit -c [host]:8091 -u [admin] -p [password] [options]

Description

Use this command to set various options for audits.

Options

The following are the command options:

Table 1. setting-audit options
Option Description

--audit-log-rotate-interval=[MINUTES]

Log rotation interval in minutes.

--audit-log-path=[PATH]

Target log directory (required).

--audit-enabled=[0|1]

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.