Grafana 10.0.2 Modify alert message

How can I update the grafana url of the alert message?
For example - Source: http://localhost:3000/alerting/grafana/a00717a1-f963-4eb8-9fad-8d210ad12466/view?orgId=1
I wish to update the ‘localhost:3000’ with my internal server name
Additionally is it possible to remove the Silent URL from the alerting message

Hello,

you should change it in the configs file;

Look for “domain” under the “server” section in the configs file “grafana/conf/defaults.ini” or whatever what you name it.

[server]
domain = localhost

Change “localhost” to your host, and restart the Grafana server.

1 Like

And to remove the Silent URL, in case you didn’t create a new template, delete the “.SilenceURL” section in the file “grafana/public/emails/ng_alert_notification.html”.

Make sure to back it up before you change anything.

I changed the server domain it woked, but I still get the port 3000 and HTTP protocol instead of https -
http://csp-grafana-cloud.checkpoint.com:3000/alerting/grafana/
Should be -
https://csp-grafana-cloud.checkpoint.com/alerting/grafana/

Under the section “server”:

Change the port to 80 in order to access Grafana without specifying the port in the url.

For the https, did you change the “protocol” to “https”? Did you specify the “cert_file” and the “cert_key”?

Yes I set
protocol = ‘https’
http_port = 80
Regarding “cert_file” and “cert_key” - Grafana runs in EKS behind the load balancer the key and crt are tls secret, so what should be the values?

Generate them using this command:

kubectl create secret tls grafana-tls --key grafana.key --cert grafana.crt --namespace grafana

As I mentioned I already created the tls secret under grafana namespace the question is what is the content of my defaults.ini should be:

[server]
domain = 'csp-grafana-cloud...'
protocol = 'https'
http_port = 80
cert_file = ?
cert_key = ?

Mount them and then specify the path of each file.

for example:

[server]
...
cert_file = /etc/kubernetes/secrets/grafana-tls/grafana.crt
cert_key = /etc/kubernetes/secrets/grafana-tls/grafana.key