telegraf

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TelegrafAlarmType = "TELEGRAF_ALARM"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name   string
	Detail string
}

type LogCollector added in v1.1.0

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

func NewLogCollector added in v1.1.0

func NewLogCollector(agentDirPath string) *LogCollector

NewLogCollector create a log collector to read telegraf log.

func (*LogCollector) Run added in v1.1.0

func (l *LogCollector) Run()

func (*LogCollector) TelegrafStart added in v1.1.0

func (l *LogCollector) TelegrafStart()

func (*LogCollector) TelegrafStop added in v1.1.0

func (l *LogCollector) TelegrafStop()

type Manager

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

Telegraf supervisor for agent start, stop, config reload...

Because Telegraf will send all inputs' data to all outputs, so only ONE Logtail config will be passed to Telegraf simultaneously.

Data link: Telegraf ------ HTTP ------> Logtail ----- Protobuf ------> SLS. Logtail will work as an InfluxDB server to receive data from telegraf by HTTP protocol.

func GetTelegrafManager

func GetTelegrafManager(agentDirPath string) *Manager

func (*Manager) GetContext added in v1.1.0

func (tm *Manager) GetContext() context.Context

func (*Manager) RegisterConfig

func (tm *Manager) RegisterConfig(ctx ilogtail.Context, c *Config)

func (*Manager) UnregisterConfig

func (tm *Manager) UnregisterConfig(ctx ilogtail.Context, c *Config)

type Processor added in v1.1.0

type Processor struct {
}

func (*Processor) Process added in v1.1.0

func (p *Processor) Process(fileBlock []byte, noChangeInterval time.Duration) int

type ServiceTelegraf

type ServiceTelegraf struct {
	Detail string
	// contains filtered or unexported fields
}

func (*ServiceTelegraf) Collect

func (s *ServiceTelegraf) Collect(collector ilogtail.Collector) error

func (*ServiceTelegraf) Description

func (s *ServiceTelegraf) Description() string

func (*ServiceTelegraf) Init

func (s *ServiceTelegraf) Init(ctx ilogtail.Context) (int, error)

func (*ServiceTelegraf) Start

func (s *ServiceTelegraf) Start(collector ilogtail.Collector) error

func (*ServiceTelegraf) Stop

func (s *ServiceTelegraf) Stop() error

Jump to

Keyboard shortcuts

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