Documentation ¶
Index ¶
- Constants
- func NewPusher(target Target, service CloudWatchLogsService, flushTimeout time.Duration, ...) *pusher
- type ByTimestamp
- type CloudWatchLogs
- func (c *CloudWatchLogs) Close() error
- func (c *CloudWatchLogs) Connect() error
- func (c *CloudWatchLogs) CreateDest(group, stream string, retention int) logs.LogDest
- func (c *CloudWatchLogs) Description() string
- func (c *CloudWatchLogs) SampleConfig() string
- func (c *CloudWatchLogs) Write(metrics []telegraf.Metric) error
- type CloudWatchLogsService
- type Target
Constants ¶
View Source
const ( LogGroupNameTag = "log_group_name" LogStreamNameTag = "log_stream_name" LogTimestampField = "log_timestamp" LogEntryField = "value" )
Variables ¶
This section is empty.
Functions ¶
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
type CloudWatchLogsService ¶
type CloudWatchLogsService interface { PutLogEvents(*cloudwatchlogs.PutLogEventsInput) (*cloudwatchlogs.PutLogEventsOutput, error) CreateLogStream(input *cloudwatchlogs.CreateLogStreamInput) (*cloudwatchlogs.CreateLogStreamOutput, error) CreateLogGroup(input *cloudwatchlogs.CreateLogGroupInput) (*cloudwatchlogs.CreateLogGroupOutput, error) PutRetentionPolicy(input *cloudwatchlogs.PutRetentionPolicyInput) (*cloudwatchlogs.PutRetentionPolicyOutput, error) }
Click to show internal directories.
Click to hide internal directories.