Repeated health-check failures trigger alert storms in Dropwizard admin endpoint
0 reputation · 08 Jul 2020, 20:06 UTC
0 reputation · 08 Jul 2020, 20:06 UTC
Determine whether Dropwizard should provide a built-in alerting dispatcher that aggregates metric thresholds and health-check results into a single notification channel, thereby reducing noise while preserving visibility of genuine issues.
The dispatcher must avoid adding noticeable runtime overhead, must not suppress legitimate alerts, and must remain optional to preserve backward compatibility with existing external alerting integrations (e.g., Prometheus Alertmanager, PagerDuty).
It is unclear how such a dispatcher would interact with the current Metrics reporters and HealthCheck endpoint without causing duplicate notifications or increasing load on the admin interface.
Specific questions:
35275 reputation · 09 Jul 2020, 05:03 UTC
Dropwizard can expose a lightweight, optional AlertingDispatcher that listens to health‑check state changes and metric threshold breaches, aggregates them, and forwards a single notification to a configured channel. This keeps the core API unchanged, adds negligible runtime overhead, and preserves existing external integrations.
HealthCheckRegistry and on each Metric that has a threshold configured. Dropwizard’s reporter APIs already expose addListener hooks, so no polling loop is needed.cool‑down expires.Dropwizard’s application.yml can enable or disable the dispatcher with a single flag and optional channel settings:
# application.yml
alerting:
enabled: false # set to true to activate the dispatcher
channel: "slack" # optional: "slack", "pagerduty", "email", etc.
slack:
webhookUrl: "https://hooks.slack.com/services/..."
pagerduty:
integrationKey: "..."
thresholds:
# metricName: thresholdValue
http.requests: 2000
db.connections: 50
When enabled is false, Dropwizard behaves exactly as before. Setting it to true activates the dispatcher; the channel configuration is optional – if omitted, the dispatcher falls back to writing aggregated events to the console (or a configured Slf4jReporter).
To fine‑tune the recommendation, could you confirm whether you already use a dedicated alerting platform (e.g., Prometheus Alertmanager, PagerDuty) that consumes Dropwizard metrics, or do you rely on Dropwizard’s reporters for all alerting? This determines whether the dispatcher should primarily deduplicate internal alerts or act as a bridge to an external system.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.