agent

package
v0.0.0-...-5655933 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 103 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AgentJSONIntakeProtocol = "agent-json"
)

Variables

This section is empty.

Functions

func BuildEndpoints

func BuildEndpoints(intakeTrackType logsconfig.IntakeTrackType, intakeProtocol logsconfig.IntakeProtocol, intakeOrigin logsconfig.IntakeOrigin) (*logsconfig.Endpoints, error)

BuildEndpoints returns the endpoints to send logs.

func BuildEndpointsWithConfig

func BuildEndpointsWithConfig(endpointPrefix string, intakeTrackType logsconfig.IntakeTrackType, intakeProtocol logsconfig.IntakeProtocol, intakeOrigin logsconfig.IntakeOrigin) (*logsconfig.Endpoints, error)

BuildEndpointsWithConfig returns the endpoints to send logs.

func BuildHTTPEndpoints

func BuildHTTPEndpoints(intakeTrackType logsconfig.IntakeTrackType, intakeProtocol logsconfig.IntakeProtocol, intakeOrigin logsconfig.IntakeOrigin) (*logsconfig.Endpoints, error)

BuildHTTPEndpoints returns the HTTP endpoints to send logs to.

func BuildHTTPEndpointsWithConfig

func BuildHTTPEndpointsWithConfig(endpointPrefix string, intakeTrackType logsconfig.IntakeTrackType, intakeProtocol logsconfig.IntakeProtocol, intakeOrigin logsconfig.IntakeOrigin) (*logsconfig.Endpoints, error)

BuildHTTPEndpointsWithConfig uses two arguments that instructs it how to access configuration parameters, then returns the HTTP endpoints to send logs to. This function is able to default to the 'classic' BuildHTTPEndpoints() w ldHTTPEndpointsWithConfigdefault variables logsConfigDefaultKeys and httpEndpointPrefix

func GlobalProcessingRules

func GlobalProcessingRules() ([]*logsconfig.ProcessingRule, error)

GlobalProcessingRules returns the global processing rules to apply to all logs.

func NewEndpoints

func NewEndpoints(main logsconfig.Endpoint, useProto bool, typ string) *logsconfig.Endpoints

NewEndpoints returns a new endpoints composite with default batching settings

func NewEndpointsWithBatchSettings

func NewEndpointsWithBatchSettings(main logsconfig.Endpoint, useProto bool, typ string, batchWait time.Duration, batchMaxConcurrentSend int, batchMaxSize int, batchMaxContentSize int) *logsconfig.Endpoints

NewEndpointsWithBatchSettings returns a new endpoints composite with non-default batching settings specified

Types

type Agent

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

func NewAgent

func NewAgent() (*Agent, error)

func (*Agent) Reload

func (a *Agent) Reload()

func (*Agent) Start

func (a *Agent) Start()

func (*Agent) Stop

func (a *Agent) Stop()

type AgentModule

type AgentModule interface {
	Start() error
	Stop() error
}

AgentModule is the interface for agent modules Use NewXXXAgent() to create a new agent module if the agent module is not needed, return nil

func NewIbexAgent

func NewIbexAgent() AgentModule

func NewLogsAgent

func NewLogsAgent() AgentModule

NewLogsAgent returns a new Logs LogsAgent

func NewMetricsAgent

func NewMetricsAgent() AgentModule

func NewPrometheusAgent

func NewPrometheusAgent() AgentModule

func NewTracesAgent

func NewTracesAgent() AgentModule

type IbexAgent

type IbexAgent struct {
}

func (*IbexAgent) Start

func (ia *IbexAgent) Start() error

func (*IbexAgent) Stop

func (ia *IbexAgent) Stop() error

type InputReader

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

func (*InputReader) Stop

func (r *InputReader) Stop()

type LogsAgent

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

LogsAgent represents the data pipeline that collects, decodes, processes and sends logs to the backend + ------------------------------------------------------ + | | | Collector -> Decoder -> Processor -> Sender -> Auditor | | | + ------------------------------------------------------ +

func (*LogsAgent) Flush

func (a *LogsAgent) Flush(ctx context.Context)

Flush flushes synchronously the pipelines managed by the Logs LogsAgent.

func (*LogsAgent) Start

func (la *LogsAgent) Start() error

func (*LogsAgent) Stop

func (a *LogsAgent) Stop() error

Stop stops all the elements of the data pipeline in the right order to prevent data loss

type MetricsAgent

type MetricsAgent struct {
	InputFilters   map[string]struct{}
	InputReaders   *Readers
	InputProviders []inputs.Provider
}

func (*MetricsAgent) DeregisterInput

func (ma *MetricsAgent) DeregisterInput(name string, sum string)

func (*MetricsAgent) FilterPass

func (ma *MetricsAgent) FilterPass(inputKey string) bool

func (*MetricsAgent) RegisterInput

func (ma *MetricsAgent) RegisterInput(name string, configs []cfg.ConfigWithFormat)

func (*MetricsAgent) Start

func (ma *MetricsAgent) Start() error

func (*MetricsAgent) Stop

func (ma *MetricsAgent) Stop() error

type PrometheusAgent

type PrometheusAgent struct {
}

func (*PrometheusAgent) Start

func (pa *PrometheusAgent) Start() error

func (*PrometheusAgent) Stop

func (pa *PrometheusAgent) Stop() error

type Readers

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

func NewReaders

func NewReaders() *Readers

func (*Readers) Add

func (r *Readers) Add(name string, sum string, reader *InputReader)

func (*Readers) Del

func (r *Readers) Del(name string, sum string)

func (*Readers) GetInput

func (r *Readers) GetInput(name string) (map[string]*InputReader, bool)

func (*Readers) Iter

func (r *Readers) Iter() map[string]map[string]*InputReader

type TracesAgent

type TracesAgent struct {
	TraceCollector *traces.Collector
}

func (*TracesAgent) Start

func (ta *TracesAgent) Start() (err error)

func (*TracesAgent) Stop

func (ta *TracesAgent) Stop() (err error)

Jump to

Keyboard shortcuts

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