hostmetrics

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(config) config

Option allows configuring the behavior of the hostmetrics remapper.

func WithSystemIntegrationDataset

func WithSystemIntegrationDataset(b bool) Option

WithSystemIntegrationDataset sets the datastream dataset of the remapped metrics as as per the system integration. Example: system.cpu, system.memory, etc.

type Remapper

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

Remapper maps the OTel hostmetrics to Elastic system metrics. These remapped metrics power the curated Kibana dashboards. Each datapoint translated using the remapper has the `event.processor` attribute set to `hostmetrics`.

func NewRemapper

func NewRemapper(logger *zap.Logger, opts ...Option) *Remapper

NewRemapper creates a new instance of hostmetrics remapper.

func (*Remapper) Remap

func (r *Remapper) Remap(
	src pmetric.ScopeMetrics,
	out pmetric.MetricSlice,
	resource pcommon.Resource,
)

Remap remaps an OTel ScopeMetrics to a list of OTel metrics such that the remapped metrics could be trivially converted into Elastic system metrics. It accepts the resource attributes to enrich the remapped metrics as per Elastic convention. The current remapping logic assumes that each Metric in the ScopeMetric will have datapoints for a single timestamp only. The remapped metrics are added to the output `MetricSlice`.

func (*Remapper) Valid

func (r *Remapper) Valid(sm pmetric.ScopeMetrics) bool

Valid validates a ScopeMetric against the hostmetrics remapper requirements. Hostmetrics remapper only remaps metrics from hostmetricsreceiver.

Jump to

Keyboard shortcuts

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