Repository navigation
Labels
Description
Summary
Implement and document the Daily Support Checks scheduled task and reporting workflow.
What was added
- A PowerShell-based Daily Support Check runner under
ScheduledTasks/DailySupportCheck. - Configurable checks for:
- PowerShell runtime availability
- Report output directory
- Disk space
- Health Monitoring services
- Subscription service status
- KurrentDB projections
- Scheduled tasks
- KurrentDB write activity
- Template/configuration validation
- Configuration-driven enablement and settings through
daily-support-check.json. - Environment-variable-based secret handling for KurrentDB and Brevo credentials; secrets are not stored in the JSON configuration.
Reporting
- JSON reports retain detailed check results and diagnostics.
- HTML reports use a compact three-column layout: check name, traffic-light status icon, and short summary.
- Failure summaries are kept short while full details remain available in JSON.
- Email subjects include overall status, server name, and report date:
Daily Support Check - <Status> - <ServerName> - <YYYY-MM-DD> - Brevo API is used for email delivery.
- Report retention is configurable through
ReportRetentionDays, with a default of 7 days.
Scheduling and CI/CD
- Added
DailySupportCheck.xmlfor Windows Task Scheduler. - The task runs daily at 09:00 using PowerShell 7 and the configured report output path.
- Pull request workflow runs the Daily Support Check Pester tests.
- Push-to-main and release workflows package the scheduled task, script, and base configuration.
- Machine-local secrets and overrides remain outside the repository configuration.
Fixes included
- Corrected handling of the subscription-service response so all subscriptions are evaluated rather than treating the response as a single subscription object.
- Replaced the flagged
ConvertTo-SecureString -AsPlainTextcall with a read-onlySecureStringbuilt directly for thePSCredentialboundary. - Added a focused test proving the secure-string conversion remains read-only and round-trips correctly for authentication use.
Verification
- Local Daily Support Check Pester suite: 35 passed, 0 failed.
- Focused secure-string helper validation passed.
- CodeQL and repository workflow checks passed on PR feat: add daily support check reporting #783.
- PR: feat: add daily support check reporting #783
- Implementation commit:
d7d33c2
Known follow-up
Codacy still reports a security annotation related to the previous plaintext conversion pattern, despite the call being removed from the implementation. The remaining Codacy result should be reviewed as a stale or mislocated analyzer finding and cleared or documented in Codacy as appropriate.
Acceptance criteria
- Daily checks can be run manually and from Windows Task Scheduler.
- Reports are generated in JSON and compact HTML formats.
- Brevo email delivery works using environment-provided credentials.
- Reports older than the configured retention period are removed.
- Pull request and release workflows include the required script, configuration, tests, and schedule definition.
- All automated checks pass, including resolution of the remaining Codacy finding.
Activity