docker icon indicating copy to clipboard operation
docker copied to clipboard

How to disable Prometheus when running couchbase as container

Open naveenkumarsp opened this issue 3 years ago • 2 comments

When i ran the couchbase container using docker-compose, i found the CB is taking way too much CPU and noticed Prometheus and beam.smp process was taking roughly taking 700m CPU all the time.

I am wondering how we can disable Prometheus on containers, is there any environment flag that can be used to disable Prometheus. Also, i noticed that there were about 60+ connections to the couchbase even after creating the container. Do Prometheus and other services use the connections to gather metrics? Is there any way we can trace the connections by source?

naveenkumarsp avatar Jun 29 '22 06:06 naveenkumarsp

@naveenkumarsp What does "700m CPU" mean? What does "60+ connections to the couchbase" mean?

What exactly did you run in your docker-compose file?

ceejatec avatar Jun 29 '22 07:06 ceejatec

i mean to say its using 700milicores of a single CPU(70% of a single CPU). Basically, I use Prometheus as part of my compose file where I am using couchbase-exporter to collect CB stats.

Also, I am wondering if by disabling the Prometheus will be anything that we will lose except the in-built stats(which I am always collecting via couchbase-exporter).

Here is the CB part of the compose file which i am using.

CB exporter collects the connections stats which was 77 without any client being connected

  couchbase:
    image: couchbase:community-7.0.2
    container_name: couchbase
    environment:
      - COUCHBASE_ADMINISTRATOR_USERNAME=Administrator
      - COUCHBASE_ADMINISTRATOR_PASSWORD=password
      - CLUSTER_NAME=test
    volumes:
      - couchbase-data:/opt/couchbase/var
    restart: on-failure
    ports:
      - "8091-8094:8091-8094"
      - "11210-11211:11210-11211"
      - "18091-18093:18091-18093"
    networks:
      - database

naveenkumarsp avatar Jun 30 '22 11:06 naveenkumarsp