Hi, I have the Grafana Alerts Kafka REST Proxy working for HTTP but get an error over HTTPS:
>> x509: “Kafka” certificate is not trusted
The curl command works without -k after I did this on my Mac so I know my certs file is good.
Just add that “cert-chain.pem” to your OS CA certs, which are used by your Grafana.
Check doc of OS/orchestration which is running your Grafana for details how to do that.
I’ve added the cert-chain.pem CA Root Certs to my MacOS Keychain Access and it shows Trusted but I still get the same error. I’m not following you on “OS/orchestration doc”. I searched for orchestration and got nothing. Can you post a link to the doc? Thanks.
I changed to HTTPS and I still get this. A friend used docker-compose and the Grafana v10.1.6 image and it worked fine. I’m not having luck with my localhost MacOS v13.6.3 laptop running Grafana v9.3.1. Do you know if there was a fix between v9.3.1 and v10.1.6 that might account for this?
Here is the docker-compose test case that worked.
version: ‘3.8’
services:
grafana:
image: grafana/grafana-oss:10.1.6
container_name: grafana
restart: unless-stopped
# if you are running as root then set it to 0
# else find the right id with the id -u command
user: ‘501’
env_file:
- grafana.env
ports:
- ‘3000:3000’
volumes:
- /opt/docker/kafka_3.5.1/nginx/server.key:/var/lib/grafana/ssl/grafana.key:ro
- /opt/docker/kafka_3.5.1/nginx/server.pem:/var/lib/grafana/ssl/grafana.crt:ro
- /opt/docker/kafka_3.5.1/cert-chain.pem:/etc/ssl/certs/ca-certificates.pem:ro
# - /app/grafana:/var/lib/grafana
Which defaults.ini setting do I set for the ca_cert? The example I have only had these. Thanks.
[server]
cert_file = /etc/grafana/grafana.crt
cert_key = /etc/grafana/grafana.key
Actually, my problem is that I am running on darwin (MacOS v13.6.3) and I can’t seem to get my known-good (since curl works with it) ca cert file to be used by Grafana. I’ve tried putting the file in serveral places and loading into the Mac Keychain Access but it is not working. I’m running Grafana locally with “./bin/grafana-server” and “./conf/defaults.ini”. How does Grafana on darwin load ca certs? It works fine from my mac using a linux docker container, but I’d like to run natively. Thanks. BTW, I see the same thing with Grafana 9.3.1 and 10.1.6 so its not the version of Grafana from what I can tell. It seems more like I’m not doing the right thing for the darwin target.
Hey, The certificate authority (CA) that issued the Kafka server certificate is trusted by Grafana. Grafana needs to recognize and trust the CA that signed the Kafka certificate. If necessary, add the CA certificate to the certificate bundle used by Grafana.