E
- The entity-level at which the metric anomaly analysis will be performed -- e.g. broker-level.public abstract class PercentileMetricAnomalyFinder<E extends Entity> extends java.lang.Object implements MetricAnomalyFinder<E>
Modifier and Type | Field and Description |
---|---|
protected double |
_anomalyLowerMargin |
protected java.lang.Double |
_anomalyLowerPercentile |
protected double |
_anomalyUpperMargin |
protected java.lang.Double |
_anomalyUpperPercentile |
protected java.util.Set<java.lang.String> |
_interestedMetrics |
Constructor and Description |
---|
PercentileMetricAnomalyFinder() |
Modifier and Type | Method and Description |
---|---|
void |
configure(java.util.Map<java.lang.String,?> configs)
Configure this class with the given key-value pairs
|
protected abstract MetricAnomaly<E> |
createMetricAnomaly(java.lang.String description,
E entity,
java.lang.Short metricId,
java.util.List<java.lang.Long> windows) |
protected java.lang.String |
description(E entity,
java.lang.Short metricId,
java.lang.Long currentWindow,
java.util.List<java.lang.Long> historyWindows,
double currentMetricValue,
double upperThreshold,
double lowerThreshold)
Create a string describing what exactly is the anomaly.
|
java.util.Collection<MetricAnomaly<E>> |
metricAnomalies(java.util.Map<E,ValuesAndExtrapolations> metricsHistoryByEntity,
java.util.Map<E,ValuesAndExtrapolations> currentMetricsByEntity)
Get a collection of metric anomalies for entities if an anomaly in their current aggregated metrics
values is detected for their metric ids, based on their history.
|
protected abstract java.lang.String |
toMetricName(java.lang.Short metricId)
Get the metric name from metric id.
|
protected double _anomalyUpperMargin
protected double _anomalyLowerMargin
protected java.lang.Double _anomalyUpperPercentile
protected java.lang.Double _anomalyLowerPercentile
protected java.util.Set<java.lang.String> _interestedMetrics
protected java.lang.String description(E entity, java.lang.Short metricId, java.lang.Long currentWindow, java.util.List<java.lang.Long> historyWindows, double currentMetricValue, double upperThreshold, double lowerThreshold)
entity
- the entity for which the anomaly was detected.metricId
- the metric id for which the anomaly was detected.currentWindow
- the time windows of the current metric values.historyWindows
- the time windows of the historic metric values.currentMetricValue
- the current metric value.upperThreshold
- the upper threshold of the normal metric value.lowerThreshold
- the lower threshold of the normal metric value.protected abstract java.lang.String toMetricName(java.lang.Short metricId)
protected abstract MetricAnomaly<E> createMetricAnomaly(java.lang.String description, E entity, java.lang.Short metricId, java.util.List<java.lang.Long> windows)
public java.util.Collection<MetricAnomaly<E>> metricAnomalies(java.util.Map<E,ValuesAndExtrapolations> metricsHistoryByEntity, java.util.Map<E,ValuesAndExtrapolations> currentMetricsByEntity)
metricAnomalies
in interface MetricAnomalyFinder<E extends Entity>
metricsHistoryByEntity
- Metrics history by entity.currentMetricsByEntity
- Current metrics by entity.public void configure(java.util.Map<java.lang.String,?> configs)
CruiseControlConfigurable
configure
in interface CruiseControlConfigurable