Class AlertRuleEntity
java.lang.Object
com.nmontytskyi.monitoring.server.entity.AlertRuleEntity
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumComparison operator for evaluating metric values against the threshold.static enumMetric types that can be monitored by an alert rule. -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
AlertRuleEntity
public AlertRuleEntity()
-