2021年1月4日星期一

Access https from grafana running inside docker

I have grafana running within docker. I configured ElasticSearch as one of the Datasource. I am not able to access ES from Grafana. I see certificate error in the grafana logs while saving datasource.

t=2021-01-04T22:55:27+0000 lvl=eror msg="Data proxy error" logger=data-proxy-log userId=1 orgId=1 uname=admin path=/api/datasources/proxy/2/es_index_name/_mapping remote_addr=10.10.10.225 referer=http://dev.org.com:3000/datasources/edit/2/ error="http: proxy error: x509: certificate signed by unknown authority"  t=2021-01-04T22:55:27+0000 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/api/datasources/proxy/2/es_index_name/_mapping status=502 remote_addr=10.10.10.225 time_ms=132 size=0 referer=http://dev.org.com:3000/datasources/edit/2/  

I passed in certificates with docker run

docker run -u 8000:8000 -d --name grafana -p 3000:3000 -v /etc/ssl/certs/ca-bundle.crt:/etc/grafana/ca-bundle.crt -v /etc/ssl/certs/ca-bundle.trust.crt:/etc/grafana/ca-bundle.trust.crt -v /myhome/home/data/grafana:/grafana grafana:latest grafana  

I have same configuration in my windows docker which works fine, when I run in centos I have this issue. any help appreciated.

https://stackoverflow.com/questions/65571060/access-https-from-grafana-running-inside-docker January 05, 2021 at 07:08AM

没有评论:

发表评论