A detector's persisted position: what state it is in, how it got there, and what it has seen. Two separate records of the past are kept, because they answer different questions and have very different sizes. The recent buckets list is a bounded window of every evaluation, which is what the sparkline on the admin screen draws. The anomalies list is every anomalous bucket within the retention period, which is what thresholds get tuned against. Keeping all of both for an hourly detector would mean parsing several thousand entries on every scan for no benefit.
Properties
| Property | Returns | Description |
|---|---|---|
| anomalies | List<AnomalyHistoryEntry> | Every anomalous bucket still within the retention period, oldest first. |
| anomalyCount | int | How many anomalies are on record within the retention period. |
| clearedDate | Date | When the detector's most recently open incident was judged recovered. |
| consecutiveAnomalous | int | How many anomalous buckets have arrived in a row, the counter hysteresis is judged against. |
| consecutiveClean | int | How many normal buckets have arrived in a row since the last anomalous one, used to decide when an open incident recovers. |
| detectorName | String | Name of the detector this state belongs to, and the key it is persisted under. |
| firstDetected | Date | When the current run of abnormality began. |
| inAlarm | boolean | Whether an incident is currently open for this detector. |
| lastDetected | Date | The most recent bucket that was judged anomalous. |
| lastEvaluatedBucket | Date | The newest bucket already accounted for. The scheduler runs far more often than a daily bucket closes, so without this a single bad day would be counted as two dozen consecutive anomalous buckets and would trip any hysteresis immediately. |
| lastNotified | Date | When an alarm event was last fired for the open incident. This is what the re-notification window is measured from, and it is cleared when the incident closes so the next one notifies at once. |
| lastScanned | Date | When this detector's scheduler last ran, regardless of whether it found a new bucket to evaluate. |
| latest | AnomalyHistoryEntry | The most recent evaluation of any kind, anomalous or not. |
| recentBuckets | List<AnomalyHistoryEntry> | A bounded window of every evaluated bucket, oldest first, for drawing the recent trend. |
| state | AlarmState | Where the detector currently stands in the alarm lifecycle. |
| stateName | String | The current state as a string, for script and templates that cannot work with the enum directly. |
Methods
getDetectorName() · getState() · getStateName() · isInAlarm() · getConsecutiveAnomalous() · getConsecutiveClean() · getFirstDetected() · getLastDetected() · getClearedDate() · getLastNotified() · getLastEvaluatedBucket() · getLastScanned() · getLatest() · getRecentBuckets() · getAnomalies() · getAnomalyCount()
getDetectorName()
Returns: String
Name of the detector this state belongs to, and the key it is persisted under.
getState()
Returns: AlarmState
Where the detector currently stands in the alarm lifecycle.
getStateName()
Returns: String
The current state as a string, for script and templates that cannot work with the enum directly.
isInAlarm()
Returns: boolean
Whether an incident is currently open for this detector.
getConsecutiveAnomalous()
Returns: int
How many anomalous buckets have arrived in a row, the counter hysteresis is judged against.
getConsecutiveClean()
Returns: int
How many normal buckets have arrived in a row since the last anomalous one, used to decide when an open incident recovers.
getFirstDetected()
Returns: Date
When the current run of abnormality began.
getLastDetected()
Returns: Date
The most recent bucket that was judged anomalous.
getClearedDate()
Returns: Date
When the detector's most recently open incident was judged recovered.
getLastNotified()
Returns: Date
When an alarm event was last fired for the open incident. This is what the re-notification window is measured from, and it is cleared when the incident closes so the next one notifies at once.
getLastEvaluatedBucket()
Returns: Date
The newest bucket already accounted for. The scheduler runs far more often than a daily bucket closes, so without this a single bad day would be counted as two dozen consecutive anomalous buckets and would trip any hysteresis immediately.
getLastScanned()
Returns: Date
When this detector's scheduler last ran, regardless of whether it found a new bucket to evaluate.
getLatest()
Returns: AnomalyHistoryEntry
The most recent evaluation of any kind, anomalous or not.
getRecentBuckets()
Returns: List<AnomalyHistoryEntry>
A bounded window of every evaluated bucket, oldest first, for drawing the recent trend.
getAnomalies()
Returns: List<AnomalyHistoryEntry>
Every anomalous bucket still within the retention period, oldest first.
getAnomalyCount()
Returns: int
How many anomalies are on record within the retention period.