---
title: Telegraf Documentation
description: Telegraf plugin for collecting metrics from Couchbase
url: https://docs.influxdata.com/telegraf/v1/input-plugins/couchbase/
estimated_tokens: 3550
product: Telegraf
version: v1
---

-   Telegraf v0.12.0+

# Couchbase Input Plugin

This plugin collects metrics from [Couchbase](https://www.couchbase.com/), a distributed NoSQL database. Metrics are collected for each node, as well as detailed metrics for each bucket, for a given couchbase server.

**Introduced in:** Telegraf v0.12.0 **Tags:** server **OS support:** all

## Global configuration options

Plugins support additional global and plugin configuration settings for tasks such as modifying metrics, tags, and fields, creating aliases, and configuring plugin ordering. See [CONFIGURATION.md](/telegraf/v1/configuration/#plugins) for more details.

## Configuration

```toml
# Read per-node and per-bucket metrics from Couchbase
[[inputs.couchbase]]
  ## specify servers via a url matching:
  ##  [protocol://]()@address[:port]
  ##  e.g.
  ##    http://couchbase-0.example.com/
  ##    http://admin:secret@couchbase-0.example.com:8091/
  ##
  ## If no servers are specified, then localhost is used as the host.
  ## If no protocol is specified, HTTP is used.
  ## If no port is specified, 8091 is used.
  servers = ["http://localhost:8091"]

  ## Filter bucket fields to include only here.
  # bucket_stats_included = ["quota_percent_used", "ops_per_sec", "disk_fetches", "item_count", "disk_used", "data_used", "mem_used"]

  ## Optional TLS Config
  # tls_ca = "/etc/telegraf/ca.pem"
  # tls_cert = "/etc/telegraf/cert.pem"
  # tls_key = "/etc/telegraf/key.pem"
  ## Use TLS but skip chain & host verification (defaults to false)
  ## If set to false, tls_cert and tls_key are required
  # insecure_skip_verify = false

  ## Whether to collect cluster-wide bucket statistics
  ## It is recommended to disable this in favor of node_stats
  ## to get a better view of the cluster.
  # cluster_bucket_stats = true

  ## Whether to collect bucket stats for each individual node
  # node_bucket_stats = false

  ## List of additional stats to collect, choose from:
  ##  * autofailover
  # additional_stats = []
```

## Metrics

### couchbase\_node

Tags:

-   cluster: sanitized string from `servers` configuration field e.g.: `http://user:password@couchbase-0.example.com:8091/endpoint` becomes `http://couchbase-0.example.com:8091/endpoint`
-   hostname: Couchbase’s name for the node and port, e.g., `172.16.10.187:8091`

Fields:

-   memory\_free (unit: bytes, example: 23181365248.0)
-   memory\_total (unit: bytes, example: 64424656896.0)

### couchbase\_autofailover

Tags:

-   cluster: sanitized string from `servers` configuration field e.g.: `http://user:password@couchbase-0.example.com:8091/endpoint` becomes `http://couchbase-0.example.com:8091/endpoint`

Fields:

-   count (unit: int, example: 1)
-   enabled (unit: bool, example: true)
-   max\_count (unit: int, example: 2)
-   timeout (unit: int, example: 72)

### couchbase\_bucket and couchbase\_node\_bucket

Tags:

-   cluster: whatever you called it in `servers` in the configuration, e.g. `http://couchbase-0.example.com/`
-   bucket: the name of the couchbase bucket, e.g., `blastro-df`
-   hostname: the hostname of the node the bucket metrics were collected from, e.g. `172.16.10.187:8091` (only present in `couchbase_node_bucket`)

Default bucket fields:

-   quota\_percent\_used (unit: percent, example: 68.85424936294555)
-   ops\_per\_sec (unit: count, example: 5686.789686789687)
-   disk\_fetches (unit: count, example: 0.0)
-   item\_count (unit: count, example: 943239752.0)
-   disk\_used (unit: bytes, example: 409178772321.0)
-   data\_used (unit: bytes, example: 212179309111.0)
-   mem\_used (unit: bytes, example: 202156957464.0)

Additional fields that can be configured with the `bucket_stats_included` option:

-   couch\_total\_disk\_size
-   couch\_docs\_fragmentation
-   couch\_views\_fragmentation
-   hit\_ratio
-   ep\_cache\_miss\_rate
-   ep\_resident\_items\_rate
-   vb\_avg\_active\_queue\_age
-   vb\_avg\_replica\_queue\_age
-   vb\_avg\_pending\_queue\_age
-   vb\_avg\_total\_queue\_age
-   vb\_active\_resident\_items\_ratio
-   vb\_replica\_resident\_items\_ratio
-   vb\_pending\_resident\_items\_ratio
-   avg\_disk\_update\_time
-   avg\_disk\_commit\_time
-   avg\_bg\_wait\_time
-   avg\_active\_timestamp\_drift
-   avg\_replica\_timestamp\_drift
-   ep\_dcp\_views+indexes\_count
-   ep\_dcp\_views+indexes\_items\_remaining
-   ep\_dcp\_views+indexes\_producer\_count
-   ep\_dcp\_views+indexes\_total\_backlog\_size
-   ep\_dcp\_views+indexes\_items\_sent
-   ep\_dcp\_views+indexes\_total\_bytes
-   ep\_dcp\_views+indexes\_backoff
-   bg\_wait\_count
-   bg\_wait\_total
-   bytes\_read
-   bytes\_written
-   cas\_badval
-   cas\_hits
-   cas\_misses
-   cmd\_get
-   cmd\_lookup
-   cmd\_set
-   couch\_docs\_actual\_disk\_size
-   couch\_docs\_data\_size
-   couch\_docs\_disk\_size
-   couch\_spatial\_data\_size
-   couch\_spatial\_disk\_size
-   couch\_spatial\_ops
-   couch\_views\_actual\_disk\_size
-   couch\_views\_data\_size
-   couch\_views\_disk\_size
-   couch\_views\_ops
-   curr\_connections
-   curr\_items
-   curr\_items\_tot
-   decr\_hits
-   decr\_misses
-   delete\_hits
-   delete\_misses
-   disk\_commit\_count
-   disk\_commit\_total
-   disk\_update\_count
-   disk\_update\_total
-   disk\_write\_queue
-   ep\_active\_ahead\_exceptions
-   ep\_active\_hlc\_drift
-   ep\_active\_hlc\_drift\_count
-   ep\_bg\_fetched
-   ep\_clock\_cas\_drift\_threshold\_exceeded
-   ep\_data\_read\_failed
-   ep\_data\_write\_failed
-   ep\_dcp\_2i\_backoff
-   ep\_dcp\_2i\_count
-   ep\_dcp\_2i\_items\_remaining
-   ep\_dcp\_2i\_items\_sent
-   ep\_dcp\_2i\_producer\_count
-   ep\_dcp\_2i\_total\_backlog\_size
-   ep\_dcp\_2i\_total\_bytes
-   ep\_dcp\_cbas\_backoff
-   ep\_dcp\_cbas\_count
-   ep\_dcp\_cbas\_items\_remaining
-   ep\_dcp\_cbas\_items\_sent
-   ep\_dcp\_cbas\_producer\_count
-   ep\_dcp\_cbas\_total\_backlog\_size
-   ep\_dcp\_cbas\_total\_bytes
-   ep\_dcp\_eventing\_backoff
-   ep\_dcp\_eventing\_count
-   ep\_dcp\_eventing\_items\_remaining
-   ep\_dcp\_eventing\_items\_sent
-   ep\_dcp\_eventing\_producer\_count
-   ep\_dcp\_eventing\_total\_backlog\_size
-   ep\_dcp\_eventing\_total\_bytes
-   ep\_dcp\_fts\_backoff
-   ep\_dcp\_fts\_count
-   ep\_dcp\_fts\_items\_remaining
-   ep\_dcp\_fts\_items\_sent
-   ep\_dcp\_fts\_producer\_count
-   ep\_dcp\_fts\_total\_backlog\_size
-   ep\_dcp\_fts\_total\_bytes
-   ep\_dcp\_other\_backoff
-   ep\_dcp\_other\_count
-   ep\_dcp\_other\_items\_remaining
-   ep\_dcp\_other\_items\_sent
-   ep\_dcp\_other\_producer\_count
-   ep\_dcp\_other\_total\_backlog\_size
-   ep\_dcp\_other\_total\_bytes
-   ep\_dcp\_replica\_backoff
-   ep\_dcp\_replica\_count
-   ep\_dcp\_replica\_items\_remaining
-   ep\_dcp\_replica\_items\_sent
-   ep\_dcp\_replica\_producer\_count
-   ep\_dcp\_replica\_total\_backlog\_size
-   ep\_dcp\_replica\_total\_bytes
-   ep\_dcp\_views\_backoff
-   ep\_dcp\_views\_count
-   ep\_dcp\_views\_items\_remaining
-   ep\_dcp\_views\_items\_sent
-   ep\_dcp\_views\_producer\_count
-   ep\_dcp\_views\_total\_backlog\_size
-   ep\_dcp\_views\_total\_bytes
-   ep\_dcp\_xdcr\_backoff
-   ep\_dcp\_xdcr\_count
-   ep\_dcp\_xdcr\_items\_remaining
-   ep\_dcp\_xdcr\_items\_sent
-   ep\_dcp\_xdcr\_producer\_count
-   ep\_dcp\_xdcr\_total\_backlog\_size
-   ep\_dcp\_xdcr\_total\_bytes
-   ep\_diskqueue\_drain
-   ep\_diskqueue\_fill
-   ep\_diskqueue\_items
-   ep\_flusher\_todo
-   ep\_item\_commit\_failed
-   ep\_kv\_size
-   ep\_max\_size
-   ep\_mem\_high\_wat
-   ep\_mem\_low\_wat
-   ep\_meta\_data\_memory
-   ep\_num\_non\_resident
-   ep\_num\_ops\_del\_meta
-   ep\_num\_ops\_del\_ret\_meta
-   ep\_num\_ops\_get\_meta
-   ep\_num\_ops\_set\_meta
-   ep\_num\_ops\_set\_ret\_meta
-   ep\_num\_value\_ejects
-   ep\_oom\_errors
-   ep\_ops\_create
-   ep\_ops\_update
-   ep\_overhead
-   ep\_queue\_size
-   ep\_replica\_ahead\_exceptions
-   ep\_replica\_hlc\_drift
-   ep\_replica\_hlc\_drift\_count
-   ep\_tmp\_oom\_errors
-   ep\_vb\_total
-   evictions
-   get\_hits
-   get\_misses
-   incr\_hits
-   incr\_misses
-   mem\_used
-   misses
-   ops
-   timestamp
-   vb\_active\_eject
-   vb\_active\_itm\_memory
-   vb\_active\_meta\_data\_memory
-   vb\_active\_num
-   vb\_active\_num\_non\_resident
-   vb\_active\_ops\_create
-   vb\_active\_ops\_update
-   vb\_active\_queue\_age
-   vb\_active\_queue\_drain
-   vb\_active\_queue\_fill
-   vb\_active\_queue\_size
-   vb\_active\_sync\_write\_aborted\_count
-   vb\_active\_sync\_write\_accepted\_count
-   vb\_active\_sync\_write\_committed\_count
-   vb\_pending\_curr\_items
-   vb\_pending\_eject
-   vb\_pending\_itm\_memory
-   vb\_pending\_meta\_data\_memory
-   vb\_pending\_num
-   vb\_pending\_num\_non\_resident
-   vb\_pending\_ops\_create
-   vb\_pending\_ops\_update
-   vb\_pending\_queue\_age
-   vb\_pending\_queue\_drain
-   vb\_pending\_queue\_fill
-   vb\_pending\_queue\_size
-   vb\_replica\_curr\_items
-   vb\_replica\_eject
-   vb\_replica\_itm\_memory
-   vb\_replica\_meta\_data\_memory
-   vb\_replica\_num
-   vb\_replica\_num\_non\_resident
-   vb\_replica\_ops\_create
-   vb\_replica\_ops\_update
-   vb\_replica\_queue\_age
-   vb\_replica\_queue\_drain
-   vb\_replica\_queue\_fill
-   vb\_replica\_queue\_size
-   vb\_total\_queue\_age
-   xdc\_ops
-   allocstall
-   cpu\_cores\_available
-   cpu\_irq\_rate
-   cpu\_stolen\_rate
-   cpu\_sys\_rate
-   cpu\_user\_rate
-   cpu\_utilization\_rate
-   hibernated\_requests
-   hibernated\_waked
-   mem\_actual\_free
-   mem\_actual\_used
-   mem\_free
-   mem\_limit
-   mem\_total
-   mem\_used\_sys
-   odp\_report\_failed
-   rest\_requests
-   swap\_total
-   swap\_used

## Example Output

```text
couchbase_node,cluster=http://localhost:8091/,hostname=172.17.0.2:8091 memory_free=7705575424,memory_total=16558182400 1547829754000000000
couchbase_bucket,bucket=beer-sample,cluster=http://localhost:8091/ quota_percent_used=27.09285736083984,ops_per_sec=0,disk_fetches=0,item_count=7303,disk_used=21662946,data_used=9325087,mem_used=28408920 1547829754000000000
```

#### Related

-   [Configure plugins](/telegraf/v1/configure_plugins/)
-   [Couchbase Plugin Source](https://github.com/influxdata/telegraf/tree/v1.38.4/plugins/inputs/couchbase/README.md)
