telegraf

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TelegrafAlarmType = "TELEGRAF_ALARM"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BindingMeta added in v1.1.0

type BindingMeta struct {
	Metas map[string]map[string]map[string]struct{}
	// contains filtered or unexported fields
}

func NewBindMeta added in v1.1.0

func NewBindMeta() *BindingMeta

func (*BindingMeta) Add added in v1.1.0

func (b *BindingMeta) Add(prj, logstore, cfg string)

func (*BindingMeta) Delete added in v1.1.0

func (b *BindingMeta) Delete(prj, logstore, cfg string)

func (*BindingMeta) UpdateAlarm added in v1.1.0

func (b *BindingMeta) UpdateAlarm()

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