What it is
signalguard-aiops is a lightweight library for time-series anomaly detection: z-score, EMA, Isolation Forest, LOF, Prophet residuals, LSTM autoencoders, and opinionated AIOps recipes.
Core use cases
• Error-rate incident detection
• Latency SLO breach detection (p95/p99)
• Ensemble anomaly scoring across detectors
• Prometheus-integrated incident pipelines
Tech stack
Python · NumPy · Pandas · scikit-learn · Prophet · TensorFlow · Prometheus HTTP API adapter.
Repository
Quick start
Install in editable mode and run the included recipes on synthetic or Prometheus-backed metrics.
git clone https://github.com/danial-amin/signalguard-aiops
cd signalguard-aiops
pip install -e .
from signalguard_aiops.metrics import TimeSeries
from signalguard_aiops.recipes import ErrorRateZScoreRecipe
from signalguard_aiops.incidents import IncidentScorer
ts = TimeSeries.from_lists(timestamps, values, name="error_rate")
recipe = ErrorRateZScoreRecipe(service="checkout")
incident = recipe.run(ts)
severity = IncidentScorer.simple_severity(incident)
from signalguard_aiops.recipes import LatencySLORecipe
recipe = LatencySLORecipe(
service="payments",
metric="latency_p95",
slo_ms=300.0,
)
incident = recipe.run(ts)
from signalguard_aiops.pipelines import PrometheusSeriesFetcher
fetcher = PrometheusSeriesFetcher("http://localhost:9090")
series = fetcher.fetch_range(
query='rate(app_request_errors_total[5m])',
start_ts=..., end_ts=..., step="30s"
)
Included detectors
ZScoreDetector · EMADetector · IsolationForestDetector · LOFDetector · ProphetResidualDetector · LSTMAutoencoderDetector
These detectors are exposed behind a common interface and can be composed into higher-level recipes for error-rate incidents, latency SLOs, and ensemble scoring across heterogeneous models.
AIOps recipes
Opinionated building blocks for production-style monitoring flows.
Examples:
• ErrorRateZScoreRecipe: simple, interpretable baseline.
• ErrorRateIForestRecipe: non-Gaussian error distributions.
• LatencySLORecipe: SLO-aware latency anomaly detection.
• EnsembleErrorRateRecipe: majority-vote ensemble combining multiple detectors.