Retrieving Log Information

Log information is retrieved via the /diag and /sasl_logs REST endpoints.

Getting log and server info

HTTP method and URI

To retrieve log and server diagnostic information, perform a GET with the /diag endpoint.

GET /diag

Syntax

Curl request syntax:

curl -v -X GET -u [admin]:[password] http://[hostname]:8091/diag

Example

Curl request example:

curl -v -X GET -u Administrator:password \
  http://127.0.0.1:8091/diag

Getting generic log info

HTTP method and URI

To retrieve a generic list of logs, perform a GET with the /sasl_logs endpoint.

GET /sasl_logs

Syntax

Curl request syntax:

curl -v -X GET -u [admin]:[password]
  http://[hostname]:8091/sasl_logs

Example

Curl request example:

curl -v -X GET -u Administrator:password \
  http://127.0.0.1:8091/sasl_logs

Getting specific log info

HTTP method and URI

To retrieve a specific log file, perform a GET on the sasl_logs endpoint and provide a specific log category.

GET /sasl_logs/[log_name]

Syntax

Curl request syntax:

curl -v -X GET -u [admin]:[password]
  http://[hostname]:8091/sasl_logs/[log_name]

Where the logName is one of the following log types:

  • babysitter

  • couchdb

  • debug

  • error

  • info

  • mapreduce_errors

  • ssl_proxy

  • stats

  • view

  • xdcr

  • xdcr_errors

Example

Curl request example to retrieve SSL proxy log information:

curl -v -X GET -u Administrator:password \
  http://10.5.2.118:8091/sasl_logs/ssl_proxy

Response

Returns information similar to the following:

* About to connect() to 10.5.2.118 port 8091 (#0)
*   Trying 10.5.2.118... connected
* Connected to 10.5.2.118 (10.5.2.118) port 8091 (#0)
* Server auth using Basic with user 'Administrator'
> GET /sasl_logs/ssl_proxy HTTP/1.1
> Authorization: Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA==
> User-Agent: curl/7.21.4 (x86_64-unknown-linux-gnu) libcurl/7.21.4 OpenSSL/0.9.8b zlib/1.2.3
> Host: 10.5.2.118:8091
> Accept: */*
>
< HTTP/1.1 200 OK
< Transfer-Encoding: chunked
< Server: Couchbase Server
< Pragma: no-cache
< Date: Thu, 06 Feb 2014 22:50:12 GMT
< Content-Type: text/plain; charset=utf-8
< Cache-Control: no-cache
<
logs_node (ssl_proxy):
-------------------------------
[ns_server:info,2014-01-24T11:25:18.066,nonode@nohost:<0.30.0>:ns_ssl_proxy:init_logging:84]Brought up ns_ssl_proxy logging
[error_logger:info,2014-01-24T11:25:18.082,nonode@nohost:error_logger<0.5.0>:ale_error_logger_handler:log_report:72]
=========================PROGRESS REPORT=========================
          supervisor: {local,ns_ssl_proxy_sup}
             started: [{pid,<0.64.0>},
                       {name,ns_ssl_proxy_server_sup},
                       {mfargs,{ns_ssl_proxy_server_sup,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,infinity},
                       {child_type,supervisor}]