cloudwatchlogs

package
v1.3000030.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 27 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, stop <-chan struct{}, wg *sync.WaitGroup) *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"`
	RegionType       string `toml:"region_type"`
	Mode             string `toml:"mode"`
	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"`

	// Retention for log group
	RetentionInDays int `toml:"retention_in_days"`

	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, retention int) 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
	Retention     int
}

Jump to

Keyboard shortcuts

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