systemmetricsreceiver

package
v1.300067.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Type = component.MustNewType(typeStr)

Functions

func NewFactory

func NewFactory() receiver.Factory

Types

type Config

type Config struct {
	scraperhelper.ControllerConfig `mapstructure:",squash"`
}

type MetricScraper

type MetricScraper interface {
	// Name returns the scraper identifier for logging/debugging.
	Name() string
	// Scrape collects metrics and appends them to the provided pmetric.Metrics.
	Scrape(ctx context.Context, metrics pmetric.Metrics) error
}

MetricScraper defines the interface for individual metric scrapers. Each scraper is responsible for collecting a specific type of metrics.

type PS

type PS interface {
	CPUTimes(ctx context.Context) ([]cpu.TimesStat, error)
	VMStat(ctx context.Context) (*mem.VirtualMemoryStat, error)
	DiskUsage(ctx context.Context) ([]*disk.UsageStat, error)
	EthtoolStats(ctx context.Context, iface string) (map[string]uint64, error)
}

PS abstracts OS-level data sources for testing.

type SystemPS

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

func (*SystemPS) CPUTimes

func (s *SystemPS) CPUTimes(ctx context.Context) ([]cpu.TimesStat, error)

func (*SystemPS) Close

func (s *SystemPS) Close()

func (*SystemPS) DiskUsage

func (s *SystemPS) DiskUsage(ctx context.Context) ([]*disk.UsageStat, error)

func (*SystemPS) EthtoolStats

func (s *SystemPS) EthtoolStats(_ context.Context, iface string) (map[string]uint64, error)

func (*SystemPS) VMStat

func (s *SystemPS) VMStat(ctx context.Context) (*mem.VirtualMemoryStat, error)

Jump to

Keyboard shortcuts

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