detect_anomalies
Compare an activity window against historical baselines to flag unusual events, volume spikes, new sources, and failure bursts. Pinpoints outliers with evidence and threshold reasoning.
Instructions
Compare a window against each actor's stored baseline and flag outliers.
Checks run: previously unseen actor, event volume above SPIKE_MULTIPLIER x
the actor's historical daily average, source IPs absent from the baseline
lookback, failed-event bursts, sustained high failure rate, off-hours
activity spikes, and never-before-seen action types. Every finding includes
the observed value, the threshold crossed, and a reasoning sentence.
Baselines live in the local SQLite state file and are refreshed from the period immediately preceding the window when they are stale. Events in the analysed window itself are not folded into the baseline, so re-running the same window yields the same findings.
Args: date_from: Start of the window under investigation, ISO-8601. date_to: End of the window under investigation, ISO-8601. baseline_days: Days of history preceding the window to baseline against.
Returns:
A dict with findings (severity-ordered, each with evidence and
reasoning), findings_by_type/findings_by_severity counts, and
the active thresholds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date_to | Yes | ||
| date_from | Yes | ||
| baseline_days | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||