Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DerivedMetricCalculator ¶
type DerivedMetricCalculator interface {
GetDerivedMetric(currentTime int64, metricData MetricData) *DerivedMetricResult
}
func NewDerivedMetricCalculator ¶
func NewDerivedMetricCalculator(sampleInterval int64, config *DerivedMetricConfig) (DerivedMetricCalculator, error)
type DerivedMetricConfig ¶
type DerivedMetricConfig struct { MetricName string `json:"metric_name"` Type string `json:"type"` Resource string `json:"resource"` Normalizer *string `json:"normalizer,omitempty"` ObservationWindowSec int64 `json:"observation_window_sec"` Tags map[string]string `json:"tags,omitempty"` ThresholdConfig *ThresholdBasedConfig `json:"threshold"` }
type DerivedMetricResult ¶
type DerivedMetrics ¶
type DerivedMetrics struct { States map[string]DerivedMetricCalculator GlobConfigs []GlobConfig SampleInterval int64 }
func NewDerivedMetrics ¶
func NewDerivedMetrics(sampleInterval int64, configs []DerivedMetricConfig) (*DerivedMetrics, error)
func (*DerivedMetrics) ProcessMetric ¶
func (dm *DerivedMetrics) ProcessMetric(currentTime int64, metricData MetricData) (*DerivedMetricResult, error)
type GlobConfig ¶
type GlobConfig struct { Config *DerivedMetricConfig Pattern glob.Glob }
type MetricData ¶
type NodeAnalyzer ¶
type NodeAnalyzer struct { DerivedMetrics *DerivedMetrics NormalizerMapping map[string]string // contains filtered or unexported fields }
func (*NodeAnalyzer) ProcessMetrics ¶
type ThresholdBasedConfig ¶
type ThresholdBasedState ¶
type ThresholdBasedState struct { MetricName string DerivedMetricConfig *DerivedMetricConfig SampleInterval int64 WindowStateHit *WindowStateHit }
func NewThresholdBasedState ¶
func NewThresholdBasedState(sampleInterval int64, config *DerivedMetricConfig) *ThresholdBasedState
func (*ThresholdBasedState) GetDerivedMetric ¶
func (tbs *ThresholdBasedState) GetDerivedMetric(currentTime int64, metricData MetricData) *DerivedMetricResult
Click to show internal directories.
Click to hide internal directories.