Feature Requests
New / Open / Unreviewed

Respect compliance scan intervals across restarts and stagger startup scans

I’d like automatic compliance scans to respect the configured scan interval across agent restarts, with an option to stagger scans that are due after startup.

I run several Linux containers and VMs on a four-core Proxmox host. After a reboot, five PatchMon agents started OpenSCAP scans within a few minutes of each other, leaving the physical host at 100% CPU for a prolonged period.

One affected agent had a weekly scan interval (10080 minutes) and had successfully scanned the previous day. It still started another scan immediately after boot.

Looking at the v2.1.6 agent source, the compliance scheduler waits a hard-coded 30 seconds, runs a scan unconditionally, and only then starts the configured interval timer. It doesn’t check when the previous scan completed. The reporting offset applies separately and doesn’t stagger these scans.

It would help to:

- Remember the last successful scan across restarts and scan only when the configured interval has elapsed.

- Add a configurable startup grace period and jitter for scans that are due.

- Keep agents connected and reporting normally while compliance scans wait.

This would let users retain automatic security checks without every guest competing for CPU after a host reboot.

Related issue #841 addressed On-Demand mode being incorrectly changed to scheduled mode. This request concerns hosts deliberately configured for automatic scans.

Relevant v2.1.6 scheduler code (https://github.com/PatchMon/PatchMon/blob/v2.1.6/agent-source-code/cmd/patchmon-agent/commands/serve.go#L1581-L1608)

0 Comments

Write a comment...

Posting anonymously

No comments yet. Be the first to share your thoughts.