Skip to main content
Version: 25.03.01

Metrics

Couchbase offers a high-performance, NoSQL distributed database system. To maintain its efficiency, stability, and reliability, monitoring various metrics is essential. The following is a list of key Couchbase metrics in PDS. Understanding these metrics will help administrators optimize performance, troubleshoot issues, and ensure the Couchbase cluster runs smoothly.

note

For Couchbase deployment, the data service metrics are accessible on port 9091.

Access metrics

Below is a step-by-step guide on how to access Couchbase metrics for PDS deployments:

  1. Identify the Couchbase pod running in your namespace:

    kubectl get pods -n <your-namespace>

    Look for the pod name that corresponds to your Couchbase instance or its sidecar exporter.

  2. Port-forward from your local machine’s port 9091 to the pod’s port 9091:

    kubectl port-forward -n <your-namespace> <couchbase-pod-name> 9091:9091
  3. Open a browser or use curl to go to http://localhost:9091/metrics.

    You should see a text-based Prometheus metrics output specific to Couchbase.

  4. Check for the service exposing the Couchbase exporter. for example, <release-name>-couchbase-exporter:

    kubectl get svc -n <your-namespace>
  5. Access the metrics:

    • If NodePort, note <nodeport>:

      http://<node-ip>:<nodeport>/metrics
    • If LoadBalancer, note <loadbalancer-ip>:

      http://<loadbalancer-ip>:9091/metrics
  6. Verify metrics:

    • Using curl:

      curl http://<host>:9091/metrics

      Replace <host> with either localhost (if using port-forward), <node-ip> (NodePort), or <loadbalancer-ip> (LoadBalancer).

    • Prometheus UI:

      In Prometheus, navigate to the Expression browser and search for metrics beginning with couchbase_ or similar Couchbase-related prefixes to confirm they are being scraped.

    • Grafana or other dashboards:

      If you have Grafana connected to Prometheus, open your dashboard. Check that Couchbase metrics (those starting with couchbase_) are being ingested and displayed.

note
  • Ensure that any NetworkPolicies or firewall rules allow inbound traffic on port 9091 if you plan to expose it externally.
  • Metrics naming conventions can vary depending on the Couchbase exporter version. Generally, look for prefixes like couchbase_.

Couchbase metrics

Metric nameType
bucketstats_upgauge
cbbucketinfo_scrape_duration_secondsgauge
cbbucketinfo_upgauge
cbcbas_disk_usedgauge
cbcbas_gc_countgauge
cbcbas_gc_timegauge
cbcbas_heap_usedgauge
cbcbas_io_readsgauge
cbcbas_io_writesgauge
cbcbas_scrape_duration_secondsgauge
cbcbas_system_load_avggauge
cbcbas_thread_countgauge
cbcbas_upgauge
cbeventing_bucket_op_exception_countgauge
cbeventing_checkpoint_failure_countgauge
cbeventing_dcp_backloggauge
cbeventing_failed_countgauge
cbeventing_n1ql_op_exception_countgauge
cbeventing_on_delete_failuregauge
cbeventing_on_delete_successgauge
cbeventing_on_update_failuregauge
cbeventing_on_update_successgauge
cbeventing_processed_countgauge
cbeventing_scrape_duration_secondsgauge
cbeventing_test_bucket_op_exception_countgauge
cbeventing_test_checkpoint_failure_countgauge
cbeventing_test_dcp_backloggauge
cbeventing_test_failed_countgauge
cbeventing_test_n1ql_op_exception_countgauge
cbeventing_test_on_delete_failuregauge
cbeventing_test_on_delete_successgauge
cbeventing_test_on_update_failuregauge
cbeventing_test_on_update_successgauge
cbeventing_test_processed_countgauge
cbeventing_test_timeout_countgauge
cbeventing_timeout_countgauge
cbeventing_upgauge
cbfts_curr_batches_blocked_by_herdergauge
cbfts_num_bytes_used_ramgauge
cbfts_scrape_duration_secondsgauge
cbfts_total_queries_rejected_by_herdergauge
cbfts_upgauge
cbindex_memory_quotagauge
cbindex_memory_usedgauge
cbindex_ram_percentgauge
cbindex_remaining_ramgauge
cbindex_scrape_duration_secondsgauge
cbindex_upgauge
cbnode_cluster_membershipcounter
cbnode_failovercounter
cbnode_failover_completecounter
cbnode_failover_incompletecounter
cbnode_failover_nodecounter
cbnode_graceful_failover_failcounter
cbnode_graceful_failover_startcounter
cbnode_graceful_failover_successcounter
cbnode_healthygauge
cbnode_interestingstats_cmd_getgauge
cbnode_interestingstats_couch_docs_actual_disk_sizegauge
cbnode_interestingstats_couch_docs_data_sizegauge
cbnode_interestingstats_couch_spatial_data_sizegauge
cbnode_interestingstats_couch_spatial_disk_sizegauge
cbnode_interestingstats_couch_views_actual_disk_sizegauge
cbnode_interestingstats_couch_views_data_sizegauge
cbnode_interestingstats_curr_itemsgauge
cbnode_interestingstats_curr_items_totgauge
cbnode_interestingstats_ep_bg_fetchedgauge
cbnode_interestingstats_get_hitsgauge
cbnode_interestingstats_mem_usedgauge
cbnode_interestingstats_opsgauge
cbnode_interestingstats_vb_active_number_non_residentgauge
cbnode_interestingstats_vb_replica_curr_itemsgauge
cbnode_memcached_memory_allocatedcounter
cbnode_memcached_memory_reservedcounter
cbnode_memory_freecounter
cbnode_memory_totalcounter
cbnode_rebalance_failurecounter
cbnode_rebalance_startcounter
cbnode_rebalance_stopcounter
cbnode_rebalance_successcounter
cbnode_scrape_duration_secondsgauge
cbnode_systemstats_cpu_utilization_rategauge
cbnode_systemstats_mem_freegauge
cbnode_systemstats_mem_totalgauge
cbnode_systemstats_swap_totalgauge
cbnode_systemstats_swap_usedgauge
cbnode_upgauge
cbnode_uptimecounter
cbpernode_bucketstats_scrape_duration_secondsgauge
cbpernode_bucketstats_upgauge
cbquery_active_requestsgauge
cbquery_avg_req_timegauge
cbquery_avg_response_sizegauge
cbquery_avg_result_countgauge
cbquery_avg_svc_timegauge
cbquery_errorsgauge
cbquery_invalid_requestsgauge
cbquery_queued_requestsgauge
cbquery_request_timegauge
cbquery_requestsgauge
cbquery_requests_1000msgauge
cbquery_requests_250msgauge
cbquery_requests_5000msgauge
cbquery_requests_500msgauge
cbquery_result_countgauge
cbquery_result_sizegauge
cbquery_scrape_duration_secondsgauge
cbquery_selectsgauge
cbquery_service_timegauge
cbquery_upgauge
cbquery_warningsgauge
cbtask_rebalance_progressgauge
cbtask_scrape_duration_secondsgauge
cbtask_upgauge
go_gc_duration_secondssummary
go_goroutinesgauge
go_infogauge
go_memstats_alloc_bytesgauge
go_memstats_alloc_bytes_totalcounter
go_memstats_buck_hash_sys_bytesgauge
go_memstats_frees_totalcounter
go_memstats_gc_sys_bytesgauge
go_memstats_heap_alloc_bytesgauge
go_memstats_heap_idle_bytesgauge
go_memstats_heap_inuse_bytesgauge
go_memstats_heap_objectsgauge
go_memstats_heap_released_bytesgauge
go_memstats_heap_sys_bytesgauge
go_memstats_last_gc_time_secondsgauge
go_memstats_lookups_totalcounter
go_memstats_mallocs_totalcounter
go_memstats_mcache_inuse_bytesgauge
go_memstats_mcache_sys_bytesgauge
go_memstats_mspan_inuse_bytesgauge
go_memstats_mspan_sys_bytesgauge
go_memstats_next_gc_bytesgauge
go_memstats_other_sys_bytesgauge
go_memstats_stack_inuse_bytesgauge
go_memstats_stack_sys_bytesgauge
go_memstats_sys_bytesgauge
go_threadsgauge
process_cpu_seconds_totalcounter
process_max_fdsgauge
process_open_fdsgauge
process_resident_memory_bytesgauge
process_start_time_secondsgauge
process_virtual_memory_max_bytesgauge
promhttp_metric_handler_requests_in_flightgauge
promhttp_metric_handler_requests_totalcounter