Class AlertRuleEntity

java.lang.Object
com.nmontytskyi.monitoring.server.entity.AlertRuleEntity

@Entity public class AlertRuleEntity extends Object
JPA entity representing a configurable alerting rule for a microservice.

An alert rule defines when the monitoring server should fire an alert: when a specific metric (AlertRuleEntity.MetricType) crosses a threshold value in the direction specified by AlertRuleEntity.Comparator.

Example: metric_type = RESPONSE_TIME_AVG, comparator = GT, threshold = 1000 means "fire an alert when the average response time exceeds 1000 ms".

Maps to the alert_rules table.

  • Constructor Details

    • AlertRuleEntity

      public AlertRuleEntity()