Grafana URL Alerting

Viewed 1180

I configured my grafana alerts to be directed to telegram, but the url in the message is localhost:3000 I changed the domain already in grafana.ini but it didn't work, I still get localhost:3000 in the alert message. Are there any other configurations to be made?

3 Answers

Configure the root_url option of [server] in your Grafana config file or env variable GF_SERVER_ROOT_URL to https://grafana.company.com/

From this SO Question and answer.

This shows to set root URL As well. I'd say this is likely a duplicate question.

You will have to change root_url under grafana.ini something like:

[server]
root_url = https://xyz.xxx.com

For kubernetes chart, please add those for grafana:

grafana:
  env:
    GF_SERVER_ROOT_URL: "https://your.url/"
  notifiers:
    notifiers.yaml:
      notifiers:
      - name: telegram
        type: telegram
        uid: telegram
        is_default: true
        settings:
          bottoken: "yourbottoken"
          chatid: "-yourchatid"

and use uid: "telegram" in the provisioned dashboards. Please note, you should not miss quotes, https:// or http:// part and even the end / in GF_SERVER_ROOT_URL

Related