get_anomaly_history
Retrieve historical anomaly scores for a service to analyze past incidents or detector trends. Returns a time-series of scores from the TSDB.
Instructions
Replay historical anomaly scores for a service from the TSDB the gateway writes to (omcp_anomaly_score series). When to use: post-mortem reconstruction, trend analysis on detector noise, or pulling context for the LLM when an incident is reviewed after the fact. Prerequisites: the operator must have OMCP_ANOMALY_HISTORY_REMOTE_WRITE configured AND a Prometheus source pointed at the same TSDB so the round-trip closes. Behavior: read-only. Returns the time-series of scores. Empty result means either no anomalies in the window or history is disabled. Related: detect_anomalies for the live scores; query_metrics if you want to write the PromQL by hand.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| service | Yes | Service name to filter on. | |
| duration | No | Rolling window, e.g. '1h', '24h'. Default '1h'. | |
| method | No | Filter by detector method ('mad' / 'seasonality' / 'correlator'). Optional. |