agenttelemetryimpl

package
v0.9.1-0...-40a840d Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package agenttelemetryimpl provides the implementation of the agenttelemetry component.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentMetadataPayload

type AgentMetadataPayload struct {
	HostID   string `json:"hostid"`
	Hostname string `json:"hostname"`
	OS       string `json:"os"`
	OSVer    string `json:"osver"`
}

AgentMetadataPayload should be top level object in the payload but currently tucked into specific payloads until backend will be adjusted properly

type AgentMetricConfig

type AgentMetricConfig struct {
	Exclude *ExcludeMetricConfig `yaml:"exclude,omitempty"`
	Metrics []MetricConfig       `yaml:"metrics,omitempty"`
}

AgentMetricConfig specifies agent telemetry metrics payloads to be generated and emitted

type AgentMetricsPayload

type AgentMetricsPayload struct {
	Message string                 `json:"message"`
	Metrics map[string]interface{} `json:"metrics"`
}

AgentMetricsPayload defines Metrics object

type BatchPayloadWrapper

type BatchPayloadWrapper struct {
	RequestType string      `json:"request_type"`
	Payload     interface{} `json:"payload"`
}

BatchPayloadWrapper exported so it can be turned into json

type Config

type Config struct {
	Enabled  bool       `yaml:"enabled"`
	Profiles []*Profile `yaml:"profiles"`
	// contains filtered or unexported fields
}

Config is the top-level config for agent telemetry

type ExcludeMetricConfig

type ExcludeMetricConfig struct {
	ZeroMetric *bool    `yaml:"zero_metric,omitempty"`
	Tags       []string `yaml:"tags,omitempty"`
}

ExcludeMetricConfig specifies agent telemetry metrics to be excluded from the agent telemetry

type HostPayload

type HostPayload struct {
	Hostname string `json:"hostname"`
}

HostPayload defines the host payload object. It is currently used only as payload's header and it is not stored with backend. It could be removed in the future completly. It is expected by backend to be present in the payload and currently tootaly reducted.

type MetricConfig

type MetricConfig struct {
	Name           string   `yaml:"name"` // required
	AggregateTags  []string `yaml:"aggregate_tags,omitempty"`
	AggregateTotal bool     `yaml:"aggregate_total"`
	// contains filtered or unexported fields
}

MetricConfig is a list of metric selecting subset of telemetry.Gather() metrics to be included in agent

type MetricPayload

type MetricPayload struct {
	Value   float64                `json:"value"`
	Type    string                 `json:"type"`
	Tags    map[string]interface{} `json:"tags,omitempty"`
	Buckets map[string]uint64      `json:"buckets,omitempty"`
}

MetricPayload defines Metric object

type Payload

type Payload struct {
	APIVersion  string      `json:"api_version"`
	RequestType string      `json:"request_type"`
	EventTime   int64       `json:"event_time"`
	DebugFlag   bool        `json:"debug"`
	Host        HostPayload `json:"host"`
	Payload     interface{} `json:"payload"`
}

Payload defines the top level object in the payload

type Profile

type Profile struct {
	// parsed
	Name     string             `yaml:"name"`
	Metric   *AgentMetricConfig `yaml:"metric,omitempty"`
	Schedule *Schedule          `yaml:"schedule"`
	// contains filtered or unexported fields
}

Profile is a single agent telemetry profile

type Provides

type Provides struct {
	compdef.Out

	Comp     agenttelemetry.Component
	Endpoint api.AgentEndpointProvider
}

Provides defines the output of the agenttelemetry component

func NewComponent

func NewComponent(deps Requires) Provides

NewComponent creates a new agent telemetry component.

type Requires

type Requires struct {
	compdef.In

	Log       log.Component
	Config    config.Component
	Telemetry telemetry.Component

	Lc compdef.Lifecycle
}

Requires defines the dependencies for the agenttelemetry component

type Schedule

type Schedule struct {
	// parsed
	StartAfter uint `yaml:"start_after"`
	Iterations uint `yaml:"iterations"`
	Period     uint `yaml:"period"`
}

Schedule is a schedule for agent telemetry payloads to be generated and emitted

Jump to

Keyboard shortcuts

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