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.
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:
-
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.
-
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
-
Open a browser or use
curl
to go tohttp://localhost:9091/metrics
.You should see a text-based Prometheus metrics output specific to Couchbase.
-
Check for the service exposing the Couchbase exporter. for example,
<release-name>-couchbase-exporter
:kubectl get svc -n <your-namespace>
-
Access the metrics:
-
If NodePort, note
<nodeport>
:http://<node-ip>:<nodeport>/metrics
-
If LoadBalancer, note
<loadbalancer-ip>
:http://<loadbalancer-ip>:9091/metrics
-
-
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.
-
- 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 name | Type |
---|---|
bucketstats_up | gauge |
cbbucketinfo_scrape_duration_seconds | gauge |
cbbucketinfo_up | gauge |
cbcbas_disk_used | gauge |
cbcbas_gc_count | gauge |
cbcbas_gc_time | gauge |
cbcbas_heap_used | gauge |
cbcbas_io_reads | gauge |
cbcbas_io_writes | gauge |
cbcbas_scrape_duration_seconds | gauge |
cbcbas_system_load_avg | gauge |
cbcbas_thread_count | gauge |
cbcbas_up | gauge |
cbeventing_bucket_op_exception_count | gauge |
cbeventing_checkpoint_failure_count | gauge |
cbeventing_dcp_backlog | gauge |
cbeventing_failed_count | gauge |
cbeventing_n1ql_op_exception_count | gauge |
cbeventing_on_delete_failure | gauge |
cbeventing_on_delete_success | gauge |
cbeventing_on_update_failure | gauge |
cbeventing_on_update_success | gauge |
cbeventing_processed_count | gauge |
cbeventing_scrape_duration_seconds | gauge |
cbeventing_test_bucket_op_exception_count | gauge |
cbeventing_test_checkpoint_failure_count | gauge |
cbeventing_test_dcp_backlog | gauge |
cbeventing_test_failed_count | gauge |
cbeventing_test_n1ql_op_exception_count | gauge |
cbeventing_test_on_delete_failure | gauge |
cbeventing_test_on_delete_success | gauge |
cbeventing_test_on_update_failure | gauge |
cbeventing_test_on_update_success | gauge |
cbeventing_test_processed_count | gauge |
cbeventing_test_timeout_count | gauge |
cbeventing_timeout_count | gauge |
cbeventing_up | gauge |
cbfts_curr_batches_blocked_by_herder | gauge |
cbfts_num_bytes_used_ram | gauge |
cbfts_scrape_duration_seconds | gauge |
cbfts_total_queries_rejected_by_herder | gauge |
cbfts_up | gauge |
cbindex_memory_quota | gauge |
cbindex_memory_used | gauge |
cbindex_ram_percent | gauge |
cbindex_remaining_ram | gauge |
cbindex_scrape_duration_seconds | gauge |
cbindex_up | gauge |
cbnode_cluster_membership | counter |
cbnode_failover | counter |
cbnode_failover_complete | counter |
cbnode_failover_incomplete | counter |
cbnode_failover_node | counter |
cbnode_graceful_failover_fail | counter |
cbnode_graceful_failover_start | counter |
cbnode_graceful_failover_success | counter |
cbnode_healthy | gauge |
cbnode_interestingstats_cmd_get | gauge |
cbnode_interestingstats_couch_docs_actual_disk_size | gauge |
cbnode_interestingstats_couch_docs_data_size | gauge |
cbnode_interestingstats_couch_spatial_data_size | gauge |
cbnode_interestingstats_couch_spatial_disk_size | gauge |
cbnode_interestingstats_couch_views_actual_disk_size | gauge |
cbnode_interestingstats_couch_views_data_size | gauge |
cbnode_interestingstats_curr_items | gauge |
cbnode_interestingstats_curr_items_tot | gauge |
cbnode_interestingstats_ep_bg_fetched | gauge |
cbnode_interestingstats_get_hits | gauge |
cbnode_interestingstats_mem_used | gauge |
cbnode_interestingstats_ops | gauge |
cbnode_interestingstats_vb_active_number_non_resident | gauge |
cbnode_interestingstats_vb_replica_curr_items | gauge |
cbnode_memcached_memory_allocated | counter |
cbnode_memcached_memory_reserved | counter |
cbnode_memory_free | counter |
cbnode_memory_total | counter |
cbnode_rebalance_failure | counter |
cbnode_rebalance_start | counter |
cbnode_rebalance_stop | counter |
cbnode_rebalance_success | counter |
cbnode_scrape_duration_seconds | gauge |
cbnode_systemstats_cpu_utilization_rate | gauge |
cbnode_systemstats_mem_free | gauge |
cbnode_systemstats_mem_total | gauge |
cbnode_systemstats_swap_total | gauge |
cbnode_systemstats_swap_used | gauge |
cbnode_up | gauge |
cbnode_uptime | counter |
cbpernode_bucketstats_scrape_duration_seconds | gauge |
cbpernode_bucketstats_up | gauge |
cbquery_active_requests | gauge |
cbquery_avg_req_time | gauge |
cbquery_avg_response_size | gauge |
cbquery_avg_result_count | gauge |
cbquery_avg_svc_time | gauge |
cbquery_errors | gauge |
cbquery_invalid_requests | gauge |
cbquery_queued_requests | gauge |
cbquery_request_time | gauge |
cbquery_requests | gauge |
cbquery_requests_1000ms | gauge |
cbquery_requests_250ms | gauge |
cbquery_requests_5000ms | gauge |
cbquery_requests_500ms | gauge |
cbquery_result_count | gauge |
cbquery_result_size | gauge |
cbquery_scrape_duration_seconds | gauge |
cbquery_selects | gauge |
cbquery_service_time | gauge |
cbquery_up | gauge |
cbquery_warnings | gauge |
cbtask_rebalance_progress | gauge |
cbtask_scrape_duration_seconds | gauge |
cbtask_up | gauge |
go_gc_duration_seconds | summary |
go_goroutines | gauge |
go_info | gauge |
go_memstats_alloc_bytes | gauge |
go_memstats_alloc_bytes_total | counter |
go_memstats_buck_hash_sys_bytes | gauge |
go_memstats_frees_total | counter |
go_memstats_gc_sys_bytes | gauge |
go_memstats_heap_alloc_bytes | gauge |
go_memstats_heap_idle_bytes | gauge |
go_memstats_heap_inuse_bytes | gauge |
go_memstats_heap_objects | gauge |
go_memstats_heap_released_bytes | gauge |
go_memstats_heap_sys_bytes | gauge |
go_memstats_last_gc_time_seconds | gauge |
go_memstats_lookups_total | counter |
go_memstats_mallocs_total | counter |
go_memstats_mcache_inuse_bytes | gauge |
go_memstats_mcache_sys_bytes | gauge |
go_memstats_mspan_inuse_bytes | gauge |
go_memstats_mspan_sys_bytes | gauge |
go_memstats_next_gc_bytes | gauge |
go_memstats_other_sys_bytes | gauge |
go_memstats_stack_inuse_bytes | gauge |
go_memstats_stack_sys_bytes | gauge |
go_memstats_sys_bytes | gauge |
go_threads | gauge |
process_cpu_seconds_total | counter |
process_max_fds | gauge |
process_open_fds | gauge |
process_resident_memory_bytes | gauge |
process_start_time_seconds | gauge |
process_virtual_memory_max_bytes | gauge |
promhttp_metric_handler_requests_in_flight | gauge |
promhttp_metric_handler_requests_total | counter |