What's the correct REGEX for the allowlist in app.yml?

What is the correct format of _REGEX in the app.yml file?

Is this correct?


I’m will be attempting to list all IP’s used by grafana.com for scraping (https://grafana.com/api/hosted-grafana/source-ips.txt)

1 Like

Looks more or less right. You may want to escape .s though and add ^ and $

1 Like

I probably should have added that it doesn’t work…

I have tried adding my machine’s IP address and it cannot access the metrics without logging into Discourse.

I take your point about the escaping the dot. In this case the regex will only be supplied with IP addresses, so escaping the dot doesn’t change the result but does make it harder to read. Also, grafana.com use up to 100 IP’s to pull data so this line might become too long…

1 Like

Seems that $ is being escaped in the translation from containers/<container>.conf to the container environment.

Container config:

  ## Allowed IPs for Prometheus metrics

Container environment.