How can I update the Grafana Dashboard URL in the Slack notification

Greetings… I have my alerts sending notifications to SLACK. That’s working just fine and I even get the pretty images. The one thing, I can’t seem to figure out though is the URL that is part of the alert message points to localhost:3000, which is not correct. How do I update that to the correct URL.

1 Like

What do you have your domain and root_url set as in your configuration? I’m guessing the alert will send whatever URL is used in your configuration. Are you accessing Grafana by another address than localhost?

It’s just an ip address (https://11.128.52.211:8443). So… this is running in Kubernetes, so I am guessing this is inside of one of the configmaps. Would that be correct?

As @chewf mentioned, you need to set ROOT_URL so that Grafana knows what the address to your grafana installation is. You can do this either in grafana.ini (probably in your config map) or using environment variables, more about that here.

The environment variable for ROOT_URL is GF_SERVER_ROOT_URL and should be set to whatever url you use to access Grafana. Sounds like it would be https://11.128.52.211:8443 in your case.

3 Likes

Hi! I’m facing the same thing, already put the part into the .ini file but nothing has changed. Should I use ‘enforce_domain=true’ ?