Add a Capella Database to a Prometheus Server

      Connect a Prometheus server to your Couchbase Capella database and collect metrics.

      Each Capella database 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 database to your Prometheus server, and use a sample configuration file to start collecting metrics.


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

      Prerequisite More Information

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

      Connect To Your Database

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

      Configure Database Credentials

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

      Download the Security Certificate

      Add a list of allowed IP addresses for your database.

      Configure Allowed IP Addresses

      Have a Prometheus server running.

      Collecting Database 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 Database 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"
          username: "metrics_user"
          password: "metrics_Passw0rd"
          ca_file: "certs/couchbase-cloud-root-certificate.pem"
        scheme: https
          - url:
            username: "metrics_user"
            password: "metrics_Passw0rd"
            ca_file: "certs/couchbase-cloud-root-certificate.pem"

      The sample configuration file contains the following information:

      Field Description


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


      Database username.


      Password of the database user.


      Database security certificate.


      Protocol scheme to configure requests.


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