Documentation
¶
Overview ¶
Package vmmetricsreceiver has the logic for scraping VM metrics and then passing them onto a metric consumer instance.
Index ¶
- type Config
- type Factory
- func (f *Factory) CreateDefaultConfig() configmodels.Receiver
- func (f *Factory) CreateMetricsReceiver(logger *zap.Logger, config configmodels.Receiver, ...) (component.MetricsReceiver, error)
- func (f *Factory) CreateTraceReceiver(ctx context.Context, logger *zap.Logger, cfg configmodels.Receiver, ...) (component.TraceReceiver, error)
- func (f *Factory) CustomUnmarshaler() component.CustomUnmarshaler
- func (f *Factory) Type() string
- type Receiver
- type VMMetricsCollector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { configmodels.ReceiverSettings `mapstructure:",squash"` ScrapeInterval time.Duration `mapstructure:"scrape_interval"` MountPoint string `mapstructure:"mount_point"` ProcessMountPoint string `mapstructure:"process_mount_point"` MetricPrefix string `mapstructure:"metric_prefix"` }
Config defines configuration for VMMetrics receiver.
type Factory ¶
type Factory struct { }
Factory is the Factory for receiver.
func (*Factory) CreateDefaultConfig ¶
func (f *Factory) CreateDefaultConfig() configmodels.Receiver
CreateDefaultConfig creates the default configuration for receiver.
func (*Factory) CreateMetricsReceiver ¶
func (f *Factory) CreateMetricsReceiver( logger *zap.Logger, config configmodels.Receiver, consumer consumer.MetricsConsumerOld, ) (component.MetricsReceiver, error)
CreateMetricsReceiver creates a metrics receiver based on provided config.
func (*Factory) CreateTraceReceiver ¶
func (f *Factory) CreateTraceReceiver( ctx context.Context, logger *zap.Logger, cfg configmodels.Receiver, nextConsumer consumer.TraceConsumerOld, ) (component.TraceReceiver, error)
CreateTraceReceiver creates a trace receiver based on provided config.
func (*Factory) CustomUnmarshaler ¶
func (f *Factory) CustomUnmarshaler() component.CustomUnmarshaler
CustomUnmarshaler returns custom unmarshaler for this config.
type Receiver ¶
type Receiver struct {
// contains filtered or unexported fields
}
Receiver is the type used to handle metrics from VM metrics.
type VMMetricsCollector ¶
type VMMetricsCollector struct {
// contains filtered or unexported fields
}
VMMetricsCollector is a struct that collects and reports VM and process metrics (cpu, mem, etc).
func NewVMMetricsCollector ¶
func NewVMMetricsCollector(si time.Duration, mountPoint, processMountPoint, prefix string, consumer consumer.MetricsConsumerOld) (*VMMetricsCollector, error)
NewVMMetricsCollector creates a new set of VM and Process Metrics (mem, cpu).
func (*VMMetricsCollector) StartCollection ¶
func (vmc *VMMetricsCollector) StartCollection()
StartCollection starts a ticker'd goroutine that will scrape and export vm metrics periodically.
func (*VMMetricsCollector) StopCollection ¶
func (vmc *VMMetricsCollector) StopCollection()
StopCollection stops the collection of metric information