prometheus / mysqld_exporter

Exporter for MySQL server metrics
http://prometheus.io/
Apache License 2.0
2.11k stars 745 forks source link

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

Open cah-jyoti-prakash opened 3 years ago

cah-jyoti-prakash commented 3 years ago

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:

.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

cah-jyoti-prakash commented 3 years ago

any guidance?