Documentation
¶
Index ¶
- Variables
- type FeatureExtractorMonitor
- func (m FeatureExtractorMonitor[F]) Extract() ([]plugins.Feature, error)
- func (m FeatureExtractorMonitor[F]) GetName() string
- func (m FeatureExtractorMonitor[F]) Init(db db.DB, conf conf.FeatureExtractorConfig) error
- func (m FeatureExtractorMonitor[F]) MarkAsUpdated()
- func (m FeatureExtractorMonitor[F]) NeedsUpdate() bool
- func (m FeatureExtractorMonitor[F]) NextPossibleExecution() time.Time
- func (m FeatureExtractorMonitor[F]) NotifySkip()
- func (m FeatureExtractorMonitor[F]) Triggers() []string
- type FeatureExtractorPipeline
- type FeatureExtractorTelemetryPublisher
- func (p FeatureExtractorTelemetryPublisher) Extract() ([]plugins.Feature, error)
- func (p FeatureExtractorTelemetryPublisher) GetName() string
- func (p FeatureExtractorTelemetryPublisher) Init(db db.DB, conf conf.FeatureExtractorConfig) error
- func (p FeatureExtractorTelemetryPublisher) MarkAsUpdated()
- func (p FeatureExtractorTelemetryPublisher) NeedsUpdate() bool
- func (p FeatureExtractorTelemetryPublisher) NextPossibleExecution() time.Time
- func (p FeatureExtractorTelemetryPublisher) NotifySkip()
- func (p FeatureExtractorTelemetryPublisher) Triggers() []string
- type Monitor
Constants ¶
This section is empty.
Variables ¶
var SupportedExtractors = []plugins.FeatureExtractor{ &vmware.VROpsHostsystemResolver{}, &vmware.VROpsProjectNoisinessExtractor{}, &vmware.VROpsHostsystemContentionLongTermExtractor{}, &vmware.VROpsHostsystemContentionShortTermExtractor{}, &kvm.NodeExporterHostCPUUsageExtractor{}, &kvm.NodeExporterHostMemoryActiveExtractor{}, &netapp.StoragePoolCPUUsageExtractor{}, &shared.HostUtilizationExtractor{}, &shared.HostCapabilitiesExtractor{}, &shared.VMHostResidencyExtractor{}, &shared.VMLifeSpanHistogramExtractor{}, &shared.HostAZExtractor{}, &shared.HostPinnedProjectsExtractor{}, &shared.ProjectResourceUtilizationExtractor{}, &shared.ProjectResourceCommitmentsExtractor{}, &sap.HostDetailsExtractor{}, }
Configuration of feature extractors supported by the scheduler.
Functions ¶
This section is empty.
Types ¶
type FeatureExtractorMonitor ¶
type FeatureExtractorMonitor[F plugins.FeatureExtractor] struct { // The wrapped feature extractor to monitor. FeatureExtractor F // contains filtered or unexported fields }
Wrapper for a feature extraction step that monitors the step's execution.
func (FeatureExtractorMonitor[F]) Extract ¶
func (m FeatureExtractorMonitor[F]) Extract() ([]plugins.Feature, error)
Run the wrapped feature extractor and measure the time it takes.
func (FeatureExtractorMonitor[F]) GetName ¶
func (m FeatureExtractorMonitor[F]) GetName() string
Get the name of the wrapped feature extractor.
func (FeatureExtractorMonitor[F]) Init ¶
func (m FeatureExtractorMonitor[F]) Init(db db.DB, conf conf.FeatureExtractorConfig) error
Initialize the wrapped feature extractor with the database and options.
func (FeatureExtractorMonitor[F]) MarkAsUpdated ¶
func (m FeatureExtractorMonitor[F]) MarkAsUpdated()
func (FeatureExtractorMonitor[F]) NeedsUpdate ¶
func (m FeatureExtractorMonitor[F]) NeedsUpdate() bool
func (FeatureExtractorMonitor[F]) NextPossibleExecution ¶
func (m FeatureExtractorMonitor[F]) NextPossibleExecution() time.Time
func (FeatureExtractorMonitor[F]) NotifySkip ¶
func (m FeatureExtractorMonitor[F]) NotifySkip()
func (FeatureExtractorMonitor[F]) Triggers ¶
func (m FeatureExtractorMonitor[F]) Triggers() []string
Get the message topics that trigger a re-execution of the wrapped feature extractor.
type FeatureExtractorPipeline ¶
type FeatureExtractorPipeline struct {
// contains filtered or unexported fields
}
Pipeline that contains multiple feature extractors and executes them.
func NewPipeline ¶
func NewPipeline(config conf.ExtractorConfig, database db.DB, m Monitor, mqttClient mqtt.Client) FeatureExtractorPipeline
Create a new feature extractor pipeline with extractors contained in the configuration.
func (*FeatureExtractorPipeline) ExtractOnTrigger ¶
func (p *FeatureExtractorPipeline) ExtractOnTrigger()
Extract features from the data sources when triggered by MQTT messages. If mqtt is disabled, this function does nothing.
func (*FeatureExtractorPipeline) Init ¶
func (p *FeatureExtractorPipeline) Init(supportedExtractors []plugins.FeatureExtractor)
Initialize the feature extractors in the pipeline.
type FeatureExtractorTelemetryPublisher ¶
type FeatureExtractorTelemetryPublisher struct { // The wrapped extractor that provides the telemetry data. FeatureExtractor plugins.FeatureExtractor // The MQTT topic to publish telemetry data. // If not set, the extractor will not publish telemetry data. MQTTTopic string // The mqtt client to publish telemetry data. MQTTClient mqtt.Client }
func (FeatureExtractorTelemetryPublisher) Extract ¶
func (p FeatureExtractorTelemetryPublisher) Extract() ([]plugins.Feature, error)
Run the wrapped feature extractor and publish telemetry data if needed.
func (FeatureExtractorTelemetryPublisher) GetName ¶
func (p FeatureExtractorTelemetryPublisher) GetName() string
Get the name of the wrapped feature extractor.
func (FeatureExtractorTelemetryPublisher) Init ¶
func (p FeatureExtractorTelemetryPublisher) Init(db db.DB, conf conf.FeatureExtractorConfig) error
Initialize the wrapped feature extractor with the database and options.
func (FeatureExtractorTelemetryPublisher) MarkAsUpdated ¶
func (p FeatureExtractorTelemetryPublisher) MarkAsUpdated()
func (FeatureExtractorTelemetryPublisher) NeedsUpdate ¶
func (p FeatureExtractorTelemetryPublisher) NeedsUpdate() bool
func (FeatureExtractorTelemetryPublisher) NextPossibleExecution ¶
func (p FeatureExtractorTelemetryPublisher) NextPossibleExecution() time.Time
func (FeatureExtractorTelemetryPublisher) NotifySkip ¶
func (p FeatureExtractorTelemetryPublisher) NotifySkip()
func (FeatureExtractorTelemetryPublisher) Triggers ¶
func (p FeatureExtractorTelemetryPublisher) Triggers() []string
Get the message topics that trigger a re-execution of the wrapped feature extractor.
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
Collection of Prometheus metrics to monitor feature extraction.
func NewPipelineMonitor ¶
func NewPipelineMonitor(registry *monitoring.Registry) Monitor
Create a new feature extraction monitor and register the necessary Prometheus metrics.