Add Off collection preset (#888)#891
Merged
erikdarlingdata merged 1 commit intodevfrom Apr 24, 2026
Merged
Conversation
#888) config.apply_collection_preset now accepts a fourth preset, Off, which sets enabled = 0 across every row in config.collection_schedule without touching frequencies. The three existing presets (Aggressive, Balanced, Low-Impact) now also set enabled = 1 on every row before applying their frequencies, so switching back from Off reliably resumes collection — including daily/on-load collectors not in the preset list. Pair with two SQL Agent jobs to compose time-of-day windows (apply Off at the start of a quiet window, apply a named preset to resume) without needing a scheduler feature in the collectors themselves. Heads up: applying a non-Off preset overrides any manual UPDATE config.collection_schedule SET enabled = 0 on a specific collector. Documented in the proc header. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Apr 27, 2026
Closed
Merged
pull Bot
pushed a commit
to ehtick/PerformanceMonitor
that referenced
this pull request
Apr 29, 2026
…ll, version bumps - New Installed Version column in Manage Servers for both editions: * Full: probes config.installation_history per server in parallel * Lite: shows the running app version (mirrors Full's header for consistency) - Back-ports the Ellipse-with-DataTriggers status dot and right-aligned favorite star from Lite's server list to the Full Dashboard - Bumps Version/AssemblyVersion/FileVersion/InformationalVersion to 2.9.0 in Dashboard, Lite, Installer, and Installer.Core - Rewrites CHANGELOG: fixes the 2.8.0 date to 2026-04-22 (was TBD), moves Off preset (erikdarlingdata#888) to 2.9.0 since erikdarlingdata#891 landed after the v2.8.0 tag, and adds the full 2.9.0 entry covering the post-2.8.0 PR set - Updates README's DuckDB version reference (1.5.0 -> 1.5.2) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Off, toconfig.apply_collection_preset. It setsenabled = 0on every row inconfig.collection_scheduleand returns — no frequency edits.Aggressive,Balanced,Low-Impact) now also setenabled = 1across the board before applying their frequency tables. A switch fromOff → Balancedtherefore reliably resumes collection, including for daily/on-load collectors that aren't in the preset frequency list.PRINTsummary, README blurb, and CHANGELOG.Why this way
#888 lays out the reasoning: rather than invent a generic blackout/quiet-hours system (timezones, DST, midnight wrap-around, catch-up logic), use presets as the intensity+presence dial and let SQL Agent jobs compose time-of-day windows:
```sql
-- Agent job "Quiet hours - start" (schedule: daily 22:00)
EXECUTE config.apply_collection_preset @preset_name = N'Off';
-- Agent job "Quiet hours - end" (schedule: daily 06:00)
EXECUTE config.apply_collection_preset @preset_name = N'Balanced';
```
Zero new schema, zero new collector code, Agent owns time zones and DST, the switchover is a pair of idempotent
UPDATEstatements.Test plan
Run the install script against a server, then:
```sql
-- starting state: 34/34 enabled
SELECT enabled_count = COUNT_BIG(*) FROM config.collection_schedule WHERE enabled = 1;
EXEC config.apply_collection_preset @preset_name = N'Off';
-- expected: "Applied "Off" collection preset (34 collectors disabled)"
SELECT enabled_count = COUNT_BIG(*) FROM config.collection_schedule WHERE enabled = 1;
-- expected: 0/34
EXEC config.apply_collection_preset @preset_name = N'Balanced';
-- expected: "Applied "Balanced" collection preset (29 collectors updated)"
SELECT enabled_count = COUNT_BIG(*) FROM config.collection_schedule WHERE enabled = 1;
-- expected: 34/34
EXEC config.apply_collection_preset @preset_name = N'Garbage';
-- expected: RAISERROR "Invalid preset name "Garbage". Valid presets: Off, Aggressive, Balanced, Low-Impact"
```
Verified against sql2022 — all three transitions produce the expected counts and invalid preset raises cleanly.
Off → 0 enabled,Balanced → 34 enabledUPDATE)Heads up
Applying a non-
Offpreset overrides any manualUPDATE config.collection_schedule SET enabled = 0on a specific collector. That's intentional — per-collector disable/re-enable is the user's choice to make after switching presets. Documented in the proc header.No upgrade script needed — `install/41_schedule_management.sql` uses the stub-then-`ALTER` pattern and re-runs on upgrade.
Closes #888.
🤖 Generated with Claude Code