Error while using ssl with basic authorization

Hello,

Here is my config:

- module: couchdb
  metricsets: ["server"]
  period: 10s
  hosts: ["https://xxx.xxxx.xxx.xxx:6984/_node/_local/_stats"]
  ssl.verification_mode: "none"
  username: xxxxx
  password: xxxxx

I would get this error:

couchdb...
  server...
    error... ERROR error trying to get CouchDB version. Retrying on next fetch...: cannot start CouchDB metricbeat module: error trying to do GET request to couchdb: Get "http://xxxxx:***@xxx.xxx.xxx.xxx:6984": EOF

It could see that the protocol has became http but https.
If i didn't assign username nor password, it would show 401 Unauthorized.

Hi @loker :slightly_smiling_face:

Which is your couchdb version? You are using port 6984 instead of 5986, is that correct? Checking docs it seems also that you should use port 5984 when using a full path to access your metrics https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-couchdb.html#_compatibility_13

Hi @Mario_Castro,

Thanks for your reply,
I use couchdb 3.0.0 and i enable its ssl feature in 6984 port.

Did you also check this? https://www.elastic.co/guide/en/beats/filebeat/current/configuration-ssl.html

Hi @Mario_Castro,

I thought couchdb module is used to collect statistics data as its input
and i did not use ssl on my monitor es cluster output.
I know it could not redirect https call to http, but i think this is not this case.

My problem is that i tell couchdb module to use https but it turn into http with specifying username and password.