Add a Capella Cluster to a Prometheus Server

  • Capella Operational
      +
      Connect a Prometheus server to your Couchbase Capella cluster and collect metrics.

      Each Capella cluster contains a native Prometheus target enabling you to connect to Prometheus metrics. You can collect metrics in Capella using HTTP Service Discovery.

      Use the following procedure to add a Capella cluster to your Prometheus server, and use a sample configuration file to start collecting metrics.

      Prerequisites

      You need the following prerequisites for each Capella cluster that you want to collect metrics from.

      Prerequisite More Information

      Copy the Public Connection String to specify the Capella cluster endpoint for your client connection.

      Connect To Your Cluster

      Get the username and password credentials with Read access to all buckets and scopes in your cluster.

      Configure Cluster Credentials

      Download the security certificate for your cluster and copy it into your Prometheus directory.

      Download the Security Certificate

      Add a list of allowed IP addresses for your cluster.

      Configure Allowed IP Addresses

      Have a Prometheus server running.

      Collecting Cluster Metrics Blog

      Set up Prometheus to Consume Couchbase Metrics

      Define Collection Metrics Configuration

      Create a collection configuration file in your Prometheus directory. For more information, see our Collecting Cluster Metrics Blog and Set up Prometheus to Consume Couchbase Metrics.

      Sample Configuration File

      Use this sample configuration file to start collecting metrics.

      - job_name: "capella-plmvshfqolmyxvpt"
        basic_auth:
          username: "metrics_user"
          password: "metrics_Passw0rd"
        tls_config:
          ca_file: "certs/couchbase-cloud-root-certificate.pem"
        scheme: https
        http_sd_configs:
          - url: https://cb.plmvshfqolmyxvpt.cloud.couchbase.com:18091/prometheus_sd_config
          basic_auth:
            username: "metrics_user"
            password: "metrics_Passw0rd"
          tls_config:
            ca_file: "certs/couchbase-cloud-root-certificate.pem"

      The sample configuration file contains the following information:

      Field Description

      job_name

      Job name to collect metrics. This is the name Prometheus assigns to the process retrieving data from the target nodes.

      username

      Cluster username.

      password

      Password of the cluster user.

      ca_file

      Cluster security certificate.

      scheme

      Protocol scheme to configure requests.

      url

      Concatenation of the Public Connection String, REST API, and REST endpoint.