跳转至

CouchDB

·


CouchDB 采集器用于采集 CouchDB 相关的指标数据,目前只支持 Prometheus 格式的数据

已测试的版本:

  • CouchDB 3.3.2
  • CouchDB 3.2
  • CouchDBCouchDB 3.1 及以下版本不支持

配置

前置条件

  • 安装 CouchDB 服务

参见官方安装文档

  • 验证是否正确安装

在浏览器访问网址 <ip>:5984/_utils/ 可以进入 CouchDB 管理界面。

  • 打开 CouchDB Prometheus 端口

找到并编辑 CouchDB 启动配置文件,通常是在 /opt/couchdb/etc/local.ini

[prometheus]
additional_port = false
bind_address = 127.0.0.1
port = 17986

改为

[prometheus]
additional_port = true
bind_address = 0.0.0.0
port = 17986

参见官方配置文档

  • 重启 CouchDB 服务
Info
  • 采集数据需要用到 5984/17986 几个端口,远程采集的时候,被采集服务器这些端口需要打开。
  • bind_address = 127.0.0.1 如果是本地采集,就不需要修改。

采集器配置

进入 DataKit 安装目录下的 conf.d/samples 目录,复制 couchdb.conf.sample 并命名为 couchdb.conf。示例如下:

[[inputs.prom]]
  ## Collector alias.
  source = "couchdb"

  ## Exporter URLs.
  urls = ["http://127.0.0.1:17986/_node/_local/_prometheus"]

  ## TLS configuration.
  tls_open = false
  # tls_ca = "/tmp/ca.crt"
  # tls_cert = "/tmp/peer.crt"
  # tls_key = "/tmp/peer.key"

  ## Set to 'true' to enable election.
  election = true

  ## Customize tags.
  [inputs.prom.tags]
    # some_tag = "some_value"
    # more_tag = "some_other_value"

  ## (Optional) Collect interval: (defaults to "30s").
  # interval = "30s"

配置好后,重启 DataKit 即可。

目前可以通过 ConfigMap 方式注入采集器配置来开启采集器。

指标

couchdb

