Skip to content

feat: allow disabling Loki usage reporting - #82

Merged
DavidePrincipi merged 1 commit into
mainfrom
feat-8210
Oct 8, 2026
Merged

DavidePrincipi merged 1 commit into
mainfrom
feat-8210

Conversation

@DavidePrincipi

Copy link
Copy Markdown
Member

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#8210

Default 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.

How to test

  • Install the module and check that Loki starts and receives logs as before
  • Run runagent -m loki1 python3 -c 'import agent ; agent.set_env("LOKI_REPORTING_ENABLED", "false")', restart loki.service, and check that curl -s localhost:3100/config inside the pod shows reporting_enabled: false
  • Set PODMAN_POD_OPTS to --add-host=stats.grafana.org:127.0.0.1, restart loki.service, and check that /etc/hosts in the loki-server container contains the record
  • With a DNS blocker in front of the node, check that queries for stats.grafana.org stop

Generated by Claude Code:claude-opus-5.5 with nethserver-pr

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
@DavidePrincipi
DavidePrincipi merged commit c886d53 into main Oct 8, 2026
5 checks passed
@DavidePrincipi
DavidePrincipi deleted the feat-8210 branch October 8, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants