SamYuan1990 commented on issue #3951:
URL: https://github.com/apache/couchdb/issues/3951#issuecomment-1059758034


   as so far, with default value as configuration.
   access:
   ```
   /tmp % curl 127.0.0.1:5984/_node/_local/_prometheus 
   {"error":"unauthorized","reason":"You are not a server admin or read-only 
metrics user"}
   ```
   
   related with https://github.com/apache/couchdb/discussions/3935
   
   I can understand we want to disable the prometheus by default, but...
   as current status, the prometheus seems enabled at port 5984, and blocked 
prometheus as prometheus operator to access it.
   are we want it disabled by default?
   or 
   we'd better have a fixable configuration to control this feature enablement?
   
   with my hands on, I am confusing.
   
   attachment my yaml file for reference.
   
   ```
   ---
   apiVersion: v1
   kind: Service
   metadata:
     name: org1peer1couchdb
   spec:
     selector:
       app: org1peer1couchdb
     ports:
     - name: couchport
       port: 5984
       protocol: TCP
     - name: matrix
       port: 17986
       protocol: TCP  
   ---
   apiVersion: apps/v1
   kind: Deployment
   metadata:
     name: org1peer1couchdb
   spec:
     replicas: 1
     selector:
       matchLabels:
         app: org1peer1couchdb
     template:
       metadata:
         labels:
           app: org1peer1couchdb
       spec:
         containers:
         - name: couchdb
           image: couchdb:3.2
           imagePullPolicy: IfNotPresent
           env:
             - name: "COUCHDB_USER"
               value: "admin" 
             - name: "COUCHDB_PASSWORD"
               value: "adminpw"
             - name: "PROMETHEUS_ADDITIONAL_PORT" # useless so far
               value: "true"
             - name: "PROMETHEUS_BIND_ADDRESS" # useless so far
               value: "0.0.0.0"
             - name: "PROMETHEUS_PORT" # useless so far
               value: "17986"
           ports:
               - containerPort: 5984
               - containerPort: 17986
   ---
   apiVersion: monitoring.coreos.com/v1
   kind: ServiceMonitor
   metadata:
     name: org1peer1couchdb
     namespace: default
     labels:
       release: mypro
   spec:
     namespaceSelector: 
       matchNames:
       - default
     selector:
       matchLabels:
         app:  org1peer1couchdb
     endpoints:
     - port: couchport 
       path: /_node/_local/_prometheus
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to