Tags & Fields Description
code
(tag)
Code of HTTP responses, in 200 201 202 204 206 301 304 400 403 404 405 406 409 412 414 415 416 417 500 501 503.
host
(tag)
Host name.
instance
(tag)
Instance endpoint.
level
(tag)
Log lever, in alert critical debug emergency error info notice warning.
memory_type
(tag)
Erlang memory type, in total processes processes_used system atom atom_used binary code ets
method
(tag)
HTTP requests type, in COPY DELETE GET HEAD OPTIONS POST PUT.
quantile
(tag)
Histogram quantile.
stage
(tag)
Rexi stream stage, like init_stream.
auth_cache_hits_total Number of authentication cache hits.
Type: float | (count)
Unit: count
auth_cache_misses_total Number of authentication cache misses.
Type: float | (count)
Unit: count
auth_cache_requests_total Number of authentication cache requests.
Type: float | (count)
Unit: count
coalesced_updates_interactive Number of coalesced interactive updates.
Type: float | (count)
Unit: count
coalesced_updates_replicated Number of coalesced replicated updates.
Type: float | (count)
Unit: count
collect_results_time_seconds Microsecond latency for calls to couch_db:collect_results.
Type: float | (summary)
Unit: time,ms
commits_total Number of commits performed.
Type: float | (count)
Unit: count
couch_log_requests_total Number of logged level messages. level = alert critical debug emergency error info notice warning.
Type: float | (count)
Unit: count
couch_replicator_changes_manager_deaths_total Number of failed replicator changes managers.
Type: float | (count)
Unit: count
couch_replicator_changes_queue_deaths_total Number of failed replicator changes work queues.
Type: float | (count)
Unit: count
couch_replicator_changes_read_failures_total Number of failed replicator changes read failures.
Type: float | (count)
Unit: count
couch_replicator_changes_reader_deaths_total Number of failed replicator changes readers.
Type: float | (count)
Unit: count
couch_replicator_checkpoints_failure_total Number of failed checkpoint saves.
Type: float | (count)
Unit: count
couch_replicator_checkpoints_total Number of checkpoints successfully saves.
Type: float | (count)
Unit: count
couch_replicator_cluster_is_stable 1 if cluster is stable, 0 if unstable.
Type: float | (gauge)
Unit: count
couch_replicator_connection_acquires_total Number of times connections are shared.
Type: float | (count)
Unit: count
couch_replicator_connection_closes_total Number of times a worker is gracefully shut down.
Type: float | (count)
Unit: count
couch_replicator_connection_creates_total Number of connections created.
Type: float | (count)
Unit: count
couch_replicator_connection_owner_crashes_total Number of times a connection owner crashes while owning at least one connection.
Type: float | (count)
Unit: count
couch_replicator_connection_releases_total Number of times ownership of a connection is released.
Type: float | (count)
Unit: count
couch_replicator_connection_worker_crashes_total Number of times a worker unexpectedly terminates.
Type: float | (count)
Unit: count
couch_replicator_db_scans_total Number of times replicator db scans have been started.
Type: float | (count)
Unit: count
couch_replicator_docs_completed_state_updates_total Number of completed state document updates.
Type: float | (count)
Unit: count
couch_replicator_docs_db_changes_total Number of db changes processed by replicator doc processor.
Type: float | (count)
Unit: count
couch_replicator_docs_dbs_created_total Number of db shard creations seen by replicator doc processor.
Type: float | (count)
Unit: count
couch_replicator_docs_dbs_deleted_total Number of db shard deletions seen by replicator doc processor.
Type: float | (count)
Unit: count
couch_replicator_docs_dbs_found_total Number of db shard found by replicator doc processor.
Type: float | (count)
Unit: count
couch_replicator_docs_failed_state_updates_total Number of failed state document updates.
Type: float | (count)
Unit: count
couch_replicator_failed_starts_total Number of replications that have failed to start.
Type: float | (count)
Unit: count
couch_replicator_jobs_adds_total Number of jobs added to replicator scheduler.
Type: float | (count)
Unit: count
couch_replicator_jobs_crashed Replicator scheduler crashed jobs.
Type: float | (gauge)
Unit: count
couch_replicator_jobs_crashes_total Number of job crashed noticed by replicator scheduler.
Type: float | (count)
Unit: count
couch_replicator_jobs_duplicate_adds_total Number of duplicate jobs added to replicator scheduler.
Type: float | (count)
Unit: count
couch_replicator_jobs_pending Replicator scheduler pending jobs.
Type: float | (gauge)
Unit: count
couch_replicator_jobs_removes_total Number of jobs removed from replicator scheduler.
Type: float | (count)
Unit: count
couch_replicator_jobs_running Replicator scheduler running jobs.
Type: float | (gauge)
Unit: count
couch_replicator_jobs_starts_total Number of jobs started by replicator scheduler.
Type: float | (count)
Unit: count
couch_replicator_jobs_stops_total Number of jobs stopped by replicator scheduler.
Type: float | (count)
Unit: count
couch_replicator_jobs_total Total number of replicator scheduler jobs.
Type: float | (gauge)
Unit: count
couch_replicator_requests_total Number of HTTP requests made by the replicator.
Type: float | (count)
Unit: count
couch_replicator_responses_failure_total Number of failed HTTP responses received by the replicator.
Type: float | (count)
Unit: count
couch_replicator_responses_total Number of successful HTTP responses received by the replicator.
Type: float | (count)
Unit: count
couch_replicator_stream_responses_failure_total Number of failed streaming HTTP responses received by the replicator.
Type: float | (count)
Unit: count
couch_replicator_stream_responses_total Number of successful streaming HTTP responses received by the replicator.
Type: float | (count)
Unit: count
couch_replicator_worker_deaths_total Number of failed replicator workers.
Type: float | (count)
Unit: count
couch_replicator_workers_started_total Number of replicator workers started.
Type: float | (count)
Unit: count
couch_server_lru_skip_total Number of couch_server LRU operations skipped.
Type: float | (count)
Unit: count
database_purges_total Number of times a database was purged.
Type: float | (count)
Unit: count
database_reads_total Number of times a document was read from a database.
Type: float | (count)
Unit: count
database_writes_total Number of times a database was changed.
Type: float | (count)
Unit: count
db_open_time_seconds Milliseconds required to open a database.
Type: float | (summary)
Unit: time,ms
dbinfo_seconds Milliseconds required to DB info.
Type: float | (summary)
Unit: time,ms
ddoc_cache_hit_total Number of design doc cache hits.
Type: float | (count)
Unit: count
ddoc_cache_miss_total Number of design doc cache misses.
Type: float | (count)
Unit: count
ddoc_cache_recovery_total Number of design doc cache recoveries.
Type: float | (count)
Unit: count
ddoc_cache_requests_failures_total Number of design doc cache requests failures.
Type: float | (count)
Unit: count
ddoc_cache_requests_recovery_total Number of design doc cache requests recoveries.
Type: float | (count)
Unit: count
ddoc_cache_requests_total Number of design doc cache requests.
Type: float | (count)
Unit: count
document_inserts_total Number of documents inserted.
Type: float | (count)
Unit: count
document_purges_failure_total Number of failed document purge operations.
Type: float | (count)
Unit: count
document_purges_success_total Number of successful document purge operations.
Type: float | (count)
Unit: count
document_purges_total_total Number of total document purge operations.
Type: float | (count)
Unit: count
document_writes_total Number of document write operations.
Type: float | (count)
Unit: count
dreyfus_httpd_search_seconds Distribution of overall search request latency as experienced by the end user.
Type: float | (summary)
Unit: time,ms
dreyfus_index_await_seconds Length of an dreyfus_index await request.
Type: float | (summary)
Unit: time,ms
dreyfus_index_group1_seconds Length of an dreyfus_index group1 request.
Type: float | (summary)
Unit: time,ms
dreyfus_index_group2_seconds Length of an dreyfus_index group2 request.
Type: float | (summary)
Unit: time,ms
dreyfus_index_info_seconds Length of an dreyfus_index info request.
Type: float | (summary)
Unit: time,ms
dreyfus_index_search_seconds Length of an dreyfus_index search request.
Type: float | (summary)
Unit: time,ms
dreyfus_rpc_group1_seconds Length of a group1 RPC worker.
Type: float | (summary)
Unit: time,ms
dreyfus_rpc_group2_seconds Length of a group2 RPC worker.
Type: float | (summary)
Unit: time,ms
dreyfus_rpc_info_seconds Length of an info RPC worker.
Type: float | (summary)
Unit: time,ms
dreyfus_rpc_search_seconds Length of a search RPC worker.
Type: float | (summary)
Unit: time,ms
erlang_context_switches_total Total number of context switches.
Type: float | (count)
Unit: count
erlang_dirty_cpu_scheduler_queues The total size of all dirty CPU scheduler run queues.
Type: float | (gauge)
Unit: count
erlang_distribution_recv_avg_bytes Average size of packets, in bytes, received by the socket.
Type: float | (gauge)
Unit: digital,B
erlang_distribution_recv_cnt_packets_total Number of packets received by the socket.
Type: float | (count)
Unit: count
erlang_distribution_recv_dvi_bytes Average packet size deviation, in bytes, received by the socket.
Type: float | (gauge)
Unit: digital,B
erlang_distribution_recv_max_bytes Size of the largest packet, in bytes, received by the socket.
Type: float | (gauge)
Unit: digital,B
erlang_distribution_recv_oct_bytes_total Number of bytes received by the socket.
Type: float | (count)
Unit: digital,B
erlang_distribution_send_avg_bytes Average size of packets, in bytes, sent by the socket.
Type: float | (gauge)
Unit: digital,B
erlang_distribution_send_cnt_packets_total Number of packets sent by the socket.
Type: float | (count)
Unit: count
erlang_distribution_send_max_bytes Size of the largest packet, in bytes, sent by the socket.
Type: float | (gauge)
Unit: digital,B
erlang_distribution_send_oct_bytes_total Number of bytes sent by the socket.
Type: float | (count)
Unit: digital,B
erlang_distribution_send_pend_bytes Number of bytes waiting to be sent by the socket.
Type: float | (gauge)
Unit: digital,B
erlang_ets_table Number of ETS tables.
Type: float | (gauge)
Unit: count
erlang_gc_collections_total Number of garbage collections by the Erlang emulator.
Type: float | (count)
Unit: count
erlang_gc_words_reclaimed_total Number of words reclaimed by garbage collections.
Type: float | (count)
Unit: count
erlang_io_recv_bytes_total The total number of bytes received through ports.
Type: float | (count)
Unit: digital,B
erlang_io_sent_bytes_total The total number of bytes output to ports.
Type: float | (count)
Unit: digital,B
erlang_memory_bytes Size of memory (in bytes) dynamically allocated by the Erlang emulator.
Type: float | (gauge)
Unit: digital,B
erlang_message_queue_max Maximum size across all message queues.
Type: float | (gauge)
Unit: count
erlang_message_queue_min Minimum size across all message queues.
Type: float | (gauge)
Unit: count
erlang_message_queue_size Size of message queue.
Type: float | (gauge)
Unit: count
erlang_message_queues Total size of all message queues.
Type: float | (gauge)
Unit: count
erlang_process_limit The maximum number of simultaneously existing Erlang processes.
Type: float | (gauge)
Unit: count
erlang_processes The number of Erlang processes.
Type: float | (gauge)
Unit: count
erlang_reductions_total Total number of reductions.
Type: float | (count)
Unit: count
erlang_scheduler_queues The total size of all normal run queues.
Type: float | (gauge)
Unit: count
fabric_doc_update_errors_total Number of document update errors.
Type: float | (count)
Unit: count
fabric_doc_update_mismatched_errors_total Number of document update errors with multiple error types.
Type: float | (count)
Unit: count
fabric_doc_update_write_quorum_errors_total Number of write quorum errors.
Type: float | (count)
Unit: count
fabric_open_shard_timeouts_total Number of open shard timeouts.
Type: float | (count)
Unit: count
fabric_read_repairs_failures_total Number of failed read repair operations.
Type: float | (count)
Unit: count
fabric_read_repairs_total Number of successful read repair operations.
Type: float | (count)
Unit: count
fabric_worker_timeouts_total Number of worker timeouts.
Type: float | (count)
Unit: count
fsync_count_total Number of fsync calls.
Type: float | (count)
Unit: count
fsync_time Microseconds to call fsync.
Type: float | (summary)
Unit: time,ms
global_changes_db_writes_total Number of db writes performed by global changes.
Type: float | (count)
Unit: count
global_changes_event_doc_conflict_total Number of conflicted event docs encountered by global changes.
Type: float | (count)
Unit: count
global_changes_listener_pending_updates Number of global changes updates pending writes in global_changes_listener.
Type: float | (gauge)
Unit: count
global_changes_rpcs_total Number of rpc operations performed by global_changes.
Type: float | (count)
Unit: count
global_changes_server_pending_updates Number of global changes updates pending writes in global_changes_server.
Type: float | (gauge)
Unit: count
httpd_aborted_requests_total Number of aborted requests.
Type: float | (count)
Unit: count
httpd_all_docs_timeouts_total Number of HTTP all_docs timeouts.
Type: float | (count)
Unit: count
httpd_bulk_docs_seconds Distribution of the number of docs in _bulk_docs requests.
Type: float | (summary)
Unit: time,ms
httpd_bulk_requests_total Number of bulk requests.
Type: float | (count)
Unit: count
httpd_clients_requesting_changes_total Number of clients for continuous _changes.
Type: float | (count)
Unit: count
httpd_dbinfo Distribution of latencies for calls to retrieve DB info.
Type: float | (summary)
Unit: time,ms
httpd_explain_timeouts_total Number of HTTP _explain timeouts.
Type: float | (count)
Unit: count
httpd_find_timeouts_total Number of HTTP find timeouts.
Type: float | (count)
Unit: count
httpd_partition_all_docs_requests_total Number of partition HTTP _all_docs requests.
Type: float | (count)
Unit: count
httpd_partition_all_docs_timeouts_total Number of partition HTTP all_docs timeouts.
Type: float | (count)
Unit: count
httpd_partition_explain_requests_total Number of partition HTTP _explain requests.
Type: float | (count)
Unit: count
httpd_partition_explain_timeouts_total Number of partition HTTP _explain timeouts.
Type: float | (count)
Unit: count
httpd_partition_find_requests_total Number of partition HTTP _find requests.
Type: float | (count)
Unit: count
httpd_partition_find_timeouts_total Number of partition HTTP find timeouts.
Type: float | (count)
Unit: count
httpd_partition_view_requests_total Number of partition HTTP view requests.
Type: float | (count)
Unit: count
httpd_partition_view_timeouts_total Number of partition HTTP view timeouts.
Type: float | (count)
Unit: count
httpd_purge_requests_total Number of purge requests.
Type: float | (count)
Unit: count
httpd_request_methods Number of HTTP option requests. option = COPY DELETE GET HEAD OPTIONS POST PUT.
Type: float | (count)
Unit: count
httpd_requests_total Number of HTTP requests.
Type: float | (count)
Unit: count
httpd_status_codes Number of HTTP status_codes responses. status_codes = 200 201 202 204 206 301 304 400 403 404 405 406 409 412 414 415 416 417 500 501 503.
Type: float | (count)
Unit: count
httpd_temporary_view_reads_total Number of temporary view reads.
Type: float | (count)
Unit: count
httpd_view_reads_total Number of view reads.
Type: float | (count)
Unit: count
httpd_view_timeouts_total Number of HTTP view timeouts.
Type: float | (count)
Unit: count
io_queue2_search_count_total Search IO directly triggered by client requests.
Type: float | (count)
Unit: count
io_queue_search_total Search IO directly triggered by client requests.
Type: float | (count)
Unit: count
legacy_checksums Number of legacy checksums found in couch_file instances.
Type: float | (count)
Unit: count
local_document_writes_total Number of document write operations.
Type: float | (count)
Unit: count
mango_docs_examined_total Number of documents examined by mango queries coordinated by this node.
Type: float | (count)
Unit: count
mango_evaluate_selector_total Number of mango selector evaluations.
Type: float | (count)
Unit: count
mango_keys_examined_total Number of keys examined by mango queries coordinated by this node.
Type: float | (count)
Unit: count
mango_query_invalid_index_total Number of mango queries that generated an invalid index warning.
Type: float | (count)
Unit: count
mango_query_time_seconds Length of time processing a mango query.
Type: float | (summary)
Unit: time,ms
mango_quorum_docs_examined_total Number of documents examined by mango queries, using cluster quorum.
Type: float | (count)
Unit: count
mango_results_returned_total Number of rows returned by mango queries.
Type: float | (count)
Unit: count
mango_too_many_docs_scanned_total Number of mango queries that generated an index scan warning.
Type: float | (count)
Unit: count
mango_unindexed_queries_total Number of mango queries that could not use an index.
Type: float | (count)
Unit: count
mem3_shard_cache_eviction_total Number of shard cache evictions.
Type: float | (count)
Unit: count
mem3_shard_cache_hit_total Number of shard cache hits.
Type: float | (count)
Unit: count
mem3_shard_cache_miss_total Number of shard cache misses.
Type: float | (count)
Unit: count
mrview_emits_total Number of invocations of emit in map functions in the view server.
Type: float | (count)
Unit: count
mrview_map_doc_total Number of documents mapped in the view server.
Type: float | (count)
Unit: count
nouveau_active_searches_total Number of active search requests.
Type: float | (count)
Unit: count
nouveau_search_latency Distribution of overall search request latency as experienced by the end user.
Type: float | (summary)
Unit: time,ms
open_databases_total Number of open databases.
Type: float | (count)
Unit: count
open_os_files_total Number of file descriptors CouchDB has open.
Type: float | (count)
Unit: count
pread_exceed_eof_total Number of the attempts to read beyond end of db file.
Type: float | (count)
Unit: count
pread_exceed_limit_total Number of the attempts to read beyond set limit.
Type: float | (count)
Unit: count
query_server_acquired_processes_total Number of acquired external processes.
Type: float | (count)
Unit: count
query_server_process_errors_total Number of OS error process exits.
Type: float | (count)
Unit: count
query_server_process_exists_total Number of OS normal process exits.
Type: float | (count)
Unit: count
query_server_process_prompt_errors_total Number of OS process prompt errors.
Type: float | (count)
Unit: count
query_server_process_prompts_total Number of successful OS process prompts.
Type: float | (count)
Unit: count
query_server_process_starts_total Number of OS process starts.
Type: float | (count)
Unit: count
query_server_vdu_process_time_seconds Duration of validate_doc_update function calls.
Type: float | (summary)
Unit: time,ms
query_server_vdu_rejects_total Number of rejections by validate_doc_update function.
Type: float | (count)
Unit: count
request_time_seconds Length of a request inside CouchDB without MochiWeb.
Type: float | (summary)
Unit: time,d
rexi_buffered_total Number of rexi messages buffered.
Type: float | (count)
Unit: count
rexi_down_total Number of rexi_DOWN messages handled.
Type: float | (count)
Unit: count
rexi_dropped_total Number of rexi messages dropped from buffers.
Type: float | (count)
Unit: count
rexi_streams_timeout_stream_total Number of rexi stream timeouts.
Type: float | (count)
Unit: count
rexi_streams_timeout_total Number of rexi stream initialization timeouts.
Type: float | (count)
Unit: count
rexi_streams_timeout_wait_for_ack_total Number of rexi stream timeouts while waiting for acks.
Type: float | (count)
Unit: count
uptime_seconds CouchDB uptime.
Type: float | (count)
Unit: time,s

文档评价

文档内容是否对您有帮助? ×