docker version of mysql_exporter with ssl (cert based login) not working

221 views
Skip to first unread message

Jyoti Prakash

unread,
Aug 25, 2021, 11:30:36 AM8/25/21
to Prometheus Users
mysqld_exporter command line flags

I am running docker compose with .my.cnf
Docker Compose:
services:
mysql-exporter:
image: prom/mysqld-exporter
container_name: mysql-exporter
ports:
- 9104:9104
volumes:
- /Users/jyoti.prakash/Documents/mysql/:/home/

.my.cnf file:
[client]
user=testuser
password=password
port=3306
host=xx.xx.xx.xx
hostname=test.cardinalhealth.com
tls=true
ssl-ca=/home/qa-server-ca.pem
ssl-key=/home/qa-client-key.pem
ssl-cert=/home/qa-client-cert.pem

What did you do that produced an error?

docker-compose up --remove-orphans

What did you expect to see?

No error , and metrics. FYI- With cert and credentials I am able to login through any DB client

What did you see instead?

Error:
mysql-exporter | level=info ts=2021-08-19T19:29:34.256Z caller=tls_config.go:191 msg="TLS is disabled." http2=false
mysql-exporter | level=error ts=2021-08-19T19:29:47.543Z caller=exporter.go:149 msg="Error pinging mysqld" err="x509: cannot validate certificate for 10.49.209.134 because it doesn't contain any IP SANs

Reply all
Reply to author
Forward
0 new messages