add future time filter for log watchers when time across the year#1213
add future time filter for log watchers when time across the year#1213smileusd wants to merge 1 commit intokubernetes:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: smileusd The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
f1f3dbe to
3d1ac8b
Compare
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. |
Yes, the kernel and journal log not record the year, NPD can not decide the 1.1.2026 is later than 12.31.2025. For example if we set the log loopback is only 3 mintnues, we will recived exceed 3 mintnues ago logs from year of 2025 if we restart NPD after 1.1.2026. We have a case is that, we set a pattern, one log at 30.12.2025 match this pattern, we recived the event again at 7.1.2026 because restart NPD. |
This pr is to fix this specail case:
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.