Skip to main content

Couchbase - Classic Collector

Thumbnail icon

Couchbase, a modern database for enterprise applications, is a distributed document database with a powerful search engine and in-built operational and analytical capabilities. It brings the power of NoSQL to the edge and provides fast, efficient bidirectional synchronization of data between the edge and the cloud.

The Sumo Logic app for Couchbase helps you monitor activity in Couchbase. The pre-configured dashboards provide insight into the Health of the Cluster, the Status of the Buckets, I/O of Reading/Writing, Errors, the Events of Couchbase Servers that help you understand your clusters.

This app has been tested with the following Couchbase with Telegraf versions:

  • Kubernetes: Couchbase version: 7.0.2 - enterprise with Telegraf version 1.21.1
  • Non-Kubernetes: Couchbase version: 7.0.2 - enterprise with Telegraf version 1.21.1
note

Telegraf 1.14 default of Kubernetes Collection will not work.

Collecting logs and metrics for the Couchbase app

This section provides instructions for configuring log and metric collection for the Sumo Logic app for Couchbase.

Configure Collection for Couchbase

Sumo Logic supports the collection of logs and metrics data from Couchbase in both Kubernetes and non-Kubernetes environments. Click on the appropriate tab below based on the environment where your Couchbase clusters are hosted.

The following diagram illustrates how data is collected from Couchbase in Kubernetes environments. There are four services that make up the metric collection pipeline: Telegraf, Telegraf Operator, Prometheus, and Sumo Logic Distribution for OpenTelemetry Collector.

couchbase1

The first service in the metrics pipeline is Telegraf. Telegraf collects metrics from Couchbase. Note that we’re running Telegraf in each pod we want to collect metrics from as a sidecar deployment that is Telegraf runs in the same pod as the containers it monitors. Telegraf uses the Couchbase input plugin to obtain metrics. For simplicity, the diagram doesn’t show the input plugins. The injection of the Telegraf sidecar container is done by the Telegraf Operator. Prometheus pulls metrics from Telegraf and sends them to Sumo Logic Distribution for OpenTelemetry Collector which enriches metadata and sends metrics to Sumo Logic.

In the logs pipeline, Sumo Logic Distribution for OpenTelemetry Collector collects logs written to standard out and forwards them to another instance of Sumo Logic Distribution for OpenTelemetry Collector, which enriches metadata and sends logs to Sumo Logic.

Prerequisites

It’s assumed that you are using the latest helm chart version if not, upgrade using the instructions here. When you upgrade the helm chart, you must upgrade telegraf version to 1.21.1 by adding the statement below in the upgrade command helm chart:

--set telegraf-operator.image.sidecarImage=telegraf:1.21.1

Configure Metrics Collection

To collect Couchbase metrics from a Kubernetes environment, we use the Telegraf Operator, which is packaged with our Kubernetes collection. You can learn more about this here.

  1. Set up Kubernetes Collection with the Telegraf Operator.
  2. On your Couchbase Pods, add the following annotations:
annotations:
telegraf.influxdata.com/class: sumologic-prometheus
prometheus.io/scrape: "true"
prometheus.io/port: "9273"
telegraf.influxdata.com/inputs: |+
[[inputs.couchbase]]
servers = ["http://<USER_TO_BE_CHANGED>:<PASS_TO_BE_CHANGED>@A@localhost:8091"]
bucket_stats_included = ["*"]
[inputs.couchbase.tags]
db_cluster ="ENV_TO_BE_CHANGED"--If you haven’t defined a cluster in Couchbase, enter `default`
component ="database"
environment ="ENV_TO_BE_CHANGED"
db_system ="couchbase"
db_cluster_address = "ENV_TO_BE_CHANGED"
db_cluster_port = "ENV_TO_BE_CHANGED"
  1. Enter in values for the following parameters (marked ENV_TO_BE_CHANGED above):
  • telegraf.influxdata.com/inputs. This contains the required configuration for the Telegraf Couchbase Input plugin. Refer to this doc for more information on configuring the Couchbase input plugin for Telegraf. Note: As telegraf will be run as a sidecar, the host should always be localhost.

  • In the Input plugins section ([[inputs.couchbase]]):

    • servers: This is the endpoint of the management portal of couchbase server. For detail, see this doc .
  • In the tags section ([inputs.couchbase.tags]):

    • environment. This is the deployment environment where the Couchbase cluster identified by the value of servers resides. For example: dev, prod or qa. While this value is optional we highly recommend setting it.
    • db_cluster. Enter a name to identify this Couchbase cluster. This cluster name will be shown in the Sumo Logic dashboards.
    • db_cluster_address - Enter the cluster hostname or ip address that is used by the application to connect to the database. It could also be the load balancer or proxy endpoint.
    • db_cluster_port - Enter the database port. If not provided, a default port will be used.
    note

    db_cluster_address and db_cluster_port should reflect exact configuration of DB client configuration in your application, especially if you instrument it with OT tracing. The values of these fields should match exactly the connection string used by the database client (reported as values for net.peer.name and net.peer.port metadata fields). For example, if your application uses “couchbase-prod.sumologic.com:3306” as the connection string, the field values should be set as follows: db_cluster_address=couchbase-prod.sumologic.com db_cluster_port=3306

    If your application connects directly to a given Couchbase node, rather than the whole cluster, use the application connection string to override the value of the “host” field in the Telegraf configuration: host=couchbase-prod.sumologic.com

    Pivoting to Tracing data from Entity Inspector is possible only for “Couchbase address” Entities.

  • Do not modify the following values as it will cause the Sumo Logic apps to not function correctly.

    • telegraf.influxdata.com/class: sumologic-prometheus. This instructs the Telegraf operator what output to use. This should not be changed.
    • prometheus.io/scrape: "true". This ensures our Prometheus will scrape the metrics.
    • prometheus.io/port: "9273". This tells prometheus what ports to scrape on. This should not be changed.
    • telegraf.influxdata.com/inputs.- In the tags section ([inputs.couchbase.tags]):
      • component: “database” - This value is used by Sumo Logic apps to identify application components.
      • db_system: “couchbase” - This value identifies the database system.
  • See this doc for more parameters that can be configured in the Telegraf agent globally.

  1. Sumo Logic Kubernetes collection will automatically start collecting metrics from the pods having the labels and annotations defined in the previous step.
  2. Verify metrics in Sumo Logic.

Configure Logs Collection

This section explains the steps to collect Couchbase logs from a Kubernetes environment.

  1. Add labels on your Couchbase pods to capture logs from standard output on Kubernetes (recommended).

    1. Apply following labels to the Couchbase pod:
    environment = "prod_CHANGEME"
    component = "database"
    db_system = "couchbase"
    db_cluster = "<cluster_CHANGEME>"
    db_cluster_address: <your cluster’s hostname or ip address or service endpoint>
    db_cluster_port: <database port>
    1. Enter in values for the following parameters (marked CHANGE_ME above):
    • environment. This is the deployment environment where the Couchbase cluster identified by the value of servers resides. For example:- dev, prod, or QA. While this value is optional we highly recommend setting it.
    • db_cluster. Enter a name to identify this Couchbase cluster. This cluster name will be shown in the Sumo Logic dashboards. If you haven’t defined a cluster in Couchbase, then enter default for db_cluster.
    • db_cluster_address - Enter the cluster hostname or ip address that is used by the application to connect to the database. It could also be the load balancer or proxy endpoint.
    • db_cluster_port - Enter the database port. If not provided, a default port will be used.
    note

    db_cluster_address and db_cluster_port should reflect exact configuration of DB client configuration in your application, especially if you instrument it with OT tracing. The values of these fields should match exactly the connection string used by the database client (reported as values for net.peer.name and net.peer.port metadata fields). For example, if your application uses “couchbase-prod.sumologic.com:3306” as the connection string, the field values should be set as follows: db_cluster_address=couchbase-prod.sumologic.com db_cluster_port=3306.

    If your application connects directly to a given Couchbase node, rather than the whole cluster, use the application connection string to override the value of the “host” field in the Telegraf configuration: host=couchbase-prod.sumologic.com.

    Pivoting to Tracing data from Entity Inspector is possible only for “Couchbase address” Entities.

    • Do not modify the following values as it will cause the Sumo Logic apps to not function correctly.
    • component: “database” - This value is used by Sumo Logic apps to identify application components.
    • db_system: “couchbase” - This value identifies the database system. See this doc for more parameters that can be configured in the Telegraf agent globally.
    1. The Sumologic-Kubernetes-Collection will automatically capture the logs from stdout and will send the logs to Sumologic. For more information on deploying Sumologic-Kubernetes-Collection, visit here.
    2. Verify logs in Sumo Logic.
  2. Collecting Couchbase Logs from a Log File on Kubernetes (optional).

    1. Determine the location of the Couchbase log file on Kubernetes. This can be determined from the config file /opt/couchbase/etc/couchbase/static_config squid.conf for your Couchbase cluster along with the mounts on the Couchbase pods.
    2. Install the Sumo Logic tailing sidecar operator.
    3. Add the following annotation in addition to the existing annotations.
    annotations:
    tailing-sidecar: sidecarconfig;<mount>:<path_of_Couchbase_log_file>/<Couchbase_log_file_name>

    Example:

    annotations:
    tailing-sidecar: sidecarconfig;data:/opt/couchbase/var/lib/couchbase/logs/audit.log
    1. Make sure that the Couchbase pods are running and annotations are applied by using the command:
    kubectl describe pod <Couchbase_pod_name>
    1. Sumo Logic Kubernetes collection will automatically start collecting logs from the pods having the annotations defined above.
    2. Verify logs in Sumo Logic.


FER to normalize the fields in Kubernetes environments. Labels created in Kubernetes environments automatically are prefixed with pod_labels. To normalize these for our app to work, a Field Extraction Rule named AppObservabilityCouchbaseDatabaseFER is automatically created for Database Application Components.


Installing the Couchbase app

This section demonstrates how to install the Couchbase app.

To install the app, do the following:

note

Next-Gen App: To install or update the app, you must be an account administrator or a user with Manage Apps, Manage Monitors, Manage Fields, Manage Metric Rules, and Manage Collectors capabilities depending upon the different content types part of the app.

  1. Select App Catalog.
  2. In the 🔎 Search Apps field, run a search for your desired app, then select it.
  3. Click Install App.
    note

    Sometimes this button says Add Integration.

  4. Click Next in the Setup Data section.
  5. In the Configure section of your respective app, complete the following fields.
    1. Is K8S deployment involved. Specify if resources being monitored are partially or fully deployed on Kubernetes (K8s)
  6. Click Next. You will be redirected to the Preview & Done section.

Post-installation

Once your app is installed, it will appear in your Installed Apps folder, and dashboard panels will start to fill automatically.

Each panel slowly fills with data matching the time range query received since the panel was created. Results will not immediately be available but will be updated with full graphs and charts over time.

As part of the app installation process, the following fields will be created by default:

  • component
  • environment
  • db_system
  • db_cluster
  • pod
  • db_cluster_address
  • db_cluster_port

Additionally, if you're using Couchbase in the Kubernetes environment, the following additional fields will be created by default during the app installation process:

  • pod_labels_component
  • pod_labels_environment
  • pod_labels_db_system
  • pod_labels_db_cluster
  • pod_labels_db_cluster_address
  • pod_labels_db_cluster_port

For information on setting up fields, see Fields.

Viewing Couchbase Dashboards

All dashboards have a set of filters that you can apply to the entire dashboard. Use these filters to drill down and examine the data to a granular level.

  • You can change the time range for a dashboard or panel by selecting a predefined interval from a drop-down list, choosing a recently used time range, or specifying custom dates and times. Learn more.
  • You can use template variables to drill down and examine the data on a granular level. For more information, see Filtering Dashboards with Template Variables.
  • Most Next-Gen apps allow you to provide the scope at the installation time and are comprised of a key (_sourceCategory by default) and a default value for this key. Based on your input, the app dashboards will be parameterized with a dashboard variable, allowing you to change the dataset queried by all panels. This eliminates the need to create multiple copies of the same dashboard with different queries.

Overview

The Couchbase - Overview dashboard provides an at-a-glance view of the health of the Couchbase clusters and servers, performance, and problems causing errors.

Use this dashboard to:

  • Gain insights into information about the number of nodes, number of buckets, connections, number items, total bytes transferred.
  • Determine errors in clusters: enjections, out of memory errors and error queries.
  • Gain insights into information about the workload of the cluster: percent of used memory, percent of used CPU.
Cassandra dashboards

Bucket I/O

The Couchbase - Bucket I/O dashboard provides an insight into the operators of buckets in clusters: the number of getting operations, the number of set operations, the number of delete operations, the bytes read/write.

Use this dashboard to:

  • Get insights into information about the total amount of operations in buckets per second; the number of delete misses operations, get operations, set operations, update operations in buckets per second.
  • Get insights into information about the number of bytes read, bytes written over time.
Cassandra dashboards

Cluster Resources

The Couchbase - Cluster Resources dashboard provides an insight into the resources of clusters: the memory resource usage, the CPU resource usage, the disk resource usage.

Use this dashboard to:

  • Gain insights into the workload of Couchbase clusters such as the percent of CPU used, the percent of Memory used, the High Low watermark.
  • Gain insights into the used resources of Couchbase clusters such as the Disk usage, the Swap space usage, the Memory available.
  • Gain insights into the rate requests, rate of streaming requests on the management port.
