Retrieving Auto-Failover Settings

    +
    Auto-failover settings are retrieved by means of the GET /settings/autoFailover HTTP method and URI.

    HTTP method and URI

    Retrieves auto-failover settings for a cluster. Auto-failover is a global setting, which applies to all nodes in the cluster. To read auto-failover settings, appropriate privileges are required.

    GET /settings/autoFailover

    Parameters include:

    • enabled. Indicates whether automatic failover is enabled (a value of true) or disabled (a value of false).

    • timeout. Returns an integer between 5 and 3600, which specifies the number of seconds set to elapse, after a node has become unavailable, before automatic failover is triggered.

    • count. This parameter represents how many sequential auto-failover events have occurred since the parameter was itself last reset, to a value of 0, through administrator intervention. The parameter’s default value is 0. Couchbase Server increments this value by 1 for every auto-failover event that occurs, up to the maximum count — an administrator-specified number whose highest-permitted value is 3. If sequential auto-failover events occur until the maximum count is reached, no further auto-failover is triggered until a parameter-reset is performed.

    Syntax

    Curl request syntax:

    curl -u [admin]:[password] http://[localhost]:8091/settings/autoFailover

    Example

    Curl request example:

    curl -u Administrator:password http://10.5.2.54:8091/settings/autoFailover

    Response

    If successful, execution returns the auto-failover settings for the cluster. For example:

    {
      "enabled": true,
      "timeout": 72,
      "count": 0,
      "failoverOnDataDiskIssues": {
        "enabled": true,
        "timePeriod": 89
      },
        "failoverServerGroup": true,
        "maxCount": 2
    }

    Response codes

    Possible errors include:

    HTTP/1.1 401 Unauthorized
    This endpoint isn't available yet.
    GET /settings/autoFailover HTTP/1.1
    Host: localhost:8091
    Authorization: Basic YWRtaW46YWRtaW4=
    Accept: */*
    HTTP/1.1 200 OK
    Content-Type: application/json
    Content-Length: nnn
    { "enabled": false, "timeout": 30, "count": 0 }