This guide explains how to enable and configure Prometheus monitoring for Couchbase Server 7.6.
Ensure Couchbase is running and accessible:
http://<HostName>:8091
Login using your Couchbase Administrator credentials.
Couchbase provides an auto-generated configuration file for Prometheus.
Open in browser:
http://<couchbase-host>:8091/prometheus_sd_config.yaml
Example:
http://<HostName>:8091/prometheus_sd_config.yaml
Or download using command:
wget --content-disposition \
"http://<HostName>:8091/prometheus_sd_config.yaml" \
--http-user Administrator \
--http-password your_password
Save the downloaded file in your Prometheus directory:
Windows:
C:\prometheus\couchbase_sd.yaml
Linux:
/opt/prometheus/couchbase_sd.yaml
Edit the prometheus.yml file:
global:
scrape_interval: 15s
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'couchbase'
file_sd_configs:
- files:
- C:/prometheus/couchbase_sd.yaml
basic_auth:
username: "Administrator"
password: "your_password"
Run Prometheus:
prometheus.exe
Or restart service (Linux):
systemctl restart prometheus
Open Prometheus UI:
http://<HostName>:9090
Go to Targets and verify Couchbase targets are UP.
Test metrics:
kv_ops
prometheus.yml