Cassandra dashboards

DCP Queues

The Couchbase - DCP Queues dashboard provides an insight into the DCP queues of buckets in couchbase clusters: the number of DCP connections, DCP senders, the number of items in DCP Queues.

Use this dashboard to:

  • Gain insights into the operations of DCP queues. This helps you identify the performance of your clusters when your cluster rebalance
Cassandra dashboards

Disk Queues

The Couchbase - Disk Queues dashboard provides an insight into the DCP queues of buckets in couchbase clusters: the number of active items waiting to be written to disk, the number of items being put to disk queue, the average age of items in queues.

Use this dashboard to:

  • Gain insights into the operations of disk queues. This helps you identify performance about read/write of your clusters.
Cassandra dashboards

vBucket

The Couchbase - vBucket dashboard provides insights into the state of vBucket of buckets in couchbase clusters: the number of vBucket of buckets, the number items in vBuckets, the state of vBuckets.

Use this dashboard to:

  • To determine the number and status of vBucket in your clusters.
Cassandra dashboards

XDCR

The Couchbase - XDCR dashboard provides insights into replicate operations of buckets cross-cluster: the number of XDCR connections, the number of XDCR items remaining, the number of read-set-delete operations for XDCR.

Use this dashboard to:

  • Gain insights into replicate operations of buckets cross-cluster
Cassandra dashboards

Errors

The Couchbase - Errors dashboard provides insights into errors from error logs in couchbase servers and couchbase clusters: buckets not ready, nodes not responding, node down, error queries, last error logs.

Use this dashboard to:

  • Quickly identify critical errors affecting your couchbase servers.
  • Identify SQL error queries from clients.
Cassandra dashboards

Events

The Couchbase - Events dashboard provides insights into events from couchbase servers and couchbase clusters: the number of login failure, login success from clients, add/remove node events, add/remove bucket events, rebalance events.

Use this dashboard to:

  • To audit the activities happening in the cluster. This helps to determine what activities have occurred in the system, helping to control system security.
Couchbase dashboards

HTTP Access

The Couchbase - HTTP Access dashboard provides insights into HTTP Rest API requests from clients to couchbase servers and couchbase clusters: the latency, HTTP codes, client agents, IP clients, errors with 4XX 5XX response code.

Use this dashboard to:

  • To understand user behavior accessing clusters and servers through Rest API.
Couchbase dashboards

Create monitors for Couchbase app

From your App Catalog:

  1. From the Sumo Logic navigation, select App Catalog.
  2. In the Search Apps field, search for and then select your app.
  3. Make sure the app is installed.
  4. Navigate to What's Included tab and scroll down to the Monitors section.
  5. Click Create next to the pre-configured monitors. In the create monitors window, adjust the trigger conditions and notifications settings based on your requirements.
  6. Scroll down to Monitor Details.
  7. Under Location click on New Folder.
    note

    By default, monitor will be saved in the root folder. So to make the maintenance easier, create a new folder in the location of your choice.

  8. Enter Folder Name. Folder Description is optional.
    tip

    Using app version in the folder name will be helpful to determine the versioning for future updates.

  9. Click Create. Once the folder is created, click on Save.

Couchbase alerts

Alert Type (Metrics/Logs) Alert Name Alert Description Trigger Type (Critical / Warning) Alert Condition Recover Condition
Logs Couchbase - Bucket Not Ready This alert fires when a bucket in the Couchbase cluster is not ready. Critical < 0 < =0
Logs Couchbase - Node Down This alert fires when a node in the Couchbase cluster is down. Critical > < =0
Logs Couchbase - Node Not Respond This alert fires when a node in the Couchbase cluster does not respond too many times. Critical > = 10 < 10
Logs Couchbase - Too Many Error Queries on Buckets This alert fires when there are too many errors queries on a bucket in a Couchbase cluster. Critical > = 1000 < 1000
Logs Couchbase - Too Many Login Failures This alert fires when there are too many login failures to a node in a Couchbase cluster. Critical > = 1000 < 1000
Metrics Couchbase - High CPU Usage This alert fires when CPU usage on a node in a Couchbase cluster is high. Critical > = 80 < 80
Metrics Couchbase - High Memory Usage This alert fires when memory usage on a node in a Couchbase cluster is high. Critical > = 80 < 80
Status
Legal
Privacy Statement
Terms of Use

Copyright © 2025 by Sumo Logic, Inc.