cloudwatchlogs

package
v1.247349.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogGroupNameTag   = "log_group_name"
	LogStreamNameTag  = "log_stream_name"
	LogTimestampField = "log_timestamp"
	LogEntryField     = "value"
)

Variables

This section is empty.

Functions

func NewPusher

func NewPusher(target Target, service CloudWatchLogsService, flushTimeout time.Duration, retryDuration time.Duration, logger telegraf.Logger) *pusher

Types

type ByTimestamp

type ByTimestamp []*cloudwatchlogs.InputLogEvent

func (ByTimestamp) Len

func (inputLogEvents ByTimestamp) Len() int

func (ByTimestamp) Less

func (inputLogEvents ByTimestamp) Less(i, j int) bool

func (ByTimestamp) Swap

func (inputLogEvents ByTimestamp) Swap(i, j int)

type CloudWatchLogs

type CloudWatchLogs struct {
	Region           string `toml:"region"`
	EndpointOverride string `toml:"endpoint_override"`
	AccessKey        string `toml:"access_key"`
	SecretKey        string `toml:"secret_key"`
	RoleARN          string `toml:"role_arn"`
	Profile          string `toml:"profile"`
	Filename         string `toml:"shared_credential_file"`
	Token            string `toml:"token"`

	//log group and stream names
	LogStreamName string `toml:"log_stream_name"`
	LogGroupName  string `toml:"log_group_name"`

	ForceFlushInterval internal.Duration `toml:"force_flush_interval"` // unit is second

	Log telegraf.Logger `toml:"-"`
	// contains filtered or unexported fields
}

func (*CloudWatchLogs) Close

func (c *CloudWatchLogs) Close() error

func (*CloudWatchLogs) Connect

func (c *CloudWatchLogs) Connect() error

func (*CloudWatchLogs) CreateDest

func (c *CloudWatchLogs) CreateDest(group, stream string) logs.LogDest

func (*CloudWatchLogs) Description

func (c *CloudWatchLogs) Description() string

Description returns a one-sentence description on the Output

func (*CloudWatchLogs) SampleConfig

func (c *CloudWatchLogs) SampleConfig() string

SampleConfig returns the default configuration of the Output

func (*CloudWatchLogs) Write

func (c *CloudWatchLogs) Write(metrics []telegraf.Metric) error

type Target

type Target struct {
	Group, Stream string
}

Jump to

Keyboard shortcuts

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