Cannot Disable /metrics

I’m running the latest version of Grafana in a container. Our Grafana instance is exposed externally, so we’d like to disable the /metrics endpoint, since we don’t use it anyway.

According to the docs, I can set the metrics enabled value to false to disable it, but this doesn’t seem to do anything. I’ve configured Grafana using environment variables in Docker, so I attempted to disable metrics by starting my container with
-e GF_METRICS_ENABLED=false

Unfortunately, this didn’t seem to do anything and I can still access /metrics. Is there another way I can disable metrics?

Thanks in advance!

what error you are seeing in your grafana logs.Did you check your settings.ini file
Did you restart your container after applying the changes.
I did the same in my Kubernetes cluster within the ConfigMap for environment variable and set the value to GF_METRICS_ENABLED=false
Below I got the following output

1 Like