SiteSpeed.IO Metrics InfluxDB on HTTPS

316 views Asked by At

We are trying to utilize the SiteSpeed.io docker image and loading the test results into InfluxDB, but our Influx DB is listening on HTTPS with a self-signed certificate. Is there any way to make the application trust our CA? We tried to add the CA to the OS during building our version of SiteSpeed, but that was not enough, we still get the same error:

ERROR: Error: unable to verify the first certificate
8    at TLSSocket.onConnectSecure (_tls_wrap.js:1474:34)
)    at TLSSocket.emit (events.js:310:20)
2    at TLSSocket._finishInit (_tls_wrap.js:917:8)
9    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:687:12)
1

There are 1 answers

0
Tamás Juhász On

Certificate problems can be ignored by passing the following environment variable to the Docker image:

NODE_TLS_REJECT_UNAUTHORIZED=0
docker run --env NODE_TLS_REJECT_UNAUTHORIZED=0

SiteSpeed.Io uses Node Influx Client Details are from here: https://nodejs.org/api/cli.html#cli_node_tls_reject_unauthorized_value

Many thanks to Peter from the SiteSpeedIO Slack channel.