-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Summary
This issue proposes adding a new plugin called Anomaly Guardrail to the OnAIR framework.
The plugin introduces configurable anomaly detection, severity classification, and severity-to-action mappings, providing a modular guardrail system for telemetry data streams.
Motivation
- Enhances OnAIR with real-time anomaly guardrails for telemetry.
- Supports severity-based responses (
LOG_ONLY
,REDUCE_LOAD
,SAFE_MODE
). - Complements existing plugins (e.g., Kalman, generic) by focusing specifically on fault detection and classification.
- Provides a reusable framework for anomaly detection that can be tested with both CSV and Redis telemetry sources.
Features
- Outlier detection using Z-score or Interquartile Range (IQR).
- Frozen signal (“stuck” values) detection.
- Severity classification:
minor
,moderate
,critical
. - Configurable severity-to-action mapping, e.g.,
minor:LOG_ONLY, moderate:REDUCE_LOAD, critical:SAFE_MODE
. - CSV audit logging of anomaly events.
- Log post-processor (
count_anomalies.py
) to collapse redundant anomaly runs. - Redis-based publisher (
redis-experiment-publisher-anomalies.py
) to simulate mixed normal + anomalous telemetry for testing.
Usage
-
Run with the sample config:
python driver.py onair/config/config_anomaly_guardrail.ini
-
Publish synthetic telemetry for testing:
python3 redis-experiment-publisher-anomalies.py --normals 100 --anomalies 50 --repeat 3 --shuffle
-
Post-process anomaly logs:
python3 count_anomalies.py --in logs/anomaly_events.csv --out logs/anomaly_events_clean.csv --mode edge --emit-end
Files to be Added
plugins/anomaly_guardrail_plugin.py
– core anomaly detection and classification logiconair/config/config_anomaly_guardrail.ini
– configuration of thresholds, severity mapping, monitored columnsredis-experiment-publisher-anomalies.py
– telemetry simulator for Rediscount_anomalies.py
– log summarization and cleanup utilitydoc/AnomalyGuardrail.md
– usage guide
Reference
Detailed usage and context included in this commit:
👉 AnomalyGuardrail@ commit
Metadata
Metadata
Assignees
Labels
No labels