Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-7231

Change in behaviour of official indexer stats rest endpoint - api/v1/stats

    XMLWordPrintable

Details

    • DOC-2021-May09-S9, DOC-2021-May23-S10
    • 1

    Description

      With collections support from 7.0, there has been a change to "api/v1/stats" endpoint.Pre 7.0 version the api/v1/stats endpoint either supports indexer level stats or index level stats. With large number of indexes across collections, the scope of this endpoint becomes either too-wide (i.e. indexer node level stats) (or) too-narrow (i.e. per index stats).

      With 7.0,  hierarchical filtering has been introduced. This means that user can query for bucket/scope/collection level stats along with index level and indexer level stats

      Format: api/v1/stats/<keyspace_name>/<index_name> 

      Rules for specifying keyspace_name name:

      a. The keyspace_name can contain bucket, scope and collection names

      b. bucket/scope/collection names should be valid as per the naming semantics

      c. The keyspace name should be either <bucket_name> (or) <bucket_name>.<scope_name> (or) <bucket_name>.<scope_name>.<collection_name>

      d. When bucket name contains '.' character, it has to be enclosed in back-tick(`) characters in the URL E.g., api/v1/stats/`test.1` (or) api/v1/stats/`test.1`.test_scope/ 

      E.g.,

      1. api/v1/stats/test_bucket -> Returns stats at bucket level. Pre 7.0 versions, this endpoint returns error

      2. api/v1/stats/test_bucket.test_scope -> Returns stats at scope level i.e. stats of all indexes across all collections test_bucket under test_scope. Introduced in 7.0

      3. api/v1/stats/test_bucket.test_scope.test_collection -> Returns stats at collection level i.e. stats of all indexes belonging to test_collection in test_scope under test_bucket. Introduced in 7.0

      4.  api/v1/stats/test_bucket.test_scope.test_collection/idx_1 -> Returns stats of index idx_1 built in test_collection of test_scope under test_bucket

      When retrieving index level stats, both scope name and collection name are to be specified (except for default scope and default collection). Specifying only one is not valid E.g.,

      5. api/v1/stats/test_bucket.test_scope/idx_1 is invalid

      6. api/vi/stats/test_bucket/idx_1 will return index stats from default scope and default collection

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              simon.dew Simon Dew
              varun.velamuri Varun Velamuri
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty