#5740 "A metric that departs from its normal is recorded as an anomaly to review, and is findable after it ends", milestone 513. - Every minute each learned key's last 15 minutes is judged against its hour's normal: above the usual hold x1.25 and by the metric's floor opens an occurrence, which ends when the level comes back. - metric_anomalies holds one row per item to review; a repeat while it still waits joins it as an occurrence (metric_anomaly_spans). - An ended row nobody reviews within anomalies.review_days (14, Settings -> Thresholds) lapses; an ongoing one never does. - Learning skips every hour an occurrence covers unless its anomaly was marked normal: no normal is learned without review. - Alerts -> Anomalies lists those to review first, then the reviewed and lapsed under day dividers; marking is operator/admin and audited. - The Overview widget and get_overview warn of open ones and count those to review; the host page shows its own; the weekly report lists the week's and the lapsed; MCP list_anomalies and review_anomaly. - Reviewed and lapsed rows are pruned at data.retention_days, and kept in backups like alert history. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
1.3 KiB
Python
31 lines
1.3 KiB
Python
from .base import Base
|
|
from .users import User
|
|
from .api_tokens import ApiToken
|
|
from .invites import UserInvite
|
|
from .password_resets import PasswordReset
|
|
from .hosts import Host
|
|
from .monitors import Monitor, MonitorResult, MonitorType
|
|
from .metrics import PluginMetric
|
|
from .norms import MetricNorm, MetricAnomaly, MetricAnomalySpan
|
|
from .alerts import AlertRule, AlertState, AlertEvent, AlertOperator, AlertStateEnum
|
|
from .ansible import AnsibleRun, AnsibleRunStatus
|
|
from .ansible_inventory import AnsibleTarget, AnsibleGroup, ansible_target_groups
|
|
from .ansible_schedule import AnsibleSchedule
|
|
from .settings import AppSetting
|
|
from .dashboard import Dashboard, DashboardWidget, DashboardShareToken
|
|
from .outbox import EmailOutbox, email_outbox_events
|
|
|
|
__all__ = [
|
|
"Base", "User", "ApiToken", "UserInvite", "PasswordReset",
|
|
"Host",
|
|
"Monitor", "MonitorResult", "MonitorType",
|
|
"PluginMetric", "MetricNorm", "MetricAnomaly", "MetricAnomalySpan",
|
|
"AlertRule", "AlertState", "AlertEvent", "AlertOperator", "AlertStateEnum",
|
|
"AnsibleRun", "AnsibleRunStatus",
|
|
"AnsibleTarget", "AnsibleGroup", "ansible_target_groups",
|
|
"AnsibleSchedule",
|
|
"AppSetting",
|
|
"Dashboard", "DashboardWidget", "DashboardShareToken",
|
|
"EmailOutbox", "email_outbox_events",
|
|
]
|