Repository navigation
feat: allow disabling Loki usage reporting - #82
Merged
Merged
Conversation
Loki sends anonymous usage statistics to stats.grafana.org by default. Behind a DNS blocker, failed lookups are retried at a high rate. Add LOKI_REPORTING_ENABLED (default true) to control the reporting, and PODMAN_POD_OPTS to pass extra options to the pod, e.g. --add-host to resolve stats.grafana.org to the loopback address. The latter works around Loki contacting the host even with reporting disabled. Assisted-by: Claude Code:claude-opus-5.5
gsanchietti
approved these changes
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Loki sends anonymous usage statistics to
stats.grafana.org. Behind a DNS (Domain Name System) blocker like Pi-hole, the failed lookups are retried at a very high rate. This PR lets the administrator stop that traffic with a manual configuration. NethServer/dev#8210Default behavior does not change: usage reporting stays enabled and the pod is created with the same options as before, unless the new environment variables are set.
LOKI_REPORTING_ENABLED(defaulttrue) setsanalytics.reporting_enabledinloki-config.yamlPODMAN_POD_OPTS(default empty) adds options topodman pod create, e.g.--add-host=stats.grafana.org:127.0.0.1. This works around Loki Reports to stats.grafana.org despiteanalytics.reporting_enabled: falsegrafana/loki#10648, where Loki contacts the host even with reporting disabledHow to test
runagent -m loki1 python3 -c 'import agent ; agent.set_env("LOKI_REPORTING_ENABLED", "false")', restartloki.service, and check thatcurl -s localhost:3100/configinside the pod showsreporting_enabled: falsePODMAN_POD_OPTSto--add-host=stats.grafana.org:127.0.0.1, restartloki.service, and check that/etc/hostsin theloki-servercontainer contains the recordstats.grafana.orgstopGenerated by Claude Code:claude-opus-5.5 with nethserver-pr