Skip to content

monitoring: silence loki-gateway 2xx access logs#335

Open
open-dave wants to merge 1 commit into
masterfrom
pipeline/issue-326
Open

monitoring: silence loki-gateway 2xx access logs#335
open-dave wants to merge 1 commit into
masterfrom
pipeline/issue-326

Conversation

@open-dave

Copy link
Copy Markdown
Collaborator

What & why

loki-gateway (the Loki chart's bundled nginx proxy) was logging an access-log line for every successful 204 POST /loki/api/v1/push from Alloy — roughly 8,600 lines/hour, about a third of the monitoring namespace's pod-log volume and ~20% of total pod-log ingest. Loki was logging the act of shipping logs, then shipping those logs again, at zero diagnostic value.

Set gateway.verboseLogging: false in the Loki Helm values. In chart v7.0.0 this switches the gateway nginx config from unconditional access_log to access_log ... if=$loggable with a map $status $loggable block that drops 2xx/3xx — silencing successful pushes at the source while retaining error/non-2xx visibility. One-line values change, no custom nginx snippet to maintain.

Closes #326

Review

Verified against the pinned grafana/loki chart v7.0.0 that gateway.verboseLogging exists and its _helpers.tpl renders the map $status $loggable { ~^[23] 0; default 1; } gate when false; confirmed no new yamllint issues introduced. Implementation matches the plan; no changes needed.

🤖 Generated with Claude Code

Set gateway.verboseLogging=false so the nginx proxy logs only non-2xx/3xx
responses. This drops the successful 204 POST /loki/api/v1/push lines Alloy
generates on every push (~⅓ of the monitoring namespace's pod-log volume)
at the source, with no loss of error visibility.

Closes #326

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

loki-gateway access logs are ~⅓ of pod-log volume (Loki logging its own ingest)

1 participant