Company
Date Published
Author
Chris Malarky
Word count
3525
Language
English
Hacker News points
None

Summary

Prometheus monitoring and alerting toolkit` is a popular open-source systems monitoring and alerting toolkit, maintained independently of any company, and joined the Cloud Native Computing Foundation in 2016 as the second hosted project, after Kubernetes. `Couchbase Capella` is a fully-managed Database as a Service (DBaaS) offering, the easiest and fastest way to begin with Couchbase and to eliminate ongoing database management efforts. Your Capella Database contains a native Prometheus scrape target, allowing you to connect your Prometheus (or Prometheus-compatible) monitoring systems to collect metrics. To follow the steps in this guide, you’ll need a working Docker installation, a Capella Database, and some common shell utilities. The latest version of Prometheus was 2.46 at the time of writing. The steps here were carried out using Rancher Desktop 1.9.1, with the Container Engine set to dockerd (moby), and using the provided docker CLI. Running a Prometheus Server in Docker involves using `docker run` command with options such as `-p / --publish` to expose the Prometheus port and `-rm` to make sure that the container is cleaned up when it exits. By default, the running container will remain “attached”, streaming the logs to Standard Output (in this case, your terminal). To add a Capella Database to your Prometheus server, you’ll need a set of credentials (username/password) that has Read Access to All Buckets and All Scopes in your Database, as well as a Security Certificate for your Database. You can use File-based Service Discovery or HTTP-based Service Discovery to connect to your Database. For File-based Service Discovery, you'll need to authenticate with the same credentials as above, and provide the Capella Root Certificate we downloaded earlier. The endpoint is `prometheus_sd_config.yaml`, and similar to above you’ll need to authenticate with the same credentials as above, and provide the Capella Root Certificate we downloaded earlier. For HTTP-based Service Discovery in Couchbase Server 7.2, you can use the new endpoint (prometheus_sd_config), similar to above. After adding the new scrape job to your Prometheus server, you can check the logs to make sure that the configuration loaded cleanly. Once you do, let’s go back over and look at the Prometheus console at http://localhost:9090/.