Skip to content

Reduce misleading log noise from benign/unavailable integrations#327

Open
gecube wants to merge 1 commit into
coroot:mainfrom
gecube:log-hygiene-benign-integrations
Open

Reduce misleading log noise from benign/unavailable integrations#327
gecube wants to merge 1 commit into
coroot:mainfrom
gecube:log-hygiene-benign-integrations

Conversation

@gecube

@gecube gecube commented Jul 1, 2026

Copy link
Copy Markdown

Fixes the log-noise part of #914.

On hosts where some integrations simply aren't present (Bottlerocket: no Docker, memory-only journald, SELinux-protected systemd bus; AWS VPC CNI instead of Cilium; private instances without a public IP), the node-agent emits a stream of errors/warnings that don't indicate any real failure. This misleads operators debugging unrelated issues, and the repeated systemd/SELinux warnings in particular burn through the global log rate-limiter budget (--log-per-second, default 10), silently dropping genuinely useful lines.

This PR only adjusts logging — no flags, no behavior change, metric collection is unaffected:

  • cilium — log the missing map name + "assuming Cilium is not used" instead of a bare no such file or directory.
  • runtime / journald probes — an unavailable integration is normal (only one runtime is present on a node), so log at info level.
  • systemd — unit properties can be permanently denied by the host SELinux policy. Cache the failure per unit so the private bus isn't re-queried and the identical warning is logged only once instead of on every scan.
  • journald — a missing or empty journal path is an expected probe outcome, log at info level.
  • aws metadata — a missing optional field (e.g. public-ipv4 on a private instance) returns a non-200 response; that is expected, not an error.

A follow-up PR will add opt-in flags (--no-docker / --no-systemd / --no-journald) to fully disable irrelevant integrations.

On hosts where some integrations are simply not present (e.g. Bottlerocket:
no Docker, memory-only journald, SELinux-protected systemd bus, VPC CNI
instead of Cilium) the node-agent logs a lot of errors and warnings that do
not indicate any real failure. This sends operators down the wrong path when
debugging unrelated problems, and the repeated systemd/SELinux warnings in
particular consume the global log rate-limiter budget, hiding genuinely
useful messages.

Adjust these to reflect that they are expected, benign conditions:

- cilium: log the missing eBPF map name and that Cilium is assumed unused,
  instead of a bare "no such file or directory".
- container runtime / journald probes: an unavailable integration is normal
  (only one runtime is present on a node), so log at info level.
- systemd: reading unit properties can be permanently denied by the host
  SELinux policy. Cache the failure per unit so the private bus is not
  re-queried and the identical warning is logged only once instead of on
  every scan.
- journald: a missing or empty journal path is an expected probe outcome,
  log at info level.
- aws metadata: a missing optional field (e.g. public-ipv4 on a private
  instance) returns a non-200 response; that is expected, not an error.

No behavior changes other than logging; metric collection is unaffected.

Signed-off-by: George Gaál <gb12335@gmail.com>
@gecube gecube force-pushed the log-hygiene-benign-integrations branch from b43c12b to eb1ac05 Compare July 1, 2026 11:46
@def def added the AI slop label Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants