fix(kuma-config): add retries + lower timeout to stop false-down alerts - #21
Merged
Conversation
Web-page and several DNS monitors had maxretries=0, so a single transient timeout fired an immediate false Down + Slack. Set defaults to retries=3, retryInterval=20, timeout=20 (was 48), and drop the now-redundant per-monitor overrides. A real outage is confirmed over ~60s; a one-off blip is ignored.
There was a problem hiding this comment.
Pull request overview
This PR adjusts Uptime Kuma monitor reconciliation defaults so transient failures don’t immediately flip monitors to Down, reducing false-positive alerts and Slack noise in production. The change is applied via the existing declarative kuma.yaml + apply.js reconciliation workflow.
Changes:
- Set monitor defaults in
apply.jstomaxretries=3,retryInterval=20, andtimeout=20(previouslymaxretries=0,retryInterval=60,timeout=48). - Remove per-monitor
interval/retryInterval/maxretriesoverrides fromkuma.yamlso monitors consistently inherit the centralized defaults.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| kuma-config/kuma.yaml | Removes per-monitor retry/interval overrides so the declared monitors rely on a single shared set of defaults. |
| kuma-config/apply.js | Updates reconciliation defaults to add retries and reduce timeout, aligning monitor behavior across the fleet. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Move interval/retryInterval/maxretries (and timeout for HTTP) back onto each monitor in kuma.yaml so the desired state is explicit in the file, not implied by apply.js defaults. Values are uniform for now (60/20/3, timeout 15 on HTTP; DNS omits timeout since Kuma ignores it); the defaults stay as a fallback.
…TP-only Per review: MONITOR_DEFAULTS is merged into every monitor payload, so DNS monitors are sent timeout=15 too (Kuma ignores it for DNS). Reword the comments to say DNS monitors don't *declare* timeout (rather than 'omit' it).
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.
Problem: intermittent false
Downalerts (timeout of 48000ms exceeded, recovering ~1 min later). Root cause: the web-page and several DNS monitors hadmaxretries: 0— a single transient timeout fired an instant Down + Slack, with no re-check.Fix: tune the monitor thresholds and declare them explicitly per monitor in
kuma.yaml(desired state lives in the file, not hidden in the applier defaults):interval: 60,retryInterval: 20,maxretries: 3on every monitor.timeout: 15on HTTP monitors only (prober + web pages). DNS monitors omit it — Kuma ignores the timeout field for DNS. Timeout is kept< retryIntervalso each attempt finishes before the next retry.MONITOR_DEFAULTSinapply.jskeeps these as a fallback for new monitors.A real sustained outage now needs several consecutive failures before alerting; a one-off blip is retried and ignored. Values are uniform for now (validated appropriate for both DNS and HTTP); per-monitor differentiation is easy since they're explicit.
Applied via the config-as-code pipeline on merge (or
node apply.js).