Class AlertEvaluationService

java.lang.Object
com.nmontytskyi.monitoring.server.alert.AlertEvaluationService

@Service public class AlertEvaluationService extends Object
Core alerting service that evaluates all enabled alert rules against the latest metric data for a given service.

Called after every metric record is persisted. For each rule the service aggregates the relevant metric over the configured evaluation window (default: 60 minutes) and compares the result against the rule's threshold using the declared comparator. When a rule is breached and the per-rule cooldown has expired:

  1. An AlertEventEntity is persisted.
  2. The cooldown timer for that rule is reset via AlertCooldownManager.
  3. Email notification is dispatched via AlertNotificationService.
Author:
Nazar Montytskyi
See Also:
  • Constructor Details

    • AlertEvaluationService

      public AlertEvaluationService()
  • Method Details