diff --git a/frontend/src/pages/AlertsPage.jsx b/frontend/src/pages/AlertsPage.jsx index 3124986..70759f2 100644 --- a/frontend/src/pages/AlertsPage.jsx +++ b/frontend/src/pages/AlertsPage.jsx @@ -14,6 +14,86 @@ const initialForm = { enabled: true, }; +const STANDARD_ALERT_INFO = [ + { + name: "Target Reachability", + check: "Connection to target database can be established.", + comparison: "-", + warning: "-", + alert: "On connection failure", + }, + { + name: "Connectivity Latency", + check: "Connection handshake duration (ms).", + comparison: "gte", + warning: "1000 ms", + alert: "2500 ms", + }, + { + name: "Collector Freshness", + check: "Age of newest metric sample.", + comparison: "gte", + warning: "poll interval x2", + alert: "poll interval x4", + }, + { + name: "Active Connection Ratio", + check: "active_connections / total_connections.", + comparison: "gte", + warning: "0.70", + alert: "0.90", + }, + { + name: "Cache Hit Ratio", + check: "Buffer cache efficiency.", + comparison: "lte", + warning: "0.95", + alert: "0.90", + }, + { + name: "Lock Pressure", + check: "Current number of locks.", + comparison: "gte", + warning: "50", + alert: "100", + }, + { + name: "Checkpoint Pressure (15m)", + check: "Increase of requested checkpoints in last 15m.", + comparison: "gte", + warning: "5", + alert: "15", + }, + { + name: "Rollback Ratio", + check: "rollback / (commit + rollback) within rolling window.", + comparison: "gte", + warning: "0.10", + alert: "0.25", + }, + { + name: "Deadlocks (60m)", + check: "Increase in deadlocks in last 60 minutes.", + comparison: "gte", + warning: "1", + alert: "5", + }, + { + name: "Slowest Query Mean Time", + check: "Highest query mean execution time in latest snapshot.", + comparison: "gte", + warning: "300 ms", + alert: "1000 ms", + }, + { + name: "Slowest Query Total Time", + check: "Highest query total execution time in latest snapshot.", + comparison: "gte", + warning: "3000 ms", + alert: "10000 ms", + }, +]; + function formatAlertValue(value) { if (value === null || value === undefined) return "-"; if (Number.isInteger(value)) return String(value); @@ -343,6 +423,43 @@ export function AlertsPage() { +
+ +
+

Standard Alert Reference

+

What each built-in alert checks and which default thresholds are used.

+
+ +
+
+ Some rules include traffic guards to reduce noise (for example rollback ratio needs enough transactions). +
+
+ + + + + + + + + + + + {STANDARD_ALERT_INFO.map((row) => ( + + + + + + + + ))} + +
AlertChecksComparisonWarningAlert
{row.name}{row.check}{row.comparison}{row.warning}{row.alert}
+
+
+ {canManageAlerts && ( <>
diff --git a/frontend/src/styles.css b/frontend/src/styles.css index 4c414d4..c79d0a0 100644 --- a/frontend/src/styles.css +++ b/frontend/src/styles.css @@ -1314,6 +1314,30 @@ td { padding: 10px 3px 4px 0; } +.standard-alerts-note { + margin-bottom: 10px; + color: #a7c0df; + font-size: 13px; +} + +.standard-alerts-table-wrap { + overflow-x: auto; +} + +.standard-alerts-table th, +.standard-alerts-table td { + vertical-align: top; + font-size: 13px; +} + +.standard-alerts-table td code { + color: #d7e8ff; + background: #112846; + border: 1px solid #355d91; + border-radius: 6px; + padding: 1px 6px; +} + .alert-item { border-radius: 12px; border: 1px solid #375d8f;