mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-31 07:35:24 +00:00
feat: remove legacy alert rules, superseded by automations
Alert rules already auto-migrate into automations on boot and the old engine stands down after. Deletes the rule/firing tables, routes, UI, and AI tools; keeps notification channels since automations still use them. Also fixes automations' notify step, which still called the deleted repository.
This commit is contained in:
1 parent
e0f14f2ecf
commit
e372b0eda7
101 files changed
+29118
-5539
No files matched your search
@@ -69,7 +69,6 @@ import { registerProxmoxStatsHistoryRoutes } from "../../../src/backend/hosts/me
|
||||
import { ProxmoxPollingManager } from "../../../src/backend/hosts/metrics/proxmox-stats-polling.js";
|
||||
import type { HostSessionStatusPayload } from "../../../src/backend/hosts/host-session-status.js";
|
||||
import { pluginEvents, TOPICS } from "../../../src/backend/plugins/events.js";
|
||||
import { AlertEngine } from "./alert-engine.js";
|
||||
import {
|
||||
notifyAutomationMetrics,
|
||||
notifyAutomationStatus,
|
||||
@@ -662,9 +661,6 @@ class PollingManager {
|
||||
this.scheduleInitialMetricsPoll(config.host, config.viewerUserId);
|
||||
}
|
||||
}
|
||||
AlertEngine.getInstance()
|
||||
.evaluateStatus(refreshedHost.id, isOnline)
|
||||
.catch(() => {});
|
||||
notifyAutomationStatus(refreshedHost.id, refreshedHost.userId, isOnline);
|
||||
} catch {
|
||||
const statusEntry: StatusEntry = {
|
||||
@@ -672,9 +668,6 @@ class PollingManager {
|
||||
lastChecked: new Date().toISOString(),
|
||||
};
|
||||
this.statusStore.set(refreshedHost.id, statusEntry);
|
||||
AlertEngine.getInstance()
|
||||
.evaluateStatus(refreshedHost.id, false)
|
||||
.catch(() => {});
|
||||
notifyAutomationStatus(refreshedHost.id, refreshedHost.userId, false);
|
||||
}
|
||||
}
|
||||
@@ -730,9 +723,6 @@ class PollingManager {
|
||||
timestamp: Date.now(),
|
||||
});
|
||||
await this.insertMetricsHistory(refreshedHost.id, metrics);
|
||||
AlertEngine.getInstance()
|
||||
.evaluateMetrics(refreshedHost.id, metrics)
|
||||
.catch(() => {});
|
||||
notifyAutomationMetrics(refreshedHost.id, refreshedHost.userId, metrics);
|
||||
pollingBackoff.reset(refreshedHost.id);
|
||||
authFailureTracker.reset(refreshedHost.id);
|
||||
@@ -1124,9 +1114,6 @@ app.post("/internal/login-alert", async (req, res) => {
|
||||
sshUser,
|
||||
fromIp,
|
||||
});
|
||||
AlertEngine.getInstance()
|
||||
.evaluateUserLogin(hostId, userId, sshUser, fromIp)
|
||||
.catch(() => {});
|
||||
res.json({ ok: true });
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user