vmmetricsreceiver

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package vmmetricsreceiver has the logic for scraping VM metrics and then passing them onto a metric consumer instance.

Index

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.MetricsConsumer,
) (receiver.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.TraceConsumer,
) (receiver.TraceReceiver, error)

CreateTraceReceiver creates a trace receiver based on provided config.

func (*Factory) CustomUnmarshaler

func (f *Factory) CustomUnmarshaler() receiver.CustomUnmarshaler

CustomUnmarshaler returns custom unmarshaler for this config.

func (*Factory) Type

func (f *Factory) Type() string

Type gets the type of the Receiver config created by this Factory.

type Receiver

type Receiver struct {
	// contains filtered or unexported fields
}

Receiver is the type used to handle metrics from VM metrics.

func (*Receiver) MetricsSource

func (vmr *Receiver) MetricsSource() string

MetricsSource returns the name of the metrics data source.

func (*Receiver) StartMetricsReception

func (vmr *Receiver) StartMetricsReception(host receiver.Host) error

StartMetricsReception scrapes VM metrics based on the OS platform.

func (*Receiver) StopMetricsReception

func (vmr *Receiver) StopMetricsReception() error

StopMetricsReception stops and cancels the underlying VM metrics scrapers.

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.MetricsConsumer) (*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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL