diff --git a/couchbase/changelog.d/21284.added b/couchbase/changelog.d/21284.added new file mode 100644 index 0000000000000..4182e13609e55 --- /dev/null +++ b/couchbase/changelog.d/21284.added @@ -0,0 +1 @@ +Changed Server and Sync Gateway versions to reflect current EOL status. This adds 45 new Sync Gateway metrics covering cache usage, replication errors/throttling, compaction and resync activity, REST API traffic, replication bandwidth, resource utilization, and fatal error signals — giving operators clearer visibility into performance, reliability, and system health. diff --git a/couchbase/datadog_checks/couchbase/couchbase_consts.py b/couchbase/datadog_checks/couchbase/couchbase_consts.py index d755c5ecd18fc..8953b520d3cbd 100644 --- a/couchbase/datadog_checks/couchbase/couchbase_consts.py +++ b/couchbase/datadog_checks/couchbase/couchbase_consts.py @@ -243,7 +243,9 @@ # Global metrics 'admin_net_bytes_recv', 'admin_net_bytes_sent', + 'assertion_fail_count', 'error_count', + 'idle_kv_ops', 'num_goroutines', 'pub_net_bytes_recv', 'pub_net_bytes_sent', @@ -258,6 +260,7 @@ 'chan_cache_channels_evicted_nru', 'chan_cache_compact_count', 'chan_cache_compact_time', + 'chan_cache_current_skipped_seq_count', 'chan_cache_hits', 'chan_cache_max_entries', 'chan_cache_misses', @@ -265,23 +268,28 @@ 'chan_cache_pending_queries', 'chan_cache_removal_revs', 'chan_cache_tombstone_revs', + 'non_mobile_ignored_count', 'num_active_channels', 'num_skipped_seqs', 'pending_seq_len', 'rev_cache_bypass', 'rev_cache_hits', 'rev_cache_misses', + 'view_queries', # Per DB cbl_replication_pull metrics "attachment_pull_bytes", "attachment_pull_count", + "norev_send_count", "num_pull_repl_active_continuous", "num_pull_repl_active_one_shot", "num_pull_repl_caught_up", "num_pull_repl_since_zero", "num_pull_repl_total_continuous", "num_pull_repl_total_one_shot", + "replacement_rev_send_count", "request_changes_count", "request_changes_time", + "rev_error_count", "rev_processing_time", "rev_send_count", "rev_send_latency", @@ -292,10 +300,15 @@ "doc_push_count", "propose_change_count", "propose_change_time", + "resync_num_changed", + "resync_num_processed", "sync_function_count", "sync_function_time", "write_processing_time", + "write_throttled_count", + "write_throttled_time", # Per DB database metrics + "corrupt_sequence_count", "crc32c_match_count", "dcp_caching_count", "dcp_caching_time", @@ -304,16 +317,32 @@ "doc_writes_bytes", "doc_writes_bytes_blip", "doc_writes_xattr_bytes", + "num_attachments_compacted", "num_doc_reads_blip", "num_doc_reads_rest", + "num_docs_post_filter_public_all_docs", + "num_docs_pre_filter_public_all_docs", "num_doc_writes", + "num_doc_writes_rejected", + "num_public_all_docs_requests", + "num_public_rest_requests", "num_replications_active", + "num_replications_rejected_limit", "num_replications_total", "num_replications_total", "num_replications_total", + "public_rest_bytes_read", + "public_rest_bytes_written", + "replication_bytes_received", + "replication_bytes_sent", "sequence_incr_count", "sequence_released_count", "sequence_reserved_count", + "sync_function_exception_count", + "total_init_fatal_errors", + "total_online_fatal_errors", + "total_sync_time", + "warn_channel_name_size_count", "warn_channels_per_doc_count", "warn_grants_per_doc_count", "warn_xattr_size_count", @@ -327,6 +356,7 @@ "import_cancel_cas", "import_count", "import_error_count", + "import_feed_processed_count", "import_partitions", "import_processing_time", ] diff --git a/couchbase/hatch.toml b/couchbase/hatch.toml index 21a594adf0315..e35c0b3273ac7 100644 --- a/couchbase/hatch.toml +++ b/couchbase/hatch.toml @@ -2,12 +2,17 @@ [[envs.default.matrix]] python = ["3.12"] -# https://www.couchbase.com/support-policy/enterprise-software -version = ["6.6", "7.0", "7.1"] +# https://www.couchbase.com/support-policy/EOL/ +version = ["7.0", "7.1", "7.2", "7.6"] [envs.default.overrides] matrix.version.env-vars = [ - { key = "COUCHBASE_VERSION", value = "6.6.6", if = ["6.6"] }, { key = "COUCHBASE_VERSION", value = "7.0.5", if = ["7.0"] }, - { key = "COUCHBASE_VERSION", value = "7.1.3", if = ["7.1"] }, + { key = "COUCHBASE_VERSION", value = "7.1.6", if = ["7.1"] }, + { key = "COUCHBASE_VERSION", value = "7.2.8", if = ["7.2"] }, + { key = "COUCHBASE_VERSION", value = "7.6.7", if = ["7.6"] }, + { key = "COUCHBASE_SYNCGW_VERSION", value = "3.1.0", if = ["7.0"] }, + { key = "COUCHBASE_SYNCGW_VERSION", value = "3.3.0", if = ["7.1"] }, + { key = "COUCHBASE_SYNCGW_VERSION", value = "3.3.0", if = ["7.2"] }, + { key = "COUCHBASE_SYNCGW_VERSION", value = "3.3.0", if = ["7.6"] }, ] diff --git a/couchbase/metadata.csv b/couchbase/metadata.csv index 26d8733fb8c27..26880e937e707 100644 --- a/couchbase/metadata.csv +++ b/couchbase/metadata.csv @@ -1,363 +1,400 @@ -metric_name,metric_type,interval,unit_name,per_unit_name,description,orientation,integration,short_name,curated_metric -couchbase.by_bucket.avg_bg_wait_time,gauge,,microsecond,,Average background wait time,-1,couchbase,avg bg wait, -couchbase.by_bucket.avg_disk_commit_time,gauge,,second,,Average disk commit time,-1,couchbase,avg commit time, -couchbase.by_bucket.avg_disk_update_time,gauge,,microsecond,,Average disk update time ,-1,couchbase,avg update time, -couchbase.by_bucket.bg_wait_total,gauge,,byte,,Bytes read,0,couchbase,read, -couchbase.by_bucket.bytes_read,gauge,,byte,,Bytes read,0,couchbase,read, -couchbase.by_bucket.bytes_written,gauge,,byte,,Bytes written,0,couchbase,written, -couchbase.by_bucket.cas_badval,gauge,,,,Compare and Swap bad values,-1,couchbase,cas badval, -couchbase.by_bucket.cas_hits,gauge,,hit,,Compare and Swap hits,1,couchbase,cas hits, -couchbase.by_bucket.cas_misses,gauge,,miss,,Compare and Swap misses,-1,couchbase,cas misses, -couchbase.by_bucket.cmd_get,gauge,,get,,Get operations performed on the bucket,0,couchbase,bucket gets, -couchbase.by_bucket.cmd_lookup,gauge,,get,,Lookup operations performed on the bucket,0,couchbase,bucket lookups, -couchbase.by_bucket.cmd_set,gauge,,set,,Set operations performed on the bucket,0,couchbase,bucket sets, -couchbase.by_bucket.couch_docs_actual_disk_size,gauge,,byte,,Couch docs total size on disk in bytes,0,couchbase,doc actual disk size, -couchbase.by_bucket.couch_docs_data_size,gauge,,byte,,Couch docs data size in bytes,0,couchbase,doc data disk size, -couchbase.by_bucket.couch_docs_disk_size,gauge,,byte,,Couch docs total size in bytes,0,couchbase,doc disk size, -couchbase.by_bucket.couch_docs_fragmentation,gauge,,percent,,Couch docs fragmentation,-1,couchbase,doc fragmentation, -couchbase.by_bucket.couch_spatial_data_size,gauge,,byte,,Size of object data for spatial views,0,couchbase,spatial data size, -couchbase.by_bucket.couch_spatial_disk_size,gauge,,byte,,Amount of disk space occupied by spatial views,0,couchbase,spatial disk size, -couchbase.by_bucket.couch_spatial_ops,gauge,,operation,,Spatial operations,0,couchbase,spatial ops, -couchbase.by_bucket.couch_total_disk_size,gauge,,byte,,Couch total disk size,0,couchbase,total disk size, -couchbase.by_bucket.couch_views_data_size,gauge,,byte,,Size of object data for views,0,couchbase,view data size, -couchbase.by_bucket.couch_views_disk_size,gauge,,byte,,Amount of disk space occupied by views,0,couchbase,view disk size, -couchbase.by_bucket.couch_views_fragmentation,gauge,,percent,,View fragmentation,-1,couchbase,view fragmentation, -couchbase.by_bucket.couch_views_ops,gauge,,operation,,View operations,0,couchbase,view ops, -couchbase.by_bucket.cpu_idle_ms,gauge,,millisecond,,CPU idle milliseconds,0,couchbase,cpu idle ms, -couchbase.by_bucket.cpu_utilization_rate,gauge,,percent,,CPU utilization percentage,0,couchbase,cpu util, -couchbase.by_bucket.curr_connections,gauge,,connection,,The current number of bucket connections,0,couchbase,conns, -couchbase.by_bucket.curr_items,gauge,,item,,Number of active items in memory,0,couchbase,mem items, -couchbase.by_bucket.curr_items_tot,gauge,,item,,Total number of items,0,couchbase,total items, -couchbase.by_bucket.decr_hits,gauge,,hit,,Decrement hits,1,couchbase,decr hits, -couchbase.by_bucket.decr_misses,gauge,,miss,,Decrement misses,-1,couchbase,decr misses, -couchbase.by_bucket.delete_hits,gauge,,hit,,Delete hits,1,couchbase,del hits, -couchbase.by_bucket.delete_misses,gauge,,miss,,Delete misses,-1,couchbase,del misses, -couchbase.by_bucket.disk_commit_count,gauge,,operation,,Disk commits,0,couchbase,commits, -couchbase.by_bucket.disk_update_count,gauge,,operation,,Disk updates,0,couchbase,updates, -couchbase.by_bucket.disk_write_queue,gauge,,operation,,Disk write queue depth,-1,couchbase,writes, -couchbase.by_bucket.ep_bg_fetched,gauge,,fetch,second,Disk reads per second,0,couchbase,reads, -couchbase.by_bucket.ep_cache_miss_rate,gauge,,miss,,Cache miss rate,-1,couchbase,miss rate, -couchbase.by_bucket.ep_cache_miss_ratio,gauge,,percent,,Cache miss ratio,-1,couchbase,miss ratio, -couchbase.by_bucket.ep_dcp_2i_backoff,gauge,,,,Number of backoffs for indexes DCP connections,-1,couchbase,dcp indexes backoff, -couchbase.by_bucket.ep_dcp_2i_count,gauge,,connection,,Number of indexes DCP connections,0,couchbase,dcp indexes count, -couchbase.by_bucket.ep_dcp_2i_items_remaining,gauge,,item,,Number of indexes items remaining to be sent,0,couchbase,dcp indexes items remaining, -couchbase.by_bucket.ep_dcp_2i_items_sent,gauge,,item,,Number of indexes items sent,0,couchbase,dcp indexes items sent, -couchbase.by_bucket.ep_dcp_2i_producer_count,gauge,,,,Number of indexes producers,0,couchbase,dcp indexes producer, -couchbase.by_bucket.ep_dcp_2i_total_bytes,gauge,,byte,second,Number bytes per second being sent for indexes DCP connections,0,couchbase,dcp indexes total bytes, -couchbase.by_bucket.ep_dcp_fts_backoff,gauge,,,,Number of backoffs for fts DCP connections,-1,couchbase,dcp fts backoff, -couchbase.by_bucket.ep_dcp_fts_count,gauge,,connection,,Number of fts DCP connections,0,couchbase,dcp fts count, -couchbase.by_bucket.ep_dcp_fts_items_remaining,gauge,,item,,Number of fts items remaining to be sent,0,couchbase,dcp fts items remaining, -couchbase.by_bucket.ep_dcp_fts_items_sent,gauge,,item,,Number of fts items sent,0,couchbase,dcp fts items sent, -couchbase.by_bucket.ep_dcp_fts_producer_count,gauge,,,,Number of fts producers,0,couchbase,dcp fts producer, -couchbase.by_bucket.ep_dcp_fts_total_bytes,gauge,,byte,second,Number bytes per second being sent for fts DCP connections,0,couchbase,dcp fts total bytes, -couchbase.by_bucket.ep_dcp_other_backoff,gauge,,,,Number of backoffs for other DCP connections,-1,couchbase,dcp other backoff, -couchbase.by_bucket.ep_dcp_other_count,gauge,,connection,,Number of other DCP connections,0,couchbase,dcp other count, -couchbase.by_bucket.ep_dcp_other_items_remaining,gauge,,item,,Number of other items remaining to be sent,0,couchbase,dcp other items remaining, -couchbase.by_bucket.ep_dcp_other_items_sent,gauge,,item,,Number of other items sent,0,couchbase,dcp other items sent, -couchbase.by_bucket.ep_dcp_other_producer_count,gauge,,,,Number of other producers,0,couchbase,dcp other producer, -couchbase.by_bucket.ep_dcp_other_total_bytes,gauge,,byte,second,Number bytes per second being sent for other DCP connections,0,couchbase,dcp other total bytes, -couchbase.by_bucket.ep_dcp_replica_backoff,gauge,,,,Number of backoffs for replica DCP connections,-1,couchbase,dcp replica backoff, -couchbase.by_bucket.ep_dcp_replica_count,gauge,,connection,,Number of replica DCP connections,0,couchbase,dcp replica count, -couchbase.by_bucket.ep_dcp_replica_items_remaining,gauge,,item,,Number of replica items remaining to be sent,0,couchbase,dcp replica items remaining, -couchbase.by_bucket.ep_dcp_replica_items_sent,gauge,,item,,Number of replica items sent,0,couchbase,dcp replica items sent, -couchbase.by_bucket.ep_dcp_replica_producer_count,gauge,,,,Number of replica producers,0,couchbase,dcp replica producer, -couchbase.by_bucket.ep_dcp_replica_total_bytes,gauge,,byte,second,Number bytes per second being sent for replica DCP connections,0,couchbase,dcp replica total bytes, -couchbase.by_bucket.ep_dcp_views_backoff,gauge,,,,Number of backoffs for views DCP connections,-1,couchbase,dcp views backoff, -couchbase.by_bucket.ep_dcp_views_count,gauge,,connection,,Number of views DCP connections,0,couchbase,dcp views count, -couchbase.by_bucket.ep_dcp_views_items_remaining,gauge,,item,,Number of views items remaining to be sent,0,couchbase,dcp views items remaining, -couchbase.by_bucket.ep_dcp_views_items_sent,gauge,,item,,Number of views items sent,0,couchbase,dcp views items sent, -couchbase.by_bucket.ep_dcp_views_producer_count,gauge,,,,Number of views producers,0,couchbase,dcp views producer, -couchbase.by_bucket.ep_dcp_views_total_bytes,gauge,,byte,second,Number bytes per second being sent for views DCP connections,0,couchbase,dcp views total bytes, -couchbase.by_bucket.ep_dcp_xdcr_backoff,gauge,,,,Number of backoffs for xdcr DCP connections,-1,couchbase,dcp xdcr backoff, -couchbase.by_bucket.ep_dcp_xdcr_count,gauge,,connection,,Number of xdcr DCP connections,0,couchbase,dcp xdcr count, -couchbase.by_bucket.ep_dcp_xdcr_items_remaining,gauge,,item,,Number of xdcr items remaining to be sent,0,couchbase,dcp xdcr items remaining, -couchbase.by_bucket.ep_dcp_xdcr_items_sent,gauge,,item,,Number of xdcr items sent,0,couchbase,dcp xdcr items sent, -couchbase.by_bucket.ep_dcp_xdcr_producer_count,gauge,,,,Number of xdcr producers,0,couchbase,dcp xdcr producer, -couchbase.by_bucket.ep_dcp_xdcr_total_bytes,gauge,,byte,second,Number bytes per second being sent for xdcr DCP connections,0,couchbase,dcp xdcr total bytes, -couchbase.by_bucket.ep_diskqueue_drain,gauge,,item,,Total Drained items on disk queue,0,couchbase,queue drained, -couchbase.by_bucket.ep_diskqueue_fill,gauge,,item,,Total enqueued items on disk queue,0,couchbase,queued, -couchbase.by_bucket.ep_diskqueue_items,gauge,,item,,Total number of items waiting to be written to disk,0,couchbase,queue waiting items, -couchbase.by_bucket.ep_flusher_todo,gauge,,item,,Number of items currently being written,0,couchbase,current flushing items, -couchbase.by_bucket.ep_item_commit_failed,gauge,,error,,Number of times a transaction failed to commit due to storage errors,1,couchbase,failed commits, -couchbase.by_bucket.ep_kv_size,gauge,,byte,,Total amount of user data cached in RAM in this bucket,0,couchbase,kv size, -couchbase.by_bucket.ep_max_size,gauge,,byte,,The maximum amount of memory this bucket can use,0,couchbase,max size, -couchbase.by_bucket.ep_mem_high_wat,gauge,,byte,,Mem usage high water mark for auto-evictions,0,couchbase,mem high water mark, -couchbase.by_bucket.ep_mem_low_wat,gauge,,byte,,Mem usage low water mark for auto-evictions,0,couchbase,mem low water mark, -couchbase.by_bucket.ep_meta_data_memory,gauge,,byte,,Total amount of item metadata consuming RAM in this bucket,0,couchbase,metadata mem, -couchbase.by_bucket.ep_num_non_resident,gauge,,item,,Number of non-resident items,0,couchbase,non-resident items, -couchbase.by_bucket.ep_num_ops_del_meta,gauge,,operation,second,Number of delete operations per second for this bucket as the target for XDCR,0,couchbase,ops del meta, -couchbase.by_bucket.ep_num_ops_del_ret_meta,gauge,,operation,second,Number of delRetMeta operations per second for this bucket as the target for XDCR,0,couchbase,ops del meta, -couchbase.by_bucket.ep_num_ops_get_meta,gauge,,operation,second,Number of read operations per second for this bucket as the target for XDCR,0,couchbase,ops get meta, -couchbase.by_bucket.ep_num_ops_set_meta,gauge,,operation,second,Number of set operations per second for this bucket as the target for XDCR,0,couchbase,ops set meta, -couchbase.by_bucket.ep_num_ops_set_ret_meta,gauge,,operation,second,Number of setRetMeta operations per second for this bucket as the target for XDCR,0,couchbase,ops set rep meta, -couchbase.by_bucket.ep_num_value_ejects,gauge,,item,,Number of times item values got ejected from memory to disk,0,couchbase,ejects, -couchbase.by_bucket.ep_oom_errors,gauge,,error,,Number of times unrecoverable OOMs happened while processing operations,-1,couchbase,ooms, -couchbase.by_bucket.ep_ops_create,gauge,,operation,,Create operations,0,couchbase,create ops, -couchbase.by_bucket.ep_ops_update,gauge,,operation,,Update operations,0,couchbase,update ops, -couchbase.by_bucket.ep_overhead,gauge,,byte,,Extra memory used by transient data like persistence queues or checkpoints,0,couchbase,overhead, -couchbase.by_bucket.ep_queue_size,gauge,,item,,Number of items queued for storage,0,couchbase,queue size, -couchbase.by_bucket.ep_resident_items_rate,gauge,,item,,Number of resident items,0,couchbase,resident items, -couchbase.by_bucket.ep_tap_replica_queue_drain,gauge,,item,,Total drained items in the replica queue,0,couchbase,drain items, -couchbase.by_bucket.ep_tap_total_queue_drain,gauge,,item,,Total drained items in the queue,0,couchbase,drain items, -couchbase.by_bucket.ep_tap_total_queue_fill,gauge,,item,,Total enqueued items in the queue,0,couchbase,queued, -couchbase.by_bucket.ep_tap_total_total_backlog_size,gauge,,item,,Number of remaining items for replication,-1,couchbase,backlog size, -couchbase.by_bucket.ep_tmp_oom_errors,gauge,,error,,Number of times recoverable OOMs happened while processing operations,-1,couchbase,ooms, -couchbase.by_bucket.ep_vb_total,gauge,,item,,Total number of vBuckets for this bucket,-1,couchbase,vb total, -couchbase.by_bucket.evictions,gauge,,eviction,,Number of evictions,-1,couchbase,evictions, -couchbase.by_bucket.get_hits,gauge,,hit,,Number of get hits,1,couchbase,get hits, -couchbase.by_bucket.get_misses,gauge,,miss,,Number of get misses,-1,couchbase,get misses, -couchbase.by_bucket.hibernated_requests,gauge,,request,,Number of streaming requests now idle,0,couchbase,hibernated requests, -couchbase.by_bucket.hibernated_waked,gauge,,request,,Rate of streaming request wakeups,0,couchbase,hibernated waked, -couchbase.by_bucket.hit_ratio,gauge,,percent,,Hit ratio,1,couchbase,hit ratio, -couchbase.by_bucket.incr_hits,gauge,,hit,,Number of increment hits,1,couchbase,increment hits, -couchbase.by_bucket.incr_misses,gauge,,miss,,Number of increment misses,-1,couchbase,increment misses, -couchbase.by_bucket.mem_actual_free,gauge,,byte,,Free memory,0,couchbase,actual free, -couchbase.by_bucket.mem_actual_used,gauge,,byte,,Used memory,0,couchbase,actual used, -couchbase.by_bucket.mem_free,gauge,,byte,,Free memory,0,couchbase,free, -couchbase.by_bucket.mem_total,gauge,,byte,,Total available memory,0,couchbase,total, -couchbase.by_bucket.mem_used,gauge,,byte,,Engine's total memory usage (deprecated),0,couchbase,used, -couchbase.by_bucket.mem_used_sys,gauge,,byte,,System memory usage,0,couchbase,used sys, -couchbase.by_bucket.misses,gauge,,miss,,Total number of misses,-1,couchbase,misses, -couchbase.by_bucket.ops,gauge,,operation,,Total number of operations,0,couchbase,ops, -couchbase.by_bucket.page_faults,gauge,,page,,Number of page faults,-1,couchbase,faults, -couchbase.by_bucket.replication_docs_rep_queue,gauge,,item,,,0,couchbase,repl docs queue, -couchbase.by_bucket.replication_meta_latency_aggr,gauge,,second,,,0,couchbase,repl meta latency aggr, -couchbase.by_bucket.rest_requests,gauge,,request,second,Number of HTTP requests,0,couchbase,rest requests, -couchbase.by_bucket.swap_total,gauge,,byte,,Total amount of swap available,0,couchbase,swap total, -couchbase.by_bucket.swap_used,gauge,,byte,,Amount of swap used ,0,couchbase,swap used, -couchbase.by_bucket.vb_active_eject,gauge,,item,second,Number of items per second being ejected to disk from active vBuckets,0,couchbase,vb active eject, -couchbase.by_bucket.vb_active_itm_memory,gauge,,item,,Amount of active user data cached in RAM in this bucket,0,couchbase,vb active item mem, -couchbase.by_bucket.vb_active_meta_data_memory,gauge,,item,,Amount of active item metadata consuming RAM in this bucket,0,couchbase,vb active meta mem, -couchbase.by_bucket.vb_active_num,gauge,,item,,Number of active items,0,couchbase,vb active num, -couchbase.by_bucket.vb_active_num_non_resident,gauge,,item,,Number of non resident vBuckets in the active state for this bucket,0,couchbase,vb active num non resident, -couchbase.by_bucket.vb_active_ops_create,gauge,,item,second,New items per second being inserted into active vBuckets in this bucket,0,couchbase,vb active ops create, -couchbase.by_bucket.vb_active_ops_update,gauge,,item,second,Number of items updated on active vBucket per second for this bucket,0,couchbase,vb active ops update, -couchbase.by_bucket.vb_active_queue_age,gauge,,millisecond,,Sum of disk queue item age in milliseconds,0,couchbase,vb active queue age, -couchbase.by_bucket.vb_active_queue_drain,gauge,,item,,Total drained items in the queue,0,couchbase,vb active queue drain, -couchbase.by_bucket.vb_active_queue_fill,gauge,,item,second,Number of active items per second being put on the active item disk queue,0,couchbase,vb active queue fill, -couchbase.by_bucket.vb_active_queue_size,gauge,,item,,Number of active items in the queue,0,couchbase,vb active queue size, -couchbase.by_bucket.vb_active_resident_items_ratio,gauge,,item,,Number of resident items,0,couchbase,vb active resident items ratio, -couchbase.by_bucket.vb_avg_active_queue_age,gauge,,second,,Average age in seconds of active items in the active item queue,0,couchbase,vb avg active queue age, -couchbase.by_bucket.vb_avg_pending_queue_age,gauge,,second,,Average age in seconds of pending items in the pending item queue,0,couchbase,vb avg pending queue age, -couchbase.by_bucket.vb_avg_replica_queue_age,gauge,,second,,Average age in seconds of replica items in the replica item queue,0,couchbase,vb avg replica queue age, -couchbase.by_bucket.vb_avg_total_queue_age,gauge,,second,,Average age of items in the queue,0,couchbase,vb avg total queue age, -couchbase.by_bucket.vb_pending_curr_items,gauge,,item,,Number of items in pending vBuckets,0,couchbase,vb pending curr item, -couchbase.by_bucket.vb_pending_eject,gauge,,item,second,Number of items per second being ejected to disk from pending vBuckets,0,couchbase,vb pending eject, -couchbase.by_bucket.vb_pending_itm_memory,gauge,,item,,Amount of pending user data cached in RAM in this bucket,0,couchbase,vb pending item mem, -couchbase.by_bucket.vb_pending_meta_data_memory,gauge,,item,,Amount of pending item metadata consuming RAM in this bucket,0,couchbase,vb pending meta mem, -couchbase.by_bucket.vb_pending_num,gauge,,item,,Number of pending items,0,couchbase,vb pending num, -couchbase.by_bucket.vb_pending_num_non_resident,gauge,,item,,Number of non resident vBuckets in the pending state for this bucket,0,couchbase,vb pending num non resident, -couchbase.by_bucket.vb_pending_ops_create,gauge,,operation,,Number of pending create operations,0,couchbase,vb pending ops create, -couchbase.by_bucket.vb_pending_ops_update,gauge,,item,second,Number of items updated on pending vBucket per second for this bucket,0,couchbase,vb pending ops update, -couchbase.by_bucket.vb_pending_queue_age,gauge,,millisecond,,Sum of disk pending queue item age in milliseconds,0,couchbase,vb pending queue age, -couchbase.by_bucket.vb_pending_queue_drain,gauge,,item,,Total drained pending items in the queue,0,couchbase,vb pending queue drain, -couchbase.by_bucket.vb_pending_queue_fill,gauge,,item,,Total enqueued pending items on disk queue,0,couchbase,vb pending queue fill, -couchbase.by_bucket.vb_pending_queue_size,gauge,,item,,Number of pending items in the queue,0,couchbase,vb pending queue size, -couchbase.by_bucket.vb_pending_resident_items_ratio,gauge,,item,,Number of resident pending items,0,couchbase,vb pending resident items ratio, -couchbase.by_bucket.vb_replica_curr_items,gauge,,item,,Number of in memory items,0,couchbase,vb replica curr items, -couchbase.by_bucket.vb_replica_eject,gauge,,item,second,Number of items per second being ejected to disk from replica vBuckets,0,couchbase,vb replica eject, -couchbase.by_bucket.vb_replica_itm_memory,gauge,,item,,Amount of replica user data cached in RAM in this bucket,0,couchbase,vb replica item mem, -couchbase.by_bucket.vb_replica_meta_data_memory,gauge,,byte,,Total metadata memory,0,couchbase,vb replica meta data mem, -couchbase.by_bucket.vb_replica_num,gauge,,item,,Number of replica vBuckets,0,couchbase,vb replica num, -couchbase.by_bucket.vb_replica_num_non_resident,gauge,,item,,Number of non resident vBuckets in the replica state for this bucket,0,couchbase,vb replica num non resident, -couchbase.by_bucket.vb_replica_ops_create,gauge,,operation,,Number of replica create operations,0,couchbase,vb replica ops create, -couchbase.by_bucket.vb_replica_ops_update,gauge,,item,second,Number of items updated on replica vBucket per second for this bucket,0,couchbase,vb replica ops update, -couchbase.by_bucket.vb_replica_queue_age,gauge,,millisecond,,Sum of disk replica queue item age in milliseconds,0,couchbase,vb replica queue age, -couchbase.by_bucket.vb_replica_queue_drain,gauge,,item,,Total drained replica items in the queue,0,couchbase,vb replica queue drain, -couchbase.by_bucket.vb_replica_queue_fill,gauge,,item,,Total enqueued replica items on disk queue,0,couchbase,vb replica queue fill, -couchbase.by_bucket.vb_replica_queue_size,gauge,,item,,Replica items in disk queue,0,couchbase,vb replica queue size, -couchbase.by_bucket.vb_replica_resident_items_ratio,gauge,,item,,Number of resident replica items,0,couchbase,vb replica resident items ratio, -couchbase.by_bucket.vb_total_queue_age,gauge,,second,,Sum of disk queue item age in milliseconds,0,couchbase,vb total queue age, -couchbase.by_bucket.xdc_ops,gauge,,operation,,Number of cross-datacenter replication operations,0,couchbase,xdc ops, -couchbase.by_node.cmd_get,gauge,,get,,Get operations performed on the node,0,couchbase,node gets, -couchbase.by_node.couch_docs_actual_disk_size,gauge,,byte,,Couch docs total size on disk in bytes,0,couchbase,doc disk size, -couchbase.by_node.couch_docs_data_size,gauge,,byte,,Couch docs data size in bytes,0,couchbase,doc size, -couchbase.by_node.couch_spatial_data_size,gauge,,byte,,Size of object data for spatial views,0,couchbase,node spatial data size, -couchbase.by_node.couch_spatial_disk_size,gauge,,byte,,Amount of disk space occupied by spatial views,0,couchbase,node spatial disk size, -couchbase.by_node.couch_views_actual_disk_size,gauge,,byte,,Couch views total size on disk in bytes,0,couchbase,views disk size, -couchbase.by_node.couch_views_data_size,gauge,,byte,,Couch views data size on disk in bytes,0,couchbase,views size, -couchbase.by_node.curr_items,gauge,,item,,Number of active items in memory,0,couchbase,mem items, -couchbase.by_node.curr_items_tot,gauge,,item,,Total number of items,0,couchbase,total items, -couchbase.by_node.ep_bg_fetched,gauge,,fetch,second,Disk reads per second,0,couchbase,node reads, -couchbase.by_node.get_hits,gauge,,hit,,Number of get hits,1,couchbase,node get hits, -couchbase.by_node.index_data_size,gauge,,byte,,Index data size,1,couchbase,index data size, -couchbase.by_node.index_disk_size,gauge,,byte,,Index disk size,1,couchbase,index data size, -couchbase.by_node.mem_used,gauge,,byte,,Engine's total memory usage (deprecated),0,couchbase,node used, -couchbase.by_node.ops,gauge,,operation,,Total number of operations,0,couchbase,node ops, -couchbase.by_node.vb_active_num_non_resident,gauge,,item,,Number of non resident vBuckets in the active state for this bucket,0,couchbase,node vb active num non resident, -couchbase.by_node.vb_replica_curr_items,gauge,,item,,Number of in memory items,0,couchbase,vb replica curr items, -couchbase.hdd.free,gauge,,byte,,Free hard disk space,1,couchbase,hdd free, -couchbase.hdd.quota_total,gauge,,byte,,Hard disk quota,0,couchbase,hdd quota total, -couchbase.hdd.total,gauge,,byte,,Total hard disk space,0,couchbase,hdd total, -couchbase.hdd.used,gauge,,byte,,Used hard disk space,-1,couchbase,hdd used, -couchbase.hdd.used_by_data,gauge,,byte,,Hard disk used for data,0,couchbase,hdd data used, -couchbase.index.avg_drain_rate,gauge,,item,second,[Couchbase >= 7] The average number of items flushed from memory to disk storage per second,0,couchbase,, -couchbase.index.avg_item_size,gauge,,byte,,[Couchbase >= 7] The average size of the keys,0,couchbase,, -couchbase.index.avg_scan_latency,gauge,,nanosecond,,[Couchbase >= 7] The average time to serve a scan request,0,couchbase,, -couchbase.index.cache_hit_percent,gauge,,percent,,[Couchbase >= 7] The percentage of memory accesses that were served from the managed cache,0,couchbase,, -couchbase.index.cache_hits,count,,,,[Couchbase >= 7] The number of accesses to this index data from RAM,0,couchbase,, -couchbase.index.cache_misses,count,,,,[Couchbase >= 7] The number of accesses to this index data from disk,0,couchbase,, -couchbase.index.data_size,gauge,,byte,,[Couchbase >= 7] The size of indexable data that is maintained for the index or partition,0,couchbase,, -couchbase.index.disk_size,gauge,,byte,,[Couchbase >= 7] The total disk file size consumed by the index or partition,0,couchbase,, -couchbase.index.frag_percent,gauge,,percent,,[Couchbase >= 7] The percentage fragmentation of the index,0,couchbase,, -couchbase.index.initial_build_progress,gauge,,percent,,"[Couchbase >= 7] The percentage of the initial build progress for the index. When the initial build is completed, the value is 100. For an index partition, the value is listed as 0",0,couchbase,, -couchbase.index.items_count,count,,item,,[Couchbase >= 7] The number of items currently indexed,0,couchbase,, -couchbase.index.last_known_scan_time,gauge,,nanosecond,,"[Couchbase >= 7] Timestamp of the last scan request received for this index (Unix timestamp in nanoseconds). This may be useful for determining whether this index is currently unused. Note: This statistic is persisted to disk every 15 minutes, so it is preserved when the indexer restarts",0,couchbase,, -couchbase.index.memory_used,gauge,,byte,,[Couchbase >= 7] The amount of memory used by the Index,0,couchbase,, -couchbase.index.num_docs_indexed,count,,document,,[Couchbase >= 7] The number of documents indexed by the indexer since last startup,0,couchbase,, -couchbase.index.num_docs_pending,gauge,,document,,[Couchbase >= 7] The number of documents pending to be indexed,0,couchbase,, -couchbase.index.num_docs_queued,gauge,,document,,[Couchbase >= 7] The number of documents queued to be indexed,0,couchbase,, -couchbase.index.num_items_flushed,count,,item,,[Couchbase >= 7] The number of items flushed from memory to disk storage,0,couchbase,, -couchbase.index.num_pending_requests,gauge,,request,,[Couchbase >= 7] The number of requests received but not yet served by the indexer,0,couchbase,, -couchbase.index.num_requests,count,,request,,[Couchbase >= 7] The number of requests served by the indexer since last startup,0,couchbase,, -couchbase.index.num_rows_returned,count,,row,,[Couchbase >= 7] The total number of rows returned so far by the indexer,0,couchbase,, -couchbase.index.num_scan_errors,count,,request,,[Couchbase >= 7] The number of requests that failed due to errors other than timeout,0,couchbase,, -couchbase.index.num_scan_timeouts,count,,request,,"[Couchbase >= 7] The number of requests that timed out, either waiting for snapshots or during scan in progress",0,couchbase,, -couchbase.index.recs_in_mem,gauge,,record,,"[Couchbase >= 7] For standard index storage, this is the number of records in this index that are stored in memory. For memory-optimized index storage, this is the same as items_count",0,couchbase,, -couchbase.index.recs_on_disk,gauge,,record,,"[Couchbase >= 7] For standard index storage, this is the number of records in this index that are stored on disk. For memory-optimized index storage, this is 0",0,couchbase,, -couchbase.index.resident_percent,gauge,,percent,,[Couchbase >= 7] The percentage of data held in memory,0,couchbase,, -couchbase.index.scan_bytes_read,count,,byte,,[Couchbase >= 7] The number of bytes read by a scan since last startup,0,couchbase,, -couchbase.index.total_scan_duration,gauge,,nanosecond,,[Couchbase >= 7] The total time spent by the indexer in scanning rows since last startup,0,couchbase,, -couchbase.indexer.indexer_state,gauge,,,,"[Couchbase >= 7] The current state of the Index service on this node (0 = Active, 1 = Pause, 2 = Warmup)",0,couchbase,, -couchbase.indexer.memory_quota,gauge,,byte,,[Couchbase >= 7] The memory quota assigned to the Index service on this node by user configuration,0,couchbase,, -couchbase.indexer.memory_total_storage,gauge,,byte,,[Couchbase >= 7] The total size allocated in the indexer across all indexes. This also accounts for memory fragmentation,0,couchbase,, -couchbase.indexer.memory_used,gauge,,byte,,[Couchbase >= 7] The amount of memory used by the Index service on this node,0,couchbase,, -couchbase.indexer.total_indexer_gc_pause_ns,gauge,,nanosecond,,[Couchbase >= 7] The total time the indexer has spent in GC pause since the last startup,0,couchbase,, -couchbase.query.cores,gauge,,core,,,0,couchbase,cores, -couchbase.query.cpu_sys_percent,gauge,,percent,,,0,couchbase,cpu sys, -couchbase.query.cpu_user_percent,gauge,,percent,,,0,couchbase,cpu user, -couchbase.query.gc_num,gauge,,,,,0,couchbase,gc num, -couchbase.query.gc_pause_percent,gauge,,percent,,,0,couchbase,gc pause percent, -couchbase.query.gc_pause_time,gauge,,second,,,0,couchbase,gc pause time, -couchbase.query.memory_system,gauge,,byte,,,0,couchbase,mem sys, -couchbase.query.memory_total,gauge,,byte,,,0,couchbase,mem total, -couchbase.query.memory_usage,gauge,,byte,,,0,couchbase,mem usage, -couchbase.query.request_active_count,gauge,,request,,,0,couchbase,request active, -couchbase.query.request_completed_count,gauge,,request,,,0,couchbase,request completed, -couchbase.query.request_per_sec_15min,gauge,,request,,,0,couchbase,request per sec 15min, -couchbase.query.request_per_sec_1min,gauge,,request,,,0,couchbase,request per sec 1min, -couchbase.query.request_per_sec_5min,gauge,,request,,,0,couchbase,request per sec 5min, -couchbase.query.request_prepared_percent,gauge,,request,,,0,couchbase,request prepared percent, -couchbase.query.request_time_80percentile,gauge,,second,,,0,couchbase,request time 80p, -couchbase.query.request_time_95percentile,gauge,,second,,,0,couchbase,request time 95p, -couchbase.query.request_time_99percentile,gauge,,second,,,0,couchbase,request time 99p, -couchbase.query.request_time_mean,gauge,,second,,,0,couchbase,request time mean, -couchbase.query.request_time_median,gauge,,second,,,0,couchbase,request time median, -couchbase.query.total_threads,gauge,,thread,,,0,couchbase,total threads, -couchbase.ram.quota_total,gauge,,byte,,RAM quota,0,couchbase,ram quota, -couchbase.ram.quota_total_per_node,gauge,,byte,,RAM quota,0,couchbase,per_node ram quota, -couchbase.ram.quota_used,gauge,,byte,,Used RAM quota,0,couchbase,used ram quota, -couchbase.ram.quota_used_per_node,gauge,,byte,,Used RAM quota,0,couchbase,per_node used ram quota, -couchbase.ram.total,gauge,,byte,,Total RAM,-1,couchbase,ram total, -couchbase.ram.used,gauge,,byte,,RAM in use,1,couchbase,ram used, -couchbase.ram.used_by_data,gauge,,byte,,RAM used for data,0,couchbase,ram data used, -couchbase.sync_gateway.admin_net_bytes_recv,count,,byte,,The total number of bytes received (since node start-up) on the network interface to which the Sync Gateway admin interface is bound.,0,couchbase,, -couchbase.sync_gateway.admin_net_bytes_sent,count,,byte,,The total number of bytes sent (since node start-up) on the network interface to which the Sync Gateway admin interface is bound.,0,couchbase,, -couchbase.sync_gateway.cache.abandoned_seqs,count,,,,The total number of skipped sequences that were not found after 60 minutes and were abandoned.,0,couchbase,, -couchbase.sync_gateway.cache.chan_cache_active_revs,count,,,,The total number of active revisions in the channel cache.,0,couchbase,, -couchbase.sync_gateway.cache.chan_cache_bypass_count,count,,,,The total number of transient bypass channel caches created to serve requests when the channel cache was at capacity.,0,couchbase,, -couchbase.sync_gateway.cache.chan_cache_channels_added,count,,,,The total number of channel caches added.,0,couchbase,, -couchbase.sync_gateway.cache.chan_cache_channels_evicted_inactive,count,,,,The total number of channel cache channels evicted due to inactivity.,0,couchbase,, -couchbase.sync_gateway.cache.chan_cache_channels_evicted_nru,count,,,,"The total number of active channel cache channels evicted, based on 'not recently used' criteria.",0,couchbase,, -couchbase.sync_gateway.cache.chan_cache_compact_count,count,,,,The total number of channel cache compaction runs.,0,couchbase,, -couchbase.sync_gateway.cache.chan_cache_compact_time,count,,,,The total amount of time taken by channel cache compaction across all compaction runs.,0,couchbase,, -couchbase.sync_gateway.cache.chan_cache_hits,count,,hit,,The total number of channel cache requests fully served by the cache.,0,couchbase,, -couchbase.sync_gateway.cache.chan_cache_max_entries,count,,entry,,The total size of the largest channel cache.,0,couchbase,, -couchbase.sync_gateway.cache.chan_cache_misses,count,,miss,,The total number of channel cache requests not fully served by the cache.,0,couchbase,, -couchbase.sync_gateway.cache.chan_cache_num_channels,count,,,,The total number of channels being cached.,0,couchbase,, -couchbase.sync_gateway.cache.chan_cache_pending_queries,count,,,,The total number of channel cache pending queries.,0,couchbase,, -couchbase.sync_gateway.cache.chan_cache_removal_revs,count,,,,The total number of removal revisions in the channel cache.,0,couchbase,, -couchbase.sync_gateway.cache.chan_cache_tombstone_revs,count,,,,The total number of tombstone revisions in the channel cache.,0,couchbase,, -couchbase.sync_gateway.cache.high_seq_cached,gauge,,,,The highest sequence number cached.,0,couchbase,, -couchbase.sync_gateway.cache.high_seq_stable,gauge,,,,The highest contiguous sequence number that has been cached.,0,couchbase,, -couchbase.sync_gateway.cache.num_active_channels,count,,,,The total number of active channels.,0,couchbase,, -couchbase.sync_gateway.cache.num_skipped_seqs,count,,,,The total number of skipped sequences.,0,couchbase,, -couchbase.sync_gateway.cache.pending_seq_len,count,,,,The total number of pending sequences. These are out-of-sequence entries waiting to be cached.,0,couchbase,, -couchbase.sync_gateway.cache.rev_cache_bypass,count,,,,The total number of revision cache bypass operations performed.,0,couchbase,, -couchbase.sync_gateway.cache.rev_cache_hits,count,,hit,,The total number of revision cache hits.,0,couchbase,, -couchbase.sync_gateway.cache.rev_cache_misses,count,,miss,,The total number of revision cache misses.,0,couchbase,, -couchbase.sync_gateway.cache.skipped_seq_len,gauge,,,,The current length of the pending skipped sequence queue.,0,couchbase,, -couchbase.sync_gateway.cbl_replication_pull.attachment_pull_bytes,count,,,,The total size of attachments pulled. This is the pre-compressed size.,0,couchbase,, -couchbase.sync_gateway.cbl_replication_pull.attachment_pull_count,count,,,,The total number of attachments pulled.,0,couchbase,, -couchbase.sync_gateway.cbl_replication_pull.max_pending,gauge,,document,,"The high watermark for the number of documents buffered during feed processing, waiting on a missing earlier sequence.",0,couchbase,, -couchbase.sync_gateway.cbl_replication_pull.num_pull_repl_active_continuous,count,,,,The total number of continuous pull replications in the active state.,0,couchbase,, -couchbase.sync_gateway.cbl_replication_pull.num_pull_repl_active_one_shot,count,,,,The total number of one-shot pull replications in the active state.,0,couchbase,, -couchbase.sync_gateway.cbl_replication_pull.num_pull_repl_caught_up,count,,,,The number of replications which have caught up to the latest changes.,0,couchbase,, -couchbase.sync_gateway.cbl_replication_pull.num_pull_repl_since_zero,count,,,,The total number of new replications started (/_changes?since=0).,0,couchbase,, -couchbase.sync_gateway.cbl_replication_pull.num_pull_repl_total_caught_up,gauge,,,,The total number of replications which have caught up to the latest changes.,0,couchbase,, -couchbase.sync_gateway.cbl_replication_pull.num_pull_repl_total_continuous,count,,,,The total number of continuous pull replications.,0,couchbase,, -couchbase.sync_gateway.cbl_replication_pull.num_pull_repl_total_one_shot,count,,,,The total number of one-shot pull replications.,0,couchbase,, -couchbase.sync_gateway.cbl_replication_pull.num_replications_active,count,,,,The total number of active replications.,0,couchbase,, -couchbase.sync_gateway.cbl_replication_pull.request_changes_count,count,,,,The total number of changes requested.,0,couchbase,, -couchbase.sync_gateway.cbl_replication_pull.request_changes_time,count,,,,This metric can be used to calculate the latency of requested changes:,0,couchbase,, -couchbase.sync_gateway.cbl_replication_pull.rev_processing_time,count,,,,The total amount of time processing rev messages (revisions) during pull revision.,0,couchbase,, -couchbase.sync_gateway.cbl_replication_pull.rev_send_count,count,,,,The total number of rev messages processed during replication.,0,couchbase,, -couchbase.sync_gateway.cbl_replication_pull.rev_send_latency,count,,,,The total amount of time between Sync Gateway receiving a request for a revision and that revision being sent.,0,couchbase,, -couchbase.sync_gateway.cbl_replication_push.attachment_push_bytes,count,,byte,,The total number of attachment bytes pushed.,0,couchbase,, -couchbase.sync_gateway.cbl_replication_push.attachment_push_count,count,,,,The total number of attachments pushed.,0,couchbase,, -couchbase.sync_gateway.cbl_replication_push.doc_push_count,count,,document,,The total number of documents pushed.,0,couchbase,, -couchbase.sync_gateway.cbl_replication_push.propose_change_count,count,,message,,The total number of changes and-or proposeChanges messages processed since node start-up.,0,couchbase,, -couchbase.sync_gateway.cbl_replication_push.propose_change_time,count,,,,The total time spent processing changes and/or proposeChanges messages.,0,couchbase,, -couchbase.sync_gateway.cbl_replication_push.sync_function_count,count,,,,The total number of times that the sync_function is evaluated.,0,couchbase,, -couchbase.sync_gateway.cbl_replication_push.sync_function_time,count,,,,The total time spent evaluating the sync_function.,0,couchbase,, -couchbase.sync_gateway.cbl_replication_push.write_processing_time,count,,,,Total time spent processing writes.,0,couchbase,, -couchbase.sync_gateway.database.abandoned_seqs,count,,,,The total number of skipped sequences abandoned.,0,couchbase,, -couchbase.sync_gateway.database.cache_feed.dcp_backfill_completed,count,,,,The total number of backfill items processed.,0,couchbase,, -couchbase.sync_gateway.database.cache_feed.dcp_backfill_expected,count,,,,The total expected number of sequences in backfill.,0,couchbase,, -couchbase.sync_gateway.database.cache_feed.dcp_rollback_count,count,,,,The total number of rollbacks that occur.,0,couchbase,, -couchbase.sync_gateway.database.conflict_write_count,count,,,,"The total number of writes that left the document in a conflicted state. Includes new conflicts, and mutations that don't resolve existing conflicts.",0,couchbase,, -couchbase.sync_gateway.database.crc32c_match_count,count,,,,"The total number of instances during import when the document cas had changed, but the document was not imported because the document body had not changed.",0,couchbase,, -couchbase.sync_gateway.database.dcp_caching_count,count,,,,The total number of DCP mutations added to Sync Gateway's channel cache.,0,couchbase,, -couchbase.sync_gateway.database.dcp_caching_time,count,,,,The total time between a DCP mutation arriving at Sync Gateway and being added to channel cache.,0,couchbase,, -couchbase.sync_gateway.database.dcp_received_count,count,,,,The total number of document mutations received by Sync Gateway over DCP.,0,couchbase,, -couchbase.sync_gateway.database.dcp_received_time,gauge,,,,The time between a document write and that document being received by Sync Gateway over DCP.,0,couchbase,, -couchbase.sync_gateway.database.doc_reads_bytes_blip,count,,,,The total number of bytes read via Couchbase Lite 2.x replication since Sync Gateway node startup.,0,couchbase,, -couchbase.sync_gateway.database.doc_writes_bytes,count,,,,The total number of bytes written as part of document writes since Sync Gateway node startup.,0,couchbase,, -couchbase.sync_gateway.database.doc_writes_bytes_blip,count,,,,The total number of bytes written as part ofCouchbase Lite 2.x document writes since Sync Gateway node startup.,0,couchbase,, -couchbase.sync_gateway.database.doc_writes_xattr_bytes,count,,byte,,The total size of xattrs written (in bytes).,0,couchbase,, -couchbase.sync_gateway.database.high_seq_feed,gauge,,,,Highest sequence number seen on the caching DCP feed.,0,couchbase,, -couchbase.sync_gateway.database.import_feed.dcp_backfill_completed,count,,,,The total number of backfill items processed.,0,couchbase,, -couchbase.sync_gateway.database.import_feed.dcp_backfill_expected,count,,,,The total expected number of sequences in backfill.,0,couchbase,, -couchbase.sync_gateway.database.import_feed.dcp_rollback_count,count,,,,The total number of rollbacks that occur.,0,couchbase,, -couchbase.sync_gateway.database.num_doc_reads_blip,count,,document,,The total number of documents read via Couchbase Lite 2.x replication since Sync Gateway node startup.,0,couchbase,, -couchbase.sync_gateway.database.num_doc_reads_rest,count,,document,,The total number of documents read via the REST API since Sync Gateway node startup. Includes Couchbase Lite 1.x replication.,0,couchbase,, -couchbase.sync_gateway.database.num_doc_writes,count,,document,,"The total number of documents written by any means (replication, rest API interaction or imports) since Sync Gateway node startup.",0,couchbase,, -couchbase.sync_gateway.database.num_replications_active,count,,,,The total number of active replications.,0,couchbase,, -couchbase.sync_gateway.database.num_replications_total,count,,,,The total number of replications created since Sync Gateway node startup.,0,couchbase,, -couchbase.sync_gateway.database.num_tombstones_compacted,gauge,,,,The number of tombstones compacted.,0,couchbase,, -couchbase.sync_gateway.database.sequence_assigned_count,gauge,,,,The total number of sequence numbers assigned.,0,couchbase,, -couchbase.sync_gateway.database.sequence_get_count,gauge,,,,The total number of high sequence lookups.,0,couchbase,, -couchbase.sync_gateway.database.sequence_incr_count,count,,,,The total number of times the sequence counter document has been incremented.,0,couchbase,, -couchbase.sync_gateway.database.sequence_released_count,count,,,,"The total number of unused, reserved sequences released by Sync Gateway.",0,couchbase,, -couchbase.sync_gateway.database.sequence_reserved_count,count,,,,The total number of sequences reserved by Sync Gateway.,0,couchbase,, -couchbase.sync_gateway.database.warn_channels_per_doc_count,count,,,,The total number of warnings relating to the channel count exceeding the channel count threshold.,0,couchbase,, -couchbase.sync_gateway.database.warn_grants_per_doc_count,count,,,,The total number of warnings relating to the grant count exceeding the grant count threshold.,0,couchbase,, -couchbase.sync_gateway.database.warn_xattr_size_count,count,,,,The total number of warnings relating to the xattr sync data being larger than a configured threshold.,0,couchbase,, -couchbase.sync_gateway.error_count,count,,error,,The total number of errors logged.,0,couchbase,, -couchbase.sync_gateway.go_memstats_heapalloc,gauge,,byte,,The bytes of allocated heap objects.,0,couchbase,, -couchbase.sync_gateway.go_memstats_heapidle,gauge,,byte,,The bytes in idle (unused) spans.,0,couchbase,, -couchbase.sync_gateway.go_memstats_heapinuse,gauge,,byte,,The bytes in in-use spans.,0,couchbase,, -couchbase.sync_gateway.go_memstats_heapreleased,gauge,,byte,,The bytes of physical memory returned to the OS.,0,couchbase,, -couchbase.sync_gateway.go_memstats_pausetotalns,gauge,,nanosecond,,The circular buffer of recent GC stop-the-world pause times.,0,couchbase,, -couchbase.sync_gateway.go_memstats_stackinuse,gauge,,byte,,The bytes in stack spans.,0,couchbase,, -couchbase.sync_gateway.go_memstats_stacksys,gauge,,byte,,The bytes of stack memory obtained from the OS.,0,couchbase,, -couchbase.sync_gateway.go_memstats_sys,gauge,,byte,,The bytes of memory obtained from the OS for mspan structures.,0,couchbase,, -couchbase.sync_gateway.goroutines_high_watermark,gauge,,,,Peak number of go routines since process start.,0,couchbase,, -couchbase.sync_gateway.num_goroutines,count,,,,The total number of goroutines.,0,couchbase,, -couchbase.sync_gateway.process_cpu_percent_utilization,gauge,,percent,,The CPU's utilization as percentage value.,0,couchbase,, -couchbase.sync_gateway.process_memory_resident,gauge,,byte,,The memory utilization (Resident Set Size) for the process.,0,couchbase,, -couchbase.sync_gateway.pub_net_bytes_recv,count,,byte,,The memory utilization (Resident Set Size) for the process.,0,couchbase,, -couchbase.sync_gateway.pub_net_bytes_sent,count,,byte,,The total number of bytes sent (since node start-up) on the network interface to which Sync Gateway public interface is bound.,0,couchbase,, -couchbase.sync_gateway.security.auth_failed_count,count,,,,The total number of unsuccessful authentications.,0,couchbase,, -couchbase.sync_gateway.security.auth_success_count,count,,success,,The total number of successful authentications.,0,couchbase,, -couchbase.sync_gateway.security.num_access_errors,count,,document,,"The total number of documents rejected by write access functions (requireAccess, requireRole, requireUser).",0,couchbase,, -couchbase.sync_gateway.security.num_docs_rejected,count,,document,,The total number of documents rejected by the sync_function.,0,couchbase,, -couchbase.sync_gateway.security.total_auth_time,count,,,,The total time spent in authenticating all requests.,0,couchbase,, -couchbase.sync_gateway.shared_bucket_import.import_cancel_cas,count,,,,The total number of imports cancelled due to cas failure.,0,couchbase,, -couchbase.sync_gateway.shared_bucket_import.import_count,count,,document,,The total number of docs imported.,0,couchbase,, -couchbase.sync_gateway.shared_bucket_import.import_error_count,count,,error,,The total number of errors arising as a result of a document import.,0,couchbase,, -couchbase.sync_gateway.shared_bucket_import.import_high_seq,gauge,,,,The highest sequence number value imported.,0,couchbase,, -couchbase.sync_gateway.shared_bucket_import.import_partitions,count,,,,The total number of import partitions.,0,couchbase,, -couchbase.sync_gateway.shared_bucket_import.import_processing_time,count,,,,The total time taken to process a document import.,0,couchbase,, -couchbase.sync_gateway.system_memory_total,count,,byte,,The total memory available on the system in bytes.,0,couchbase,, -couchbase.sync_gateway.warn_count,count,,byte,,The total number of warnings logged.,0,couchbase,, +metric_name,metric_type,interval,unit_name,per_unit_name,description,orientation,integration,short_name,curated_metric,sample_tags +couchbase.by_bucket.avg_bg_wait_time,gauge,,microsecond,,Average background wait time,-1,couchbase,avg bg wait,, +couchbase.by_bucket.avg_disk_commit_time,gauge,,second,,Average disk commit time,-1,couchbase,avg commit time,, +couchbase.by_bucket.avg_disk_update_time,gauge,,microsecond,,Average disk update time ,-1,couchbase,avg update time,, +couchbase.by_bucket.bg_wait_total,gauge,,byte,,Bytes read,0,couchbase,read,, +couchbase.by_bucket.bytes_read,gauge,,byte,,Bytes read,0,couchbase,read,, +couchbase.by_bucket.bytes_written,gauge,,byte,,Bytes written,0,couchbase,written,, +couchbase.by_bucket.cas_badval,gauge,,,,Compare and Swap bad values,-1,couchbase,cas badval,, +couchbase.by_bucket.cas_hits,gauge,,hit,,Compare and Swap hits,1,couchbase,cas hits,, +couchbase.by_bucket.cas_misses,gauge,,miss,,Compare and Swap misses,-1,couchbase,cas misses,, +couchbase.by_bucket.cmd_get,gauge,,get,,Get operations performed on the bucket,0,couchbase,bucket gets,, +couchbase.by_bucket.cmd_lookup,gauge,,get,,Lookup operations performed on the bucket,0,couchbase,bucket lookups,, +couchbase.by_bucket.cmd_set,gauge,,set,,Set operations performed on the bucket,0,couchbase,bucket sets,, +couchbase.by_bucket.couch_docs_actual_disk_size,gauge,,byte,,Couch docs total size on disk in bytes,0,couchbase,doc actual disk size,, +couchbase.by_bucket.couch_docs_data_size,gauge,,byte,,Couch docs data size in bytes,0,couchbase,doc data disk size,, +couchbase.by_bucket.couch_docs_disk_size,gauge,,byte,,Couch docs total size in bytes,0,couchbase,doc disk size,, +couchbase.by_bucket.couch_docs_fragmentation,gauge,,percent,,Couch docs fragmentation,-1,couchbase,doc fragmentation,, +couchbase.by_bucket.couch_spatial_data_size,gauge,,byte,,Size of object data for spatial views,0,couchbase,spatial data size,, +couchbase.by_bucket.couch_spatial_disk_size,gauge,,byte,,Amount of disk space occupied by spatial views,0,couchbase,spatial disk size,, +couchbase.by_bucket.couch_spatial_ops,gauge,,operation,,Spatial operations,0,couchbase,spatial ops,, +couchbase.by_bucket.couch_total_disk_size,gauge,,byte,,Couch total disk size,0,couchbase,total disk size,, +couchbase.by_bucket.couch_views_data_size,gauge,,byte,,Size of object data for views,0,couchbase,view data size,, +couchbase.by_bucket.couch_views_disk_size,gauge,,byte,,Amount of disk space occupied by views,0,couchbase,view disk size,, +couchbase.by_bucket.couch_views_fragmentation,gauge,,percent,,View fragmentation,-1,couchbase,view fragmentation,, +couchbase.by_bucket.couch_views_ops,gauge,,operation,,View operations,0,couchbase,view ops,, +couchbase.by_bucket.cpu_idle_ms,gauge,,millisecond,,CPU idle milliseconds,0,couchbase,cpu idle ms,, +couchbase.by_bucket.cpu_utilization_rate,gauge,,percent,,CPU utilization percentage,0,couchbase,cpu util,, +couchbase.by_bucket.curr_connections,gauge,,connection,,The current number of bucket connections,0,couchbase,conns,, +couchbase.by_bucket.curr_items,gauge,,item,,Number of active items in memory,0,couchbase,mem items,, +couchbase.by_bucket.curr_items_tot,gauge,,item,,Total number of items,0,couchbase,total items,, +couchbase.by_bucket.decr_hits,gauge,,hit,,Decrement hits,1,couchbase,decr hits,, +couchbase.by_bucket.decr_misses,gauge,,miss,,Decrement misses,-1,couchbase,decr misses,, +couchbase.by_bucket.delete_hits,gauge,,hit,,Delete hits,1,couchbase,del hits,, +couchbase.by_bucket.delete_misses,gauge,,miss,,Delete misses,-1,couchbase,del misses,, +couchbase.by_bucket.disk_commit_count,gauge,,operation,,Disk commits,0,couchbase,commits,, +couchbase.by_bucket.disk_update_count,gauge,,operation,,Disk updates,0,couchbase,updates,, +couchbase.by_bucket.disk_write_queue,gauge,,operation,,Disk write queue depth,-1,couchbase,writes,, +couchbase.by_bucket.ep_bg_fetched,gauge,,fetch,second,Disk reads per second,0,couchbase,reads,, +couchbase.by_bucket.ep_cache_miss_rate,gauge,,miss,,Cache miss rate,-1,couchbase,miss rate,, +couchbase.by_bucket.ep_cache_miss_ratio,gauge,,percent,,Cache miss ratio,-1,couchbase,miss ratio,, +couchbase.by_bucket.ep_dcp_2i_backoff,gauge,,,,Number of backoffs for indexes DCP connections,-1,couchbase,dcp indexes backoff,, +couchbase.by_bucket.ep_dcp_2i_count,gauge,,connection,,Number of indexes DCP connections,0,couchbase,dcp indexes count,, +couchbase.by_bucket.ep_dcp_2i_items_remaining,gauge,,item,,Number of indexes items remaining to be sent,0,couchbase,dcp indexes items remaining,, +couchbase.by_bucket.ep_dcp_2i_items_sent,gauge,,item,,Number of indexes items sent,0,couchbase,dcp indexes items sent,, +couchbase.by_bucket.ep_dcp_2i_producer_count,gauge,,,,Number of indexes producers,0,couchbase,dcp indexes producer,, +couchbase.by_bucket.ep_dcp_2i_total_bytes,gauge,,byte,second,Number bytes per second being sent for indexes DCP connections,0,couchbase,dcp indexes total bytes,, +couchbase.by_bucket.ep_dcp_fts_backoff,gauge,,,,Number of backoffs for fts DCP connections,-1,couchbase,dcp fts backoff,, +couchbase.by_bucket.ep_dcp_fts_count,gauge,,connection,,Number of fts DCP connections,0,couchbase,dcp fts count,, +couchbase.by_bucket.ep_dcp_fts_items_remaining,gauge,,item,,Number of fts items remaining to be sent,0,couchbase,dcp fts items remaining,, +couchbase.by_bucket.ep_dcp_fts_items_sent,gauge,,item,,Number of fts items sent,0,couchbase,dcp fts items sent,, +couchbase.by_bucket.ep_dcp_fts_producer_count,gauge,,,,Number of fts producers,0,couchbase,dcp fts producer,, +couchbase.by_bucket.ep_dcp_fts_total_bytes,gauge,,byte,second,Number bytes per second being sent for fts DCP connections,0,couchbase,dcp fts total bytes,, +couchbase.by_bucket.ep_dcp_other_backoff,gauge,,,,Number of backoffs for other DCP connections,-1,couchbase,dcp other backoff,, +couchbase.by_bucket.ep_dcp_other_count,gauge,,connection,,Number of other DCP connections,0,couchbase,dcp other count,, +couchbase.by_bucket.ep_dcp_other_items_remaining,gauge,,item,,Number of other items remaining to be sent,0,couchbase,dcp other items remaining,, +couchbase.by_bucket.ep_dcp_other_items_sent,gauge,,item,,Number of other items sent,0,couchbase,dcp other items sent,, +couchbase.by_bucket.ep_dcp_other_producer_count,gauge,,,,Number of other producers,0,couchbase,dcp other producer,, +couchbase.by_bucket.ep_dcp_other_total_bytes,gauge,,byte,second,Number bytes per second being sent for other DCP connections,0,couchbase,dcp other total bytes,, +couchbase.by_bucket.ep_dcp_replica_backoff,gauge,,,,Number of backoffs for replica DCP connections,-1,couchbase,dcp replica backoff,, +couchbase.by_bucket.ep_dcp_replica_count,gauge,,connection,,Number of replica DCP connections,0,couchbase,dcp replica count,, +couchbase.by_bucket.ep_dcp_replica_items_remaining,gauge,,item,,Number of replica items remaining to be sent,0,couchbase,dcp replica items remaining,, +couchbase.by_bucket.ep_dcp_replica_items_sent,gauge,,item,,Number of replica items sent,0,couchbase,dcp replica items sent,, +couchbase.by_bucket.ep_dcp_replica_producer_count,gauge,,,,Number of replica producers,0,couchbase,dcp replica producer,, +couchbase.by_bucket.ep_dcp_replica_total_bytes,gauge,,byte,second,Number bytes per second being sent for replica DCP connections,0,couchbase,dcp replica total bytes,, +couchbase.by_bucket.ep_dcp_views_backoff,gauge,,,,Number of backoffs for views DCP connections,-1,couchbase,dcp views backoff,, +couchbase.by_bucket.ep_dcp_views_count,gauge,,connection,,Number of views DCP connections,0,couchbase,dcp views count,, +couchbase.by_bucket.ep_dcp_views_items_remaining,gauge,,item,,Number of views items remaining to be sent,0,couchbase,dcp views items remaining,, +couchbase.by_bucket.ep_dcp_views_items_sent,gauge,,item,,Number of views items sent,0,couchbase,dcp views items sent,, +couchbase.by_bucket.ep_dcp_views_producer_count,gauge,,,,Number of views producers,0,couchbase,dcp views producer,, +couchbase.by_bucket.ep_dcp_views_total_bytes,gauge,,byte,second,Number bytes per second being sent for views DCP connections,0,couchbase,dcp views total bytes,, +couchbase.by_bucket.ep_dcp_xdcr_backoff,gauge,,,,Number of backoffs for xdcr DCP connections,-1,couchbase,dcp xdcr backoff,, +couchbase.by_bucket.ep_dcp_xdcr_count,gauge,,connection,,Number of xdcr DCP connections,0,couchbase,dcp xdcr count,, +couchbase.by_bucket.ep_dcp_xdcr_items_remaining,gauge,,item,,Number of xdcr items remaining to be sent,0,couchbase,dcp xdcr items remaining,, +couchbase.by_bucket.ep_dcp_xdcr_items_sent,gauge,,item,,Number of xdcr items sent,0,couchbase,dcp xdcr items sent,, +couchbase.by_bucket.ep_dcp_xdcr_producer_count,gauge,,,,Number of xdcr producers,0,couchbase,dcp xdcr producer,, +couchbase.by_bucket.ep_dcp_xdcr_total_bytes,gauge,,byte,second,Number bytes per second being sent for xdcr DCP connections,0,couchbase,dcp xdcr total bytes,, +couchbase.by_bucket.ep_diskqueue_drain,gauge,,item,,Total Drained items on disk queue,0,couchbase,queue drained,, +couchbase.by_bucket.ep_diskqueue_fill,gauge,,item,,Total enqueued items on disk queue,0,couchbase,queued,, +couchbase.by_bucket.ep_diskqueue_items,gauge,,item,,Total number of items waiting to be written to disk,0,couchbase,queue waiting items,, +couchbase.by_bucket.ep_flusher_todo,gauge,,item,,Number of items currently being written,0,couchbase,current flushing items,, +couchbase.by_bucket.ep_item_commit_failed,gauge,,error,,Number of times a transaction failed to commit due to storage errors,1,couchbase,failed commits,, +couchbase.by_bucket.ep_kv_size,gauge,,byte,,Total amount of user data cached in RAM in this bucket,0,couchbase,kv size,, +couchbase.by_bucket.ep_max_size,gauge,,byte,,The maximum amount of memory this bucket can use,0,couchbase,max size,, +couchbase.by_bucket.ep_mem_high_wat,gauge,,byte,,Mem usage high water mark for auto-evictions,0,couchbase,mem high water mark,, +couchbase.by_bucket.ep_mem_low_wat,gauge,,byte,,Mem usage low water mark for auto-evictions,0,couchbase,mem low water mark,, +couchbase.by_bucket.ep_meta_data_memory,gauge,,byte,,Total amount of item metadata consuming RAM in this bucket,0,couchbase,metadata mem,, +couchbase.by_bucket.ep_num_non_resident,gauge,,item,,Number of non-resident items,0,couchbase,non-resident items,, +couchbase.by_bucket.ep_num_ops_del_meta,gauge,,operation,second,Number of delete operations per second for this bucket as the target for XDCR,0,couchbase,ops del meta,, +couchbase.by_bucket.ep_num_ops_del_ret_meta,gauge,,operation,second,Number of delRetMeta operations per second for this bucket as the target for XDCR,0,couchbase,ops del meta,, +couchbase.by_bucket.ep_num_ops_get_meta,gauge,,operation,second,Number of read operations per second for this bucket as the target for XDCR,0,couchbase,ops get meta,, +couchbase.by_bucket.ep_num_ops_set_meta,gauge,,operation,second,Number of set operations per second for this bucket as the target for XDCR,0,couchbase,ops set meta,, +couchbase.by_bucket.ep_num_ops_set_ret_meta,gauge,,operation,second,Number of setRetMeta operations per second for this bucket as the target for XDCR,0,couchbase,ops set rep meta,, +couchbase.by_bucket.ep_num_value_ejects,gauge,,item,,Number of times item values got ejected from memory to disk,0,couchbase,ejects,, +couchbase.by_bucket.ep_oom_errors,gauge,,error,,Number of times unrecoverable OOMs happened while processing operations,-1,couchbase,ooms,, +couchbase.by_bucket.ep_ops_create,gauge,,operation,,Create operations,0,couchbase,create ops,, +couchbase.by_bucket.ep_ops_update,gauge,,operation,,Update operations,0,couchbase,update ops,, +couchbase.by_bucket.ep_overhead,gauge,,byte,,Extra memory used by transient data like persistence queues or checkpoints,0,couchbase,overhead,, +couchbase.by_bucket.ep_queue_size,gauge,,item,,Number of items queued for storage,0,couchbase,queue size,, +couchbase.by_bucket.ep_resident_items_rate,gauge,,item,,Number of resident items,0,couchbase,resident items,, +couchbase.by_bucket.ep_tap_replica_queue_drain,gauge,,item,,Total drained items in the replica queue,0,couchbase,drain items,, +couchbase.by_bucket.ep_tap_total_queue_drain,gauge,,item,,Total drained items in the queue,0,couchbase,drain items,, +couchbase.by_bucket.ep_tap_total_queue_fill,gauge,,item,,Total enqueued items in the queue,0,couchbase,queued,, +couchbase.by_bucket.ep_tap_total_total_backlog_size,gauge,,item,,Number of remaining items for replication,-1,couchbase,backlog size,, +couchbase.by_bucket.ep_tmp_oom_errors,gauge,,error,,Number of times recoverable OOMs happened while processing operations,-1,couchbase,ooms,, +couchbase.by_bucket.ep_vb_total,gauge,,item,,Total number of vBuckets for this bucket,-1,couchbase,vb total,, +couchbase.by_bucket.evictions,gauge,,eviction,,Number of evictions,-1,couchbase,evictions,, +couchbase.by_bucket.get_hits,gauge,,hit,,Number of get hits,1,couchbase,get hits,, +couchbase.by_bucket.get_misses,gauge,,miss,,Number of get misses,-1,couchbase,get misses,, +couchbase.by_bucket.hibernated_requests,gauge,,request,,Number of streaming requests now idle,0,couchbase,hibernated requests,, +couchbase.by_bucket.hibernated_waked,gauge,,request,,Rate of streaming request wakeups,0,couchbase,hibernated waked,, +couchbase.by_bucket.hit_ratio,gauge,,percent,,Hit ratio,1,couchbase,hit ratio,, +couchbase.by_bucket.incr_hits,gauge,,hit,,Number of increment hits,1,couchbase,increment hits,, +couchbase.by_bucket.incr_misses,gauge,,miss,,Number of increment misses,-1,couchbase,increment misses,, +couchbase.by_bucket.mem_actual_free,gauge,,byte,,Free memory,0,couchbase,actual free,, +couchbase.by_bucket.mem_actual_used,gauge,,byte,,Used memory,0,couchbase,actual used,, +couchbase.by_bucket.mem_free,gauge,,byte,,Free memory,0,couchbase,free,, +couchbase.by_bucket.mem_total,gauge,,byte,,Total available memory,0,couchbase,total,, +couchbase.by_bucket.mem_used,gauge,,byte,,Engine's total memory usage (deprecated),0,couchbase,used,, +couchbase.by_bucket.mem_used_sys,gauge,,byte,,System memory usage,0,couchbase,used sys,, +couchbase.by_bucket.misses,gauge,,miss,,Total number of misses,-1,couchbase,misses,, +couchbase.by_bucket.ops,gauge,,operation,,Total number of operations,0,couchbase,ops,, +couchbase.by_bucket.page_faults,gauge,,page,,Number of page faults,-1,couchbase,faults,, +couchbase.by_bucket.replication_docs_rep_queue,gauge,,item,,,0,couchbase,repl docs queue,, +couchbase.by_bucket.replication_meta_latency_aggr,gauge,,second,,,0,couchbase,repl meta latency aggr,, +couchbase.by_bucket.rest_requests,gauge,,request,second,Number of HTTP requests,0,couchbase,rest requests,, +couchbase.by_bucket.swap_total,gauge,,byte,,Total amount of swap available,0,couchbase,swap total,, +couchbase.by_bucket.swap_used,gauge,,byte,,Amount of swap used ,0,couchbase,swap used,, +couchbase.by_bucket.vb_active_eject,gauge,,item,second,Number of items per second being ejected to disk from active vBuckets,0,couchbase,vb active eject,, +couchbase.by_bucket.vb_active_itm_memory,gauge,,item,,Amount of active user data cached in RAM in this bucket,0,couchbase,vb active item mem,, +couchbase.by_bucket.vb_active_meta_data_memory,gauge,,item,,Amount of active item metadata consuming RAM in this bucket,0,couchbase,vb active meta mem,, +couchbase.by_bucket.vb_active_num,gauge,,item,,Number of active items,0,couchbase,vb active num,, +couchbase.by_bucket.vb_active_num_non_resident,gauge,,item,,Number of non resident vBuckets in the active state for this bucket,0,couchbase,vb active num non resident,, +couchbase.by_bucket.vb_active_ops_create,gauge,,item,second,New items per second being inserted into active vBuckets in this bucket,0,couchbase,vb active ops create,, +couchbase.by_bucket.vb_active_ops_update,gauge,,item,second,Number of items updated on active vBucket per second for this bucket,0,couchbase,vb active ops update,, +couchbase.by_bucket.vb_active_queue_age,gauge,,millisecond,,Sum of disk queue item age in milliseconds,0,couchbase,vb active queue age,, +couchbase.by_bucket.vb_active_queue_drain,gauge,,item,,Total drained items in the queue,0,couchbase,vb active queue drain,, +couchbase.by_bucket.vb_active_queue_fill,gauge,,item,second,Number of active items per second being put on the active item disk queue,0,couchbase,vb active queue fill,, +couchbase.by_bucket.vb_active_queue_size,gauge,,item,,Number of active items in the queue,0,couchbase,vb active queue size,, +couchbase.by_bucket.vb_active_resident_items_ratio,gauge,,item,,Number of resident items,0,couchbase,vb active resident items ratio,, +couchbase.by_bucket.vb_avg_active_queue_age,gauge,,second,,Average age in seconds of active items in the active item queue,0,couchbase,vb avg active queue age,, +couchbase.by_bucket.vb_avg_pending_queue_age,gauge,,second,,Average age in seconds of pending items in the pending item queue,0,couchbase,vb avg pending queue age,, +couchbase.by_bucket.vb_avg_replica_queue_age,gauge,,second,,Average age in seconds of replica items in the replica item queue,0,couchbase,vb avg replica queue age,, +couchbase.by_bucket.vb_avg_total_queue_age,gauge,,second,,Average age of items in the queue,0,couchbase,vb avg total queue age,, +couchbase.by_bucket.vb_pending_curr_items,gauge,,item,,Number of items in pending vBuckets,0,couchbase,vb pending curr item,, +couchbase.by_bucket.vb_pending_eject,gauge,,item,second,Number of items per second being ejected to disk from pending vBuckets,0,couchbase,vb pending eject,, +couchbase.by_bucket.vb_pending_itm_memory,gauge,,item,,Amount of pending user data cached in RAM in this bucket,0,couchbase,vb pending item mem,, +couchbase.by_bucket.vb_pending_meta_data_memory,gauge,,item,,Amount of pending item metadata consuming RAM in this bucket,0,couchbase,vb pending meta mem,, +couchbase.by_bucket.vb_pending_num,gauge,,item,,Number of pending items,0,couchbase,vb pending num,, +couchbase.by_bucket.vb_pending_num_non_resident,gauge,,item,,Number of non resident vBuckets in the pending state for this bucket,0,couchbase,vb pending num non resident,, +couchbase.by_bucket.vb_pending_ops_create,gauge,,operation,,Number of pending create operations,0,couchbase,vb pending ops create,, +couchbase.by_bucket.vb_pending_ops_update,gauge,,item,second,Number of items updated on pending vBucket per second for this bucket,0,couchbase,vb pending ops update,, +couchbase.by_bucket.vb_pending_queue_age,gauge,,millisecond,,Sum of disk pending queue item age in milliseconds,0,couchbase,vb pending queue age,, +couchbase.by_bucket.vb_pending_queue_drain,gauge,,item,,Total drained pending items in the queue,0,couchbase,vb pending queue drain,, +couchbase.by_bucket.vb_pending_queue_fill,gauge,,item,,Total enqueued pending items on disk queue,0,couchbase,vb pending queue fill,, +couchbase.by_bucket.vb_pending_queue_size,gauge,,item,,Number of pending items in the queue,0,couchbase,vb pending queue size,, +couchbase.by_bucket.vb_pending_resident_items_ratio,gauge,,item,,Number of resident pending items,0,couchbase,vb pending resident items ratio,, +couchbase.by_bucket.vb_replica_curr_items,gauge,,item,,Number of in memory items,0,couchbase,vb replica curr items,, +couchbase.by_bucket.vb_replica_eject,gauge,,item,second,Number of items per second being ejected to disk from replica vBuckets,0,couchbase,vb replica eject,, +couchbase.by_bucket.vb_replica_itm_memory,gauge,,item,,Amount of replica user data cached in RAM in this bucket,0,couchbase,vb replica item mem,, +couchbase.by_bucket.vb_replica_meta_data_memory,gauge,,byte,,Total metadata memory,0,couchbase,vb replica meta data mem,, +couchbase.by_bucket.vb_replica_num,gauge,,item,,Number of replica vBuckets,0,couchbase,vb replica num,, +couchbase.by_bucket.vb_replica_num_non_resident,gauge,,item,,Number of non resident vBuckets in the replica state for this bucket,0,couchbase,vb replica num non resident,, +couchbase.by_bucket.vb_replica_ops_create,gauge,,operation,,Number of replica create operations,0,couchbase,vb replica ops create,, +couchbase.by_bucket.vb_replica_ops_update,gauge,,item,second,Number of items updated on replica vBucket per second for this bucket,0,couchbase,vb replica ops update,, +couchbase.by_bucket.vb_replica_queue_age,gauge,,millisecond,,Sum of disk replica queue item age in milliseconds,0,couchbase,vb replica queue age,, +couchbase.by_bucket.vb_replica_queue_drain,gauge,,item,,Total drained replica items in the queue,0,couchbase,vb replica queue drain,, +couchbase.by_bucket.vb_replica_queue_fill,gauge,,item,,Total enqueued replica items on disk queue,0,couchbase,vb replica queue fill,, +couchbase.by_bucket.vb_replica_queue_size,gauge,,item,,Replica items in disk queue,0,couchbase,vb replica queue size,, +couchbase.by_bucket.vb_replica_resident_items_ratio,gauge,,item,,Number of resident replica items,0,couchbase,vb replica resident items ratio,, +couchbase.by_bucket.vb_total_queue_age,gauge,,second,,Sum of disk queue item age in milliseconds,0,couchbase,vb total queue age,, +couchbase.by_bucket.xdc_ops,gauge,,operation,,Number of cross-datacenter replication operations,0,couchbase,xdc ops,, +couchbase.by_node.cmd_get,gauge,,get,,Get operations performed on the node,0,couchbase,node gets,, +couchbase.by_node.couch_docs_actual_disk_size,gauge,,byte,,Couch docs total size on disk in bytes,0,couchbase,doc disk size,, +couchbase.by_node.couch_docs_data_size,gauge,,byte,,Couch docs data size in bytes,0,couchbase,doc size,, +couchbase.by_node.couch_spatial_data_size,gauge,,byte,,Size of object data for spatial views,0,couchbase,node spatial data size,, +couchbase.by_node.couch_spatial_disk_size,gauge,,byte,,Amount of disk space occupied by spatial views,0,couchbase,node spatial disk size,, +couchbase.by_node.couch_views_actual_disk_size,gauge,,byte,,Couch views total size on disk in bytes,0,couchbase,views disk size,, +couchbase.by_node.couch_views_data_size,gauge,,byte,,Couch views data size on disk in bytes,0,couchbase,views size,, +couchbase.by_node.curr_items,gauge,,item,,Number of active items in memory,0,couchbase,mem items,, +couchbase.by_node.curr_items_tot,gauge,,item,,Total number of items,0,couchbase,total items,, +couchbase.by_node.ep_bg_fetched,gauge,,fetch,second,Disk reads per second,0,couchbase,node reads,, +couchbase.by_node.get_hits,gauge,,hit,,Number of get hits,1,couchbase,node get hits,, +couchbase.by_node.index_data_size,gauge,,byte,,Index data size,1,couchbase,index data size,, +couchbase.by_node.index_disk_size,gauge,,byte,,Index disk size,1,couchbase,index data size,, +couchbase.by_node.mem_used,gauge,,byte,,Engine's total memory usage (deprecated),0,couchbase,node used,, +couchbase.by_node.ops,gauge,,operation,,Total number of operations,0,couchbase,node ops,, +couchbase.by_node.vb_active_num_non_resident,gauge,,item,,Number of non resident vBuckets in the active state for this bucket,0,couchbase,node vb active num non resident,, +couchbase.by_node.vb_replica_curr_items,gauge,,item,,Number of in memory items,0,couchbase,vb replica curr items,, +couchbase.hdd.free,gauge,,byte,,Free hard disk space,1,couchbase,hdd free,, +couchbase.hdd.quota_total,gauge,,byte,,Hard disk quota,0,couchbase,hdd quota total,, +couchbase.hdd.total,gauge,,byte,,Total hard disk space,0,couchbase,hdd total,, +couchbase.hdd.used,gauge,,byte,,Used hard disk space,-1,couchbase,hdd used,, +couchbase.hdd.used_by_data,gauge,,byte,,Hard disk used for data,0,couchbase,hdd data used,, +couchbase.index.avg_array_length,gauge,,item,,(Array indexes only.) The average number of items indexed per document,0,couchbase,,, +couchbase.index.avg_drain_rate,gauge,,item,second,[Couchbase >= 7] The average number of items flushed from memory to disk storage per second,0,couchbase,,, +couchbase.index.avg_item_size,gauge,,byte,,[Couchbase >= 7] The average size of the keys,0,couchbase,,, +couchbase.index.avg_scan_latency,gauge,,nanosecond,,[Couchbase >= 7] The average time to serve a scan request,0,couchbase,,, +couchbase.index.cache_hit_percent,gauge,,percent,,[Couchbase >= 7] The percentage of memory accesses that were served from the managed cache,0,couchbase,,, +couchbase.index.cache_hits,count,,,,[Couchbase >= 7] The number of accesses to this index data from RAM,0,couchbase,,, +couchbase.index.cache_misses,count,,,,[Couchbase >= 7] The number of accesses to this index data from disk,0,couchbase,,, +couchbase.index.data_size,gauge,,byte,,[Couchbase >= 7] The size of indexable data that is maintained for the index or partition,0,couchbase,,, +couchbase.index.disk_size,gauge,,byte,,[Couchbase >= 7] The total disk file size consumed by the index or partition,0,couchbase,,, +couchbase.index.docid_count,gauge,,item,,(Array indexes only.) The number of documents currently indexed,0,couchbase,,, +couchbase.index.frag_percent,gauge,,percent,,[Couchbase >= 7] The percentage fragmentation of the index,0,couchbase,,, +couchbase.index.initial_build_progress,gauge,,percent,,"[Couchbase >= 7] The percentage of the initial build progress for the index. When the initial build is completed, the value is 100. For an index partition, the value is listed as 0",0,couchbase,,, +couchbase.index.items_count,count,,item,,[Couchbase >= 7] The number of items currently indexed,0,couchbase,,, +couchbase.index.last_known_scan_time,gauge,,nanosecond,,"[Couchbase >= 7] Timestamp of the last scan request received for this index (Unix timestamp in nanoseconds). This may be useful for determining whether this index is currently unused. Note: This statistic is persisted to disk every 15 minutes, so it is preserved when the indexer restarts",0,couchbase,,, +couchbase.index.memory_used,gauge,,byte,,[Couchbase >= 7] The amount of memory used by the Index,0,couchbase,,, +couchbase.index.num_docs_indexed,count,,document,,[Couchbase >= 7] The number of documents indexed by the indexer since last startup,0,couchbase,,, +couchbase.index.num_docs_pending,gauge,,document,,[Couchbase >= 7] The number of documents pending to be indexed,0,couchbase,,, +couchbase.index.num_docs_queued,gauge,,document,,[Couchbase >= 7] The number of documents queued to be indexed,0,couchbase,,, +couchbase.index.num_items_flushed,count,,item,,[Couchbase >= 7] The number of items flushed from memory to disk storage,0,couchbase,,, +couchbase.index.num_pending_requests,gauge,,request,,[Couchbase >= 7] The number of requests received but not yet served by the indexer,0,couchbase,,, +couchbase.index.num_requests,count,,request,,[Couchbase >= 7] The number of requests served by the indexer since last startup,0,couchbase,,, +couchbase.index.num_rows_returned,count,,row,,[Couchbase >= 7] The total number of rows returned so far by the indexer,0,couchbase,,, +couchbase.index.num_scan_errors,count,,request,,[Couchbase >= 7] The number of requests that failed due to errors other than timeout,0,couchbase,,, +couchbase.index.num_scan_timeouts,count,,request,,"[Couchbase >= 7] The number of requests that timed out, either waiting for snapshots or during scan in progress",0,couchbase,,, +couchbase.index.recs_in_mem,gauge,,record,,"[Couchbase >= 7] For standard index storage, this is the number of records in this index that are stored in memory. For memory-optimized index storage, this is the same as items_count",0,couchbase,,, +couchbase.index.recs_on_disk,gauge,,record,,"[Couchbase >= 7] For standard index storage, this is the number of records in this index that are stored on disk. For memory-optimized index storage, this is 0",0,couchbase,,, +couchbase.index.resident_percent,gauge,,percent,,[Couchbase >= 7] The percentage of data held in memory,0,couchbase,,, +couchbase.index.scan_bytes_read,count,,byte,,[Couchbase >= 7] The number of bytes read by a scan since last startup,0,couchbase,,, +couchbase.index.total_scan_duration,gauge,,nanosecond,,[Couchbase >= 7] The total time spent by the indexer in scanning rows since last startup,0,couchbase,,, +couchbase.indexer.indexer_state,gauge,,,,"[Couchbase >= 7] The current state of the Index service on this node (0 = Active, 1 = Pause, 2 = Warmup)",0,couchbase,,, +couchbase.indexer.memory_quota,gauge,,byte,,[Couchbase >= 7] The memory quota assigned to the Index service on this node by user configuration,0,couchbase,,, +couchbase.indexer.memory_total_storage,gauge,,byte,,[Couchbase >= 7] The total size allocated in the indexer across all indexes. This also accounts for memory fragmentation,0,couchbase,,, +couchbase.indexer.memory_used,gauge,,byte,,[Couchbase >= 7] The amount of memory used by the Index service on this node,0,couchbase,,, +couchbase.indexer.total_indexer_gc_pause_ns,gauge,,nanosecond,,[Couchbase >= 7] The total time the indexer has spent in GC pause since the last startup,0,couchbase,,, +couchbase.query.cores,gauge,,core,,,0,couchbase,cores,, +couchbase.query.cpu_sys_percent,gauge,,percent,,,0,couchbase,cpu sys,, +couchbase.query.cpu_user_percent,gauge,,percent,,,0,couchbase,cpu user,, +couchbase.query.gc_num,gauge,,,,,0,couchbase,gc num,, +couchbase.query.gc_pause_percent,gauge,,percent,,,0,couchbase,gc pause percent,, +couchbase.query.gc_pause_time,gauge,,second,,,0,couchbase,gc pause time,, +couchbase.query.memory_system,gauge,,byte,,,0,couchbase,mem sys,, +couchbase.query.memory_total,gauge,,byte,,,0,couchbase,mem total,, +couchbase.query.memory_usage,gauge,,byte,,,0,couchbase,mem usage,, +couchbase.query.request_active_count,gauge,,request,,,0,couchbase,request active,, +couchbase.query.request_completed_count,gauge,,request,,,0,couchbase,request completed,, +couchbase.query.request_per_sec_15min,gauge,,request,,,0,couchbase,request per sec 15min,, +couchbase.query.request_per_sec_1min,gauge,,request,,,0,couchbase,request per sec 1min,, +couchbase.query.request_per_sec_5min,gauge,,request,,,0,couchbase,request per sec 5min,, +couchbase.query.request_prepared_percent,gauge,,request,,,0,couchbase,request prepared percent,, +couchbase.query.request_time_80percentile,gauge,,second,,,0,couchbase,request time 80p,, +couchbase.query.request_time_95percentile,gauge,,second,,,0,couchbase,request time 95p,, +couchbase.query.request_time_99percentile,gauge,,second,,,0,couchbase,request time 99p,, +couchbase.query.request_time_mean,gauge,,second,,,0,couchbase,request time mean,, +couchbase.query.request_time_median,gauge,,second,,,0,couchbase,request time median,, +couchbase.query.total_threads,gauge,,thread,,,0,couchbase,total threads,, +couchbase.ram.quota_total,gauge,,byte,,RAM quota,0,couchbase,ram quota,, +couchbase.ram.quota_total_per_node,gauge,,byte,,RAM quota,0,couchbase,per_node ram quota,, +couchbase.ram.quota_used,gauge,,byte,,Used RAM quota,0,couchbase,used ram quota,, +couchbase.ram.quota_used_per_node,gauge,,byte,,Used RAM quota,0,couchbase,per_node used ram quota,, +couchbase.ram.total,gauge,,byte,,Total RAM,-1,couchbase,ram total,, +couchbase.ram.used,gauge,,byte,,RAM in use,1,couchbase,ram used,, +couchbase.ram.used_by_data,gauge,,byte,,RAM used for data,0,couchbase,ram data used,, +couchbase.sync_gateway.admin_net_bytes_recv,count,,byte,,The total number of bytes received (since node start-up) on the network interface to which the Sync Gateway admin interface is bound.,0,couchbase,,, +couchbase.sync_gateway.admin_net_bytes_sent,count,,byte,,The total number of bytes sent (since node start-up) on the network interface to which the Sync Gateway admin interface is bound.,0,couchbase,,, +couchbase.sync_gateway.assertion_fail_count,count,,event,,The total number of assertion failures logged. This is a good indicator of a bug and should be reported.,-1,couchbase,,, +couchbase.sync_gateway.cache.abandoned_seqs,count,,,,The total number of skipped sequences that were not found after 60 minutes and were abandoned.,0,couchbase,,, +couchbase.sync_gateway.cache.chan_cache_active_revs,count,,,,The total number of active revisions in the channel cache.,0,couchbase,,, +couchbase.sync_gateway.cache.chan_cache_bypass_count,count,,,,The total number of transient bypass channel caches created to serve requests when the channel cache was at capacity.,0,couchbase,,, +couchbase.sync_gateway.cache.chan_cache_channels_added,count,,,,The total number of channel caches added.,0,couchbase,,, +couchbase.sync_gateway.cache.chan_cache_channels_evicted_inactive,count,,,,The total number of channel cache channels evicted due to inactivity.,0,couchbase,,, +couchbase.sync_gateway.cache.chan_cache_channels_evicted_nru,count,,,,"The total number of active channel cache channels evicted, based on 'not recently used' criteria.",0,couchbase,,, +couchbase.sync_gateway.cache.chan_cache_compact_count,count,,,,The total number of channel cache compaction runs.,0,couchbase,,, +couchbase.sync_gateway.cache.chan_cache_compact_time,count,,,,The total amount of time taken by channel cache compaction across all compaction runs.,0,couchbase,,, +couchbase.sync_gateway.cache.chan_cache_hits,count,,hit,,The total number of channel cache requests fully served by the cache.,0,couchbase,,, +couchbase.sync_gateway.cache.chan_cache_max_entries,count,,entry,,The total size of the largest channel cache.,0,couchbase,,, +couchbase.sync_gateway.cache.chan_cache_misses,count,,miss,,The total number of channel cache requests not fully served by the cache.,0,couchbase,,, +couchbase.sync_gateway.cache.chan_cache_num_channels,count,,,,The total number of channels being cached.,0,couchbase,,, +couchbase.sync_gateway.cache.chan_cache_pending_queries,count,,,,The total number of channel cache pending queries.,0,couchbase,,, +couchbase.sync_gateway.cache.chan_cache_removal_revs,count,,,,The total number of removal revisions in the channel cache.,0,couchbase,,, +couchbase.sync_gateway.cache.chan_cache_tombstone_revs,count,,,,The total number of tombstone revisions in the channel cache.,0,couchbase,,, +couchbase.sync_gateway.cache.current_skipped_seq_count,gauge,,item,,The number of sequences currently in the skipped sequence slice.,0,couchbase,,, +couchbase.sync_gateway.cache.high_seq_cached,gauge,,,,The highest sequence number cached.,0,couchbase,,, +couchbase.sync_gateway.cache.high_seq_stable,gauge,,,,The highest contiguous sequence number that has been cached.,0,couchbase,,, +couchbase.sync_gateway.cache.non_mobile_ignored_count,count,,document,,Number of non mobile documents that were ignored off the cache feed.,0,couchbase,,, +couchbase.sync_gateway.cache.num_active_channels,count,,,,The total number of active channels.,0,couchbase,,, +couchbase.sync_gateway.cache.num_skipped_seqs,count,,,,The total number of skipped sequences.,0,couchbase,,, +couchbase.sync_gateway.cache.pending_seq_len,count,,,,The total number of pending sequences. These are out-of-sequence entries waiting to be cached.,0,couchbase,,, +couchbase.sync_gateway.cache.rev_cache_bypass,count,,,,The total number of revision cache bypass operations performed.,0,couchbase,,, +couchbase.sync_gateway.cache.rev_cache_hits,count,,hit,,The total number of revision cache hits.,0,couchbase,,, +couchbase.sync_gateway.cache.rev_cache_misses,count,,miss,,The total number of revision cache misses.,0,couchbase,,, +couchbase.sync_gateway.cache.revision_cache_num_items,gauge,,item,,The total number of items in the revision cache.,0,couchbase,,, +couchbase.sync_gateway.cache.revision_cache_total_memory,gauge,,byte,,"The approximation of total memory taken up by rev cache for documents. This is measured by the raw document body, the channels allocated to a document and its revision history.",0,couchbase,,, +couchbase.sync_gateway.cache.skipped_seq_cap,gauge,,item,,The current capacity of the skipped sequence slice.,0,couchbase,,, +couchbase.sync_gateway.cache.skipped_seq_len,gauge,,,,The current length of the pending skipped sequence queue.,0,couchbase,,, +couchbase.sync_gateway.cache.skipped_sequence_skip_list_nodes,gauge,,item,,The number of nodes in skipped sequence skiplist data structure,0,couchbase,,, +couchbase.sync_gateway.cache.view_queries,count,,item,,The total view_queries.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_pull.attachment_pull_bytes,count,,,,The total size of attachments pulled. This is the pre-compressed size.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_pull.attachment_pull_count,count,,,,The total number of attachments pulled.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_pull.max_pending,gauge,,document,,"The high watermark for the number of documents buffered during feed processing, waiting on a missing earlier sequence.",0,couchbase,,, +couchbase.sync_gateway.cbl_replication_pull.norev_send_count,count,,message,,The total number of norev messages sent during replication.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_pull.num_pull_repl_active_continuous,count,,,,The total number of continuous pull replications in the active state.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_pull.num_pull_repl_active_one_shot,count,,,,The total number of one-shot pull replications in the active state.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_pull.num_pull_repl_caught_up,count,,,,The number of replications which have caught up to the latest changes.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_pull.num_pull_repl_since_zero,count,,,,The total number of new replications started (/_changes?since=0).,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_pull.num_pull_repl_total_caught_up,gauge,,,,The total number of replications which have caught up to the latest changes.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_pull.num_pull_repl_total_continuous,count,,,,The total number of continuous pull replications.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_pull.num_pull_repl_total_one_shot,count,,,,The total number of one-shot pull replications.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_pull.num_replications_active,count,,,,The total number of active replications.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_pull.replacement_rev_send_count,count,,item,,The total number of replacement revs sent during replication.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_pull.request_changes_count,count,,,,The total number of changes requested.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_pull.request_changes_time,count,,,,This metric can be used to calculate the latency of requested changes:,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_pull.rev_error_count,count,,item,,The total number of replacement revisions sent instead of a norev during replication.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_pull.rev_processing_time,count,,,,The total amount of time processing rev messages (revisions) during pull revision.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_pull.rev_send_count,count,,,,The total number of rev messages processed during replication.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_pull.rev_send_latency,count,,,,The total amount of time between Sync Gateway receiving a request for a revision and that revision being sent.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_push.attachment_push_bytes,count,,byte,,The total number of attachment bytes pushed.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_push.attachment_push_count,count,,,,The total number of attachments pushed.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_push.doc_push_count,count,,document,,The total number of documents pushed.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_push.doc_push_error_count,gauge,,document,,The total number of documents that failed to push.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_push.propose_change_count,count,,message,,The total number of changes and-or proposeChanges messages processed since node start-up.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_push.propose_change_time,count,,,,The total time spent processing changes and/or proposeChanges messages.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_push.write_processing_time,count,,,,Total time spent processing writes.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_push.write_throttled_count,count,,throttle,,The total number of times a revision was throttled during push replication from clients. The write_throttled_count stat can be useful to to determine an appropriate limit of concurrent revisions for each client. There's a direct tradeoff with memory and CPU usage for replicating clients and large amounts of concurrent revisions.,0,couchbase,,, +couchbase.sync_gateway.cbl_replication_push.write_throttled_time,count,,nanosecond,,The total time (in nanoseconds) waiting for an available slot to handle a pushed revision after being throttled. The write_throttled_time stat can be useful to determine whether clients are waiting too long for an available slot to push a revision. There's a direct tradeoff with memory and CPU usage for replicating clients and large amounts of concurrent revisions.,0,couchbase,,, +couchbase.sync_gateway.database.compaction_attachment_start_time,gauge,,,,The compaction_attachment_start_time,0,couchbase,,, +couchbase.sync_gateway.database.compaction_tombstone_start_time,gauge,,,,The compaction_tombstone_start_time.,0,couchbase,,, +couchbase.sync_gateway.database.conflict_write_count,count,,,,"The total number of writes that left the document in a conflicted state. Includes new conflicts, and mutations that don't resolve existing conflicts.",0,couchbase,,, +couchbase.sync_gateway.database.corrupt_sequence_count,count,,item,,The total number of corrupt sequences above the MaxSequencesToRelease threshold seen at the sequence allocator,-1,couchbase,,, +couchbase.sync_gateway.database.crc32c_match_count,count,,,,"The total number of instances during import when the document cas had changed, but the document was not imported because the document body had not changed.",0,couchbase,,, +couchbase.sync_gateway.database.dcp_caching_count,count,,,,The total number of DCP mutations added to Sync Gateway's channel cache.,0,couchbase,,, +couchbase.sync_gateway.database.dcp_caching_time,count,,,,The total time between a DCP mutation arriving at Sync Gateway and being added to channel cache.,0,couchbase,,, +couchbase.sync_gateway.database.dcp_received_count,count,,,,The total number of document mutations received by Sync Gateway over DCP.,0,couchbase,,, +couchbase.sync_gateway.database.dcp_received_time,gauge,,,,The time between a document write and that document being received by Sync Gateway over DCP.,0,couchbase,,, +couchbase.sync_gateway.database.doc_reads_bytes_blip,count,,,,The total number of bytes read via Couchbase Lite 2.x replication since Sync Gateway node startup.,0,couchbase,,, +couchbase.sync_gateway.database.doc_writes_bytes,count,,,,The total number of bytes written as part of document writes since Sync Gateway node startup.,0,couchbase,,, +couchbase.sync_gateway.database.doc_writes_bytes_blip,count,,,,The total number of bytes written as part ofCouchbase Lite 2.x document writes since Sync Gateway node startup.,0,couchbase,,, +couchbase.sync_gateway.database.doc_writes_xattr_bytes,count,,byte,,The total size of xattrs written (in bytes).,0,couchbase,,, +couchbase.sync_gateway.database.high_seq_feed,gauge,,,,Highest sequence number seen on the caching DCP feed.,0,couchbase,,, +couchbase.sync_gateway.database.last_sequence_assigned_value,gauge,,,,The value of the last sequence number assigned. Callers using Set should be holding a mutex or ensure concurrent updates to this value are otherwise safe.,0,couchbase,,, +couchbase.sync_gateway.database.last_sequence_reserved_value,gauge,,,,The value of the last sequence number reserved (which may not yet be assigned). Callers using Set should be holding a mutex or ensure concurrent updates to this value are otherwise safe.,0,couchbase,,, +couchbase.sync_gateway.database.num_attachments_compacted,count,,item,,The number of attachments compacted import_feed,0,couchbase,,, +couchbase.sync_gateway.database.num_doc_reads_blip,count,,document,,The total number of documents read via Couchbase Lite 2.x replication since Sync Gateway node startup.,0,couchbase,,, +couchbase.sync_gateway.database.num_doc_reads_rest,count,,document,,The total number of documents read via the REST API since Sync Gateway node startup. Includes Couchbase Lite 1.x replication.,0,couchbase,,, +couchbase.sync_gateway.database.num_doc_writes,count,,document,,"The total number of documents written by any means (replication, rest API interaction or imports) since Sync Gateway node startup.",0,couchbase,,, +couchbase.sync_gateway.database.num_doc_writes_rejected,count,,write,,NumDocWritesRejected is the total number of document writes that were rejected by Sync Gateway.,-1,couchbase,,, +couchbase.sync_gateway.database.num_docs_post_filter_public_all_docs,count,,document,,NumDocsPostFilterPublicAllDocs is the total number of documents returned after filtering for /_all_docs on the public interface.,0,couchbase,,, +couchbase.sync_gateway.database.num_docs_pre_filter_public_all_docs,count,,document,,NumDocsPreFilterPublicAllDocs is the total number of documents returned before filtering for /_all_docs on the public interface.,0,couchbase,,, +couchbase.sync_gateway.database.num_public_all_docs_requests,count,,request,,NumPublicAllDocsRequests is the total number of requests to /_all_docs on the public interface.,0,couchbase,,, +couchbase.sync_gateway.database.num_public_rest_requests,count,,request,,The total number of requests sent over the public REST api.,0,couchbase,,, +couchbase.sync_gateway.database.num_replications_active,count,,,,The total number of active replications.,0,couchbase,,, +couchbase.sync_gateway.database.num_replications_rejected_limit,count,,event,,The total number of times a replication connection is rejected due to it being over the threshold.,-1,couchbase,,, +couchbase.sync_gateway.database.num_replications_total,count,,,,The total number of replications created since Sync Gateway node startup.,0,couchbase,,, +couchbase.sync_gateway.database.num_tombstones_compacted,gauge,,,,The number of tombstones compacted.,0,couchbase,,, +couchbase.sync_gateway.database.public_rest_bytes_read,count,,byte,,The total amount of bytes read over the public REST api,0,couchbase,,, +couchbase.sync_gateway.database.public_rest_bytes_written,count,,byte,,Number of bytes written over public interface for REST api,0,couchbase,,, +couchbase.sync_gateway.database.replication_bytes_received,count,,byte,,Total bytes received over replications to the database.,0,couchbase,,, +couchbase.sync_gateway.database.replication_bytes_sent,count,,byte,,Total bytes sent over replications from the database.,0,couchbase,,, +couchbase.sync_gateway.database.resync_num_changed,count,,document,,The total number of changed documents for resync on this database.,0,couchbase,,, +couchbase.sync_gateway.database.resync_num_processed,count,,document,,The total number of processed documents for resync on this database.,0,couchbase,,, +couchbase.sync_gateway.database.sequence_assigned_count,gauge,,,,The total number of sequence numbers assigned.,0,couchbase,,, +couchbase.sync_gateway.database.sequence_get_count,gauge,,,,The total number of high sequence lookups.,0,couchbase,,, +couchbase.sync_gateway.database.sequence_incr_count,count,,,,The total number of times the sequence counter document has been incremented.,0,couchbase,,, +couchbase.sync_gateway.database.sequence_released_count,count,,,,"The total number of unused, reserved sequences released by Sync Gateway.",0,couchbase,,, +couchbase.sync_gateway.database.sequence_reserved_count,count,,,,The total number of sequences reserved by Sync Gateway.,0,couchbase,,, +couchbase.sync_gateway.database.sync_function_count,count,,event,,"The total number of times that the sync_function is evaluated. The {sync_function_count_ stat is useful in assessing the usage of the sync_function, when used in conjunction with the sync_function_time.",0,couchbase,,, +couchbase.sync_gateway.database.sync_function_exception_count,count,,event,,The total number of times that a sync function encountered an exception (across all collections).,-1,couchbase,,, +couchbase.sync_gateway.database.sync_function_time,count,,nanosecond,,"The total time spent evaluating the sync_function.",0,couchbase,,, +couchbase.sync_gateway.database.total_init_fatal_errors,count,,error,,The total number of errors that occurred that prevented the database from being initialized.,-1,couchbase,,, +couchbase.sync_gateway.database.total_online_fatal_errors,count,,error,,The total number of errors that occurred that prevented the database from being brought online.,-1,couchbase,,, +couchbase.sync_gateway.database.total_sync_time,count,,second,,The total total sync time is a proxy for websocket connections. Tracking long lived and potentially idle connections. This stat represents the continually growing number of connections per sec.,0,couchbase,,, +couchbase.sync_gateway.database.warn_channel_name_size_count,count,,event,,The total number of warnings relating to the channel name size.,0,couchbase,,, +couchbase.sync_gateway.database.warn_channels_per_doc_count,count,,,,The total number of warnings relating to the channel count exceeding the channel count threshold.,0,couchbase,,, +couchbase.sync_gateway.database.warn_grants_per_doc_count,count,,,,The total number of warnings relating to the grant count exceeding the grant count threshold.,0,couchbase,,, +couchbase.sync_gateway.database.warn_xattr_size_count,count,,,,The total number of warnings relating to the xattr sync data being larger than a configured threshold.,0,couchbase,,, +couchbase.sync_gateway.error_count,count,,error,,The total number of errors logged.,0,couchbase,,, +couchbase.sync_gateway.go_memstats_heapalloc,gauge,,byte,,The bytes of allocated heap objects.,0,couchbase,,, +couchbase.sync_gateway.go_memstats_heapidle,gauge,,byte,,The bytes in idle (unused) spans.,0,couchbase,,, +couchbase.sync_gateway.go_memstats_heapinuse,gauge,,byte,,The bytes in in-use spans.,0,couchbase,,, +couchbase.sync_gateway.go_memstats_heapreleased,gauge,,byte,,The bytes of physical memory returned to the OS.,0,couchbase,,, +couchbase.sync_gateway.go_memstats_pausetotalns,gauge,,nanosecond,,The circular buffer of recent GC stop-the-world pause times.,0,couchbase,,, +couchbase.sync_gateway.go_memstats_stackinuse,gauge,,byte,,The bytes in stack spans.,0,couchbase,,, +couchbase.sync_gateway.go_memstats_stacksys,gauge,,byte,,The bytes of stack memory obtained from the OS.,0,couchbase,,, +couchbase.sync_gateway.go_memstats_sys,gauge,,byte,,The bytes of memory obtained from the OS for mspan structures.,0,couchbase,,, +couchbase.sync_gateway.goroutines_high_watermark,gauge,,,,Peak number of go routines since process start.,0,couchbase,,, +couchbase.sync_gateway.idle_kv_ops,count,,operation,,The total number of idle kv operations.,0,couchbase,,, +couchbase.sync_gateway.idle_query_ops,gauge,,operation,,The number of background kv/query operations.,0,couchbase,,, +couchbase.sync_gateway.node_cpu_percent_utilization,gauge,,percent,,"The node CPU utilization as percentage value, since the last time this stat was called. The CPU usage calculation is performed based on user and system CPU time, but it does not include components such as iowait.",0,couchbase,,, +couchbase.sync_gateway.num_goroutines,count,,,,The total number of goroutines.,0,couchbase,,, +couchbase.sync_gateway.process_cpu_percent_utilization,gauge,,percent,,The CPU's utilization as percentage value.,0,couchbase,,, +couchbase.sync_gateway.process_memory_resident,gauge,,byte,,The memory utilization (Resident Set Size) for the process.,0,couchbase,,, +couchbase.sync_gateway.pub_net_bytes_recv,count,,byte,,The memory utilization (Resident Set Size) for the process.,0,couchbase,,, +couchbase.sync_gateway.pub_net_bytes_sent,count,,byte,,The total number of bytes sent (since node start-up) on the network interface to which Sync Gateway public interface is bound.,0,couchbase,,, +couchbase.sync_gateway.security.auth_failed_count,count,,,,The total number of unsuccessful authentications.,0,couchbase,,, +couchbase.sync_gateway.security.auth_success_count,count,,success,,The total number of successful authentications.,0,couchbase,,, +couchbase.sync_gateway.security.num_access_errors,count,,document,,"The total number of documents rejected by write access functions (requireAccess, requireRole, requireUser).",0,couchbase,,, +couchbase.sync_gateway.security.num_docs_rejected,count,,document,,The total number of documents rejected by the sync_function.,0,couchbase,,, +couchbase.sync_gateway.security.total_auth_time,count,,,,The total time spent in authenticating all requests.,0,couchbase,,, +couchbase.sync_gateway.shared_bucket_import.import_cancel_cas,count,,,,The total number of imports cancelled due to cas failure.,0,couchbase,,, +couchbase.sync_gateway.shared_bucket_import.import_count,count,,document,,The total number of docs imported.,0,couchbase,,, +couchbase.sync_gateway.shared_bucket_import.import_error_count,count,,error,,The total number of errors arising as a result of a document import.,0,couchbase,,, +couchbase.sync_gateway.shared_bucket_import.import_feed_processed_count,count,,item,,,0,couchbase,,, +couchbase.sync_gateway.shared_bucket_import.import_high_seq,gauge,,,,The highest sequence number value imported.,0,couchbase,,, +couchbase.sync_gateway.shared_bucket_import.import_partitions,count,,,,The total number of import partitions.,0,couchbase,,, +couchbase.sync_gateway.shared_bucket_import.import_processing_time,count,,,,The total time taken to process a document import.,0,couchbase,,, +couchbase.sync_gateway.system_memory_total,count,,byte,,The total memory available on the system in bytes.,0,couchbase,,, +couchbase.sync_gateway.uptime,gauge,,,,The total uptime.,0,couchbase,,, +couchbase.sync_gateway.warn_count,count,,byte,,The total number of warnings logged.,0,couchbase,,, diff --git a/couchbase/tests/common.py b/couchbase/tests/common.py index d729c88c928b1..b90d71c94de7f 100644 --- a/couchbase/tests/common.py +++ b/couchbase/tests/common.py @@ -19,7 +19,7 @@ CHECK_TAGS = CUSTOM_TAGS + ['instance:http://{}:{}'.format(HOST, PORT)] BUCKET_NAME = 'cb_bucket' INDEX_STATS_TAGS = CHECK_TAGS + [ - 'bucket:cb_bucket', + 'bucket:gamesim-sample', 'collection:default', 'index_name:gamesim_primary', 'scope:default', @@ -34,6 +34,9 @@ PASSWORD = 'password' COUCHBASE_MAJOR_VERSION = int(os.getenv('COUCHBASE_VERSION').split(".")[0]) +COUCHBASE_MINOR_VERSION = int(os.getenv('COUCHBASE_VERSION').split(".")[1]) +COUCHBASE_SYNCGW_MAJOR_VERSION = int(os.getenv('COUCHBASE_SYNCGW_VERSION').split(".")[0]) +COUCHBASE_SYNCGW_MINOR_VERSION = int(os.getenv('COUCHBASE_SYNCGW_VERSION').split(".")[1]) DEFAULT_INSTANCE = {'server': URL, 'user': USER, 'password': PASSWORD, 'timeout': 1, 'tags': CUSTOM_TAGS} @@ -57,6 +60,7 @@ "couchbase.sync_gateway.cache.chan_cache_tombstone_revs", "couchbase.sync_gateway.cache.high_seq_cached", "couchbase.sync_gateway.cache.high_seq_stable", + "couchbase.sync_gateway.cache.non_mobile_ignored_count", "couchbase.sync_gateway.cache.num_active_channels", "couchbase.sync_gateway.cache.num_skipped_seqs", "couchbase.sync_gateway.cache.pending_seq_len", @@ -64,6 +68,7 @@ "couchbase.sync_gateway.cache.rev_cache_hits", "couchbase.sync_gateway.cache.rev_cache_misses", "couchbase.sync_gateway.cache.skipped_seq_len", + "couchbase.sync_gateway.cache.view_queries", "couchbase.sync_gateway.cbl_replication_pull.attachment_pull_bytes", "couchbase.sync_gateway.cbl_replication_pull.attachment_pull_count", "couchbase.sync_gateway.cbl_replication_pull.max_pending", @@ -71,6 +76,7 @@ "couchbase.sync_gateway.cbl_replication_pull.num_pull_repl_active_one_shot", "couchbase.sync_gateway.cbl_replication_pull.num_pull_repl_caught_up", "couchbase.sync_gateway.cbl_replication_pull.num_pull_repl_since_zero", + "couchbase.sync_gateway.cbl_replication_pull.num_pull_repl_total_caught_up", "couchbase.sync_gateway.cbl_replication_pull.num_pull_repl_total_continuous", "couchbase.sync_gateway.cbl_replication_pull.num_pull_repl_total_one_shot", "couchbase.sync_gateway.cbl_replication_pull.num_replications_active", @@ -84,10 +90,9 @@ "couchbase.sync_gateway.cbl_replication_push.doc_push_count", "couchbase.sync_gateway.cbl_replication_push.propose_change_count", "couchbase.sync_gateway.cbl_replication_push.propose_change_time", - "couchbase.sync_gateway.cbl_replication_push.sync_function_count", - "couchbase.sync_gateway.cbl_replication_push.sync_function_time", "couchbase.sync_gateway.cbl_replication_push.write_processing_time", - "couchbase.sync_gateway.database.abandoned_seqs", + "couchbase.sync_gateway.database.compaction_attachment_start_time", + "couchbase.sync_gateway.database.compaction_tombstone_start_time", "couchbase.sync_gateway.database.conflict_write_count", "couchbase.sync_gateway.database.crc32c_match_count", "couchbase.sync_gateway.database.dcp_caching_count", @@ -99,6 +104,7 @@ "couchbase.sync_gateway.database.doc_writes_bytes_blip", "couchbase.sync_gateway.database.doc_writes_xattr_bytes", "couchbase.sync_gateway.database.high_seq_feed", + "couchbase.sync_gateway.database.num_attachments_compacted", "couchbase.sync_gateway.database.num_doc_reads_blip", "couchbase.sync_gateway.database.num_doc_reads_rest", "couchbase.sync_gateway.database.num_doc_writes", @@ -110,6 +116,10 @@ "couchbase.sync_gateway.database.sequence_incr_count", "couchbase.sync_gateway.database.sequence_released_count", "couchbase.sync_gateway.database.sequence_reserved_count", + "couchbase.sync_gateway.database.sync_function_count", + "couchbase.sync_gateway.database.sync_function_exception_count", + "couchbase.sync_gateway.database.sync_function_time", + "couchbase.sync_gateway.database.warn_channel_name_size_count", "couchbase.sync_gateway.database.warn_channels_per_doc_count", "couchbase.sync_gateway.database.warn_grants_per_doc_count", "couchbase.sync_gateway.database.warn_xattr_size_count", @@ -140,9 +150,50 @@ "couchbase.sync_gateway.shared_bucket_import.import_partitions", "couchbase.sync_gateway.shared_bucket_import.import_processing_time", "couchbase.sync_gateway.system_memory_total", + "couchbase.sync_gateway.uptime", "couchbase.sync_gateway.warn_count", ] +if COUCHBASE_SYNCGW_MAJOR_VERSION == 3 and COUCHBASE_SYNCGW_MINOR_VERSION >= 3: + SYNC_GATEWAY_METRICS.extend( + [ + "couchbase.sync_gateway.assertion_fail_count", + "couchbase.sync_gateway.cache.current_skipped_seq_count", + "couchbase.sync_gateway.cache.revision_cache_num_items", + "couchbase.sync_gateway.cache.revision_cache_total_memory", + "couchbase.sync_gateway.cache.skipped_seq_cap", + "couchbase.sync_gateway.cache.skipped_sequence_skip_list_nodes", + "couchbase.sync_gateway.cbl_replication_pull.norev_send_count", + "couchbase.sync_gateway.cbl_replication_pull.replacement_rev_send_count", + "couchbase.sync_gateway.cbl_replication_pull.rev_error_count", + "couchbase.sync_gateway.cbl_replication_push.doc_push_error_count", + "couchbase.sync_gateway.cbl_replication_push.write_throttled_count", + "couchbase.sync_gateway.cbl_replication_push.write_throttled_time", + "couchbase.sync_gateway.database.corrupt_sequence_count", + "couchbase.sync_gateway.database.last_sequence_assigned_value", + "couchbase.sync_gateway.database.last_sequence_reserved_value", + "couchbase.sync_gateway.database.num_docs_post_filter_public_all_docs", + "couchbase.sync_gateway.database.num_docs_pre_filter_public_all_docs", + "couchbase.sync_gateway.database.num_doc_writes_rejected", + "couchbase.sync_gateway.database.num_public_all_docs_requests", + "couchbase.sync_gateway.database.num_public_rest_requests", + "couchbase.sync_gateway.database.num_replications_rejected_limit", + "couchbase.sync_gateway.database.public_rest_bytes_read", + "couchbase.sync_gateway.database.public_rest_bytes_written", + "couchbase.sync_gateway.database.replication_bytes_received", + "couchbase.sync_gateway.database.replication_bytes_sent", + "couchbase.sync_gateway.database.resync_num_changed", + "couchbase.sync_gateway.database.resync_num_processed", + "couchbase.sync_gateway.database.total_init_fatal_errors", + "couchbase.sync_gateway.database.total_online_fatal_errors", + "couchbase.sync_gateway.database.total_sync_time", + "couchbase.sync_gateway.idle_kv_ops", + "couchbase.sync_gateway.idle_query_ops", + "couchbase.sync_gateway.node_cpu_percent_utilization", + "couchbase.sync_gateway.shared_bucket_import.import_feed_processed_count", + ] + ) + INDEX_STATS_INDEXER_METRICS = [ 'couchbase.indexer.indexer_state', 'couchbase.indexer.memory_quota', diff --git a/couchbase/tests/compose/docker-compose.yaml b/couchbase/tests/compose/docker-compose.yaml index 71b782a715ca1..019324c869e4b 100644 --- a/couchbase/tests/compose/docker-compose.yaml +++ b/couchbase/tests/compose/docker-compose.yaml @@ -7,10 +7,21 @@ services: container_name: ${CB_CONTAINER_NAME} couchbase-sync-gateway: container_name: couchbase-sync-gateway - image: couchbase/sync-gateway:2.8.3-enterprise + image: couchbase/sync-gateway:${COUCHBASE_SYNCGW_VERSION}-enterprise command: - - "-adminInterface" + - "-bootstrap.server" + - "couchbase://${CB_CONTAINER_NAME}" + - "-bootstrap.use_tls_server=false" + - "-bootstrap.username" + - "${CB_USERNAME}" + - "-bootstrap.password" + - "${CB_PASSWORD}" + - "-api.admin_interface" - ":4985" + - "-api.metrics_interface" + - ":4986" + - "-api.metrics_interface_authentication=false" ports: - "4984:4984" - "4985:4985" + - "4986:4986" diff --git a/couchbase/tests/conftest.py b/couchbase/tests/conftest.py index c3fd8c7f6ddb3..5d5136982e14c 100644 --- a/couchbase/tests/conftest.py +++ b/couchbase/tests/conftest.py @@ -4,6 +4,7 @@ import os import subprocess +import time from copy import deepcopy import pytest @@ -18,6 +19,9 @@ BUCKET_NAME, CB_CONTAINER_NAME, COUCHBASE_MAJOR_VERSION, + COUCHBASE_MINOR_VERSION, + COUCHBASE_SYNCGW_MAJOR_VERSION, + COUCHBASE_SYNCGW_MINOR_VERSION, DEFAULT_INSTANCE, HERE, INDEX_STATS_URL, @@ -69,12 +73,16 @@ def dd_environment(): WaitFor(couchbase_setup), WaitFor(node_stats), WaitFor(bucket_stats), + WaitFor(load_sample_bucket), + WaitFor(create_syncgw_database), ] - if COUCHBASE_MAJOR_VERSION >= 7: - conditions.append(WaitFor(load_sample_bucket)) with docker_run( compose_file=os.path.join(HERE, 'compose', 'docker-compose.yaml'), - env_vars={'CB_CONTAINER_NAME': CB_CONTAINER_NAME}, + env_vars={ + 'CB_CONTAINER_NAME': CB_CONTAINER_NAME, + 'CB_USERNAME': USER, + 'CB_PASSWORD': PASSWORD, + }, conditions=conditions, sleep=15, ): @@ -183,26 +191,79 @@ def load_sample_bucket(): # Resources used: # https://docs.couchbase.com/server/current/manage/manage-settings/install-sample-buckets.html - bucket_loader_args = [ - 'docker', - 'exec', - CB_CONTAINER_NAME, - 'cbdocloader', - '-c', - 'localhost:{}'.format(PORT), - '-u', - USER, - '-p', - PASSWORD, - '-d', - '/opt/couchbase/samples/gamesim-sample.zip', - '-b', - 'cb_bucket', - '-m', - '256', - ] - with open(os.devnull, 'w') as FNULL: - subprocess.check_call(bucket_loader_args, stdout=FNULL) + r = requests.post( + '{}/sampleBuckets/install'.format(URL), + auth=(USER, PASSWORD), + json=["gamesim-sample"], + ) + if r.status_code == 400: + if "Sample bucket gamesim-sample is already loaded" in r.text: + return True + return False + + r.raise_for_status() + result = r.json() + + if COUCHBASE_MAJOR_VERSION == 7 and COUCHBASE_MINOR_VERSION > 6: + # Couchbase versions > 7.6 return an empty list on completion. + return len(result) == 0 + + # Couchbase version 7.6 returns a task ID that we have to check for + # completion. + task_id = None + for task in result["tasks"]: + if task["sample"] == "gamesim-sample": + task_id = task["taskId"] + + while True: + # Loop until the task ID is gone, meaning the task is done. + task_is_done = False + + r = requests.get( + '{}/pools/default/tasks'.format(URL), + auth=(USER, PASSWORD), + ) + r.raise_for_status() + result = r.json() + + for task in result: + if task.get("task_id", "") == task_id: + task_is_done = True + + if task_is_done: + break + + time.sleep(1) + + return True + + +def create_syncgw_database(): + """ + Create sample database + """ + + # Resources used: + # https://docs.couchbase.com/sync-gateway/current/configuration/configuration-schema-database.html + + payload = { + "bucket": "gamesim-sample", + "num_index_replicas": 0, + } + + # The payload format is different between Sync Gateway versions: The + # num_index_replicas field was deprecated in favor of index.num_replicas in + # version 3.3.0. + if COUCHBASE_SYNCGW_MAJOR_VERSION == 3 and COUCHBASE_SYNCGW_MINOR_VERSION >= 3: + payload["index"] = {"num_replicas": payload["num_index_replicas"]} + del payload["num_index_replicas"] + + r = requests.put( + '{}/sync_gateway/'.format(SG_URL), + auth=(USER, PASSWORD), + json=payload, + ) + r.raise_for_status() def node_stats():