grafana / oncall

Developer-friendly incident response with brilliant Slack integration
GNU Affero General Public License v3.0
3.52k stars 291 forks source link

Changing GRAFANA_API_URL does not update configuration #2329

Open fculpo opened 1 year ago

fculpo commented 1 year ago

What went wrong?

What happened:

GRAFANA_API_URL is only saved/used once at initial configuration of grafana plugin, and never updated if oncall env var is updated.

This variable is useful to display correct external link in mobile app or slack notifications

We initially set it as internal k8s grafana service (eg. grafana.monitoring.svc:3000) so all links in external apps were unreachable.

Trying to set it afterwards to https://grafana.somedomain.com does not reflect in futur links.

You can see "old" url being used in celery logs.

What did you expect to happen:

Changing GRAFANA_API_URL env var should reconfigure Celery and engine link generation and/or raise an error if new value is invalid

Slack thread

https://grafana.slack.com/archives/C02LSUUSE2G/p1687438813903209

How do we reproduce it?

See description

Grafana OnCall Version

at least 1.2.44 and 1.2.46

Product Area

Alert Flow & Configuration, Helm, Other

Grafana OnCall Platform?

Kubernetes

User's Browser?

No response

Anything else to add?

No response

fculpo commented 1 year ago

Related to https://github.com/grafana/oncall/issues/2330

Maqui-LP commented 10 months ago

I'm having the same issue with my k8s installation. It would be useful to change or use a different env variable for urls in alerts messages (telegram, slack, email, etc)