logwatch files false tick-gap tickets when the timer was deliberately stopped #420
Labels
No labels
Agent
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No assignees
1 participant
Notifications
Total time spent: 9 minutes 45 seconds
Due date
igor
9 minutes 45 seconds
No due date set.
Dependencies
No dependencies set
Reference
joshtronic/igor#420
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What is wrong
The hourly logwatch pass files a medium-severity
agent.servicetick-gap ticket whenever it sees a long silence in the journal, without checking whetheragent.timerwas running during that window. Any operator pause longer than an hour therefore produces a false positive.igor#419 was exactly this. The reported 21:00-21:46 silence was a deliberate stop:
The filing also read the first
Startingwith no precedingFinishedas evidence against a long-running tick, when it was just the timer coming back up — so the ticket reasoned its way to a confident wrong diagnosis from a signal it could have disambiguated directly.Fixed looks like
Before filing a tick-gap finding, check whether
agent.timerwas stopped at any point in the window (journalctl -u agent.timerforStopped/Startedinside the range, or the unit state at the time). If it was, the gap is explained — do not file.Conversely, when the timer was active for the whole window and the service still produced nothing, that is a real fault and the current
-- skippingbehaviour for "no entries in the past hour" understates it — for a per-minute unit that condition is itself the failure.Tests
Stopped/Startedpair: no finding filed.agent.timerbefore filing a logwatch tick-gap finding #421agent.timerbefore filing a logwatch tick-gap finding #421agent.timerbefore filing a logwatch tick-gap finding #421