Skip to content

Conversation

@smileusd
Copy link
Contributor

@smileusd smileusd commented Jan 6, 2026

This pr is to fix this specail case:

  1. kernel log file:
root@:~# tail -n 1 /var/log/messages
Jan  6 02:06:53 kubelet[8137]: E0106 02:06:53.560506    8137 summary_sys_containers.go:89] "Failed to get system container stats" err="failed to get cgroup stats for \"/systemd/system.slice\": failed to get container info for \"/systemd/system.slice\": unknown container \"/systemd/system.slice\"" containerName="/systemd/system.slice"
  1. journal log:
root@:~# journalctl -u kubelet -n 1
Jan 06 02:07:53 kubelet[8137]: E0106 02:07:53.698973    8137 summary_sys_containers.go:89] "Failed to get system container stats" err="failed to get cgroup stats for \"/systemd/system.slice\": failed to get co>

These logs are not record "year" of time, so when the time from 2025 to 2026, the NPD will think that the log in 2025-12-31 is after than 2026-01-01, so the logs from 2025 will be captured into 2026.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: smileusd
Once this PR has been reviewed and has the lgtm label, please assign sjenning for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 6, 2026
@smileusd smileusd force-pushed the fix_upstream_log_filter branch from f1f3dbe to 3d1ac8b Compare January 6, 2026 09:28
@SergeyKanzhelev
Copy link
Member

These logs are not record "year" of time, so when the time from 2025 to 2026, the NPD will think that the log in 2025-12-31 is after than 2026-01-01, so the logs from 2025 will be captured into 2026.

Can you please clarify what happens? Does NPD think that those Jan logs are from 2025 or that Dec logs are for 2026? Simply discarding events as a solution sounds wrong if we need to process logs - we may loose something interesting there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants