Skip to content

fix(monitoring): default cleanup cron - #5026

Open
soumajitgh wants to merge 3 commits into
Dokploy:canaryfrom
soumajitgh:fix/monitoring-cleanup-cron
Open

fix(monitoring): default cleanup cron#5026
soumajitgh wants to merge 3 commits into
Dokploy:canaryfrom
soumajitgh:fix/monitoring-cleanup-cron

Conversation

@soumajitgh

@soumajitgh soumajitgh commented Aug 9, 2026

Copy link
Copy Markdown

Summary

  • default remote monitoring cleanup schedules to 0 0 * * *
  • backfill blank or whitespace-only persisted schedules through a migration
  • normalize blank schedules during remote server setup and fall back safely in the monitoring service
  • stop logging the token-bearing METRICS_CONFIG value

Root cause

Remote server setup preserved the schema's empty cronJob default. The monitoring container passed that value to the cron parser, exited on the resulting error, and then crash-looped under its always restart policy.

Validation

  • go test ./... (from apps/monitoring)
  • pnpm -C apps/dokploy run typecheck
  • pnpm exec biome check packages/server/src/db/schema/server.ts packages/server/src/setup/server-setup.ts
  • git diff --check

Closes #4950

Greptile Summary

The PR defaults blank remote-monitoring cleanup schedules to a daily midnight cron while preserving valid configured schedules and removing token-bearing configuration logs.

  • Updates the server schema default and backfills blank or whitespace-only persisted schedules.
  • Normalizes blank schedules during cloud remote-server setup.
  • Adds a monitoring-service fallback and tests for empty and invalid schedules.
  • Stops logging the complete METRICS_CONFIG environment value.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Reviews (2): Last reviewed commit: "chore: remove superseded monitoring migr..." | Re-trigger Greptile

Context used:

Backfill blank schedules and fall back safely so remote monitoring cannot crash-loop on setup.\n\nCloses Dokploy#4950
@soumajitgh
soumajitgh requested a review from Siumauricio as a code owner August 9, 2026 18:47
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Aug 9, 2026
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Aug 11, 2026
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: dokploy-monitoring crash-loops after remote server setup until Monitoring settings are saved

1 participant