Skip to content

Add HH_mm_ss to the CSV filename - #45

Merged
evandhoffman merged 1 commit into
mainfrom
fix/filename-time
Sep 5, 2026
Merged

Add HH_mm_ss to the CSV filename#45
evandhoffman merged 1 commit into
mainfrom
fix/filename-time

Conversation

@evandhoffman

Copy link
Copy Markdown
Contributor

Each run of monitord now writes a distinct file instead of appending to the previous run's. The filename becomes sensors.<host>.<yyyy_MM_dd>_<HH_mm_ss>.csv, where the time is when the file is first opened (run start, or a day-boundary rollover).\n\nRetention still keys on the day: period(from:) parses the date+time and normalizes to midnight, so the sweep keeps deleting whole days. Header is written once per file, so each run's file starts clean.\n\nVerified: two back-to-back runs produce two files, each with its own header. 231 tests pass, swiftformat clean.

@evandhoffman
evandhoffman merged commit ad91836 into main Sep 5, 2026
2 checks passed
@evandhoffman
evandhoffman deleted the fix/filename-time branch September 5, 2026 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant