prometheus / client_java

Prometheus instrumentation library for JVM applications
http://prometheus.github.io/client_java/
Apache License 2.0
2.17k stars 792 forks source link

Accessing HTTPS pushgateway URL #673

Open sumitbaurai opened 3 years ago

sumitbaurai commented 3 years ago

Hi,

I am trying to access an https prometheus gateway url with basic auth. ( something like : https://<host>:<port>/teamA ) The basic auth credentials can very well be supplied using the BasicAuthConnectionFactory. this.pushGateway.setConnectionFactory(new BasicAuthHttpConnectionFactory("user","pwd"));

However, I don't find any available method or parameter to specify the location of my truststore/keystore. Hence, the request fails with SSL Handshake exception.

Any help or pointers highly appreciated.

--Regards Sumit

sumitbaurai commented 3 years ago

Hi, For now, I have added the ca certs to the jvm cacerts store. Could this qualify as a feature request to be able to set the truststore via the API itself.