Package io.jenkins.plugins.auditlogger
Class AnomalyDetector
java.lang.Object
io.jenkins.plugins.auditlogger.AnomalyDetector
Lightweight anomaly detection for dashboard alerts.
Failed-login detection is intentionally simple, bounded, and configurable so
it can run safely on the audit ingest path without accumulating unbounded
state.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddAlert(AnomalyDetector.AnomalyAlert alert, AuditLoggerConfiguration config) voidanalyze(AuditLogEntry entry) voidanalyze(AuditLogEntry entry, AuditLoggerConfiguration config) voidbooleandismissAlert(String alertId) voidintgetAlerts(int limit) getAlerts(int limit, AuditLoggerConfiguration config) booleanisRuleEnabled(AnomalyDetector.AnomalyType type, AuditLoggerConfiguration config) protected voidsendEmail(jakarta.mail.internet.MimeMessage msg) Protected for testingprotected voidsendWebhook(String url, String json) Protected for testing
-
Constructor Details
-
AnomalyDetector
public AnomalyDetector()
-
-
Method Details
-
analyze
-
analyze
-
addAlert
-
addAlert
-
getAlerts
-
getAlerts
-
isRuleEnabled
-
dismissAlert
-
dismissAllAlerts
public int dismissAllAlerts() -
dismissAlertsForDisabledRules
-
cleanupOldAlerts
public void cleanupOldAlerts() -
getStatistics
-
sendEmail
Protected for testing- Throws:
Exception
-
sendWebhook
Protected for testing- Throws:
Exception
-