Documentation
¶
Index ¶
- type Configuration
- type LogStreamTailConfig
- type Source
- func (*Source) CanRun() error
- func (s *Source) CatLogStream(ctx context.Context, cfg *LogStreamTailConfig, outChan chan pipeline.Event) error
- func (s *Source) Configure(ctx context.Context, yamlConfig []byte, logger *log.Entry, ...) error
- func (s *Source) ConfigureByDSN(ctx context.Context, dsn string, labels map[string]string, logger *log.Entry, ...) error
- func (s *Source) Dump() any
- func (*Source) GetAggregMetrics() []prometheus.Collector
- func (*Source) GetMetrics() []prometheus.Collector
- func (s *Source) GetMode() string
- func (*Source) GetName() string
- func (s *Source) GetUuid() string
- func (s *Source) LogStreamManager(ctx context.Context, in chan LogStreamTailConfig, outChan chan pipeline.Event) error
- func (s *Source) OneShotAcquisition(ctx context.Context, out chan pipeline.Event, _ *tomb.Tomb) error
- func (s *Source) StreamingAcquisition(ctx context.Context, out chan pipeline.Event, t *tomb.Tomb) error
- func (s *Source) TailLogStream(ctx context.Context, cfg *LogStreamTailConfig, outChan chan pipeline.Event) error
- func (s *Source) UnmarshalConfig(yamlConfig []byte) error
- func (s *Source) WatchLogGroupForStreams(ctx context.Context, out chan LogStreamTailConfig) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶ added in v1.7.4
type Configuration struct {
configuration.DataSourceCommonCfg `yaml:",inline"`
GroupName string `yaml:"group_name"` // the group name to be monitored
StreamRegexp *string `yaml:"stream_regexp,omitempty"` // allow to filter specific streams
StreamName *string `yaml:"stream_name,omitempty"`
StartTime, EndTime *time.Time `yaml:"-"`
DescribeLogStreamsLimit *int32 `yaml:"describelogstreams_limit,omitempty"` // batch size for DescribeLogStreamsPagesWithContext
GetLogEventsPagesLimit *int32 `yaml:"getlogeventspages_limit,omitempty"`
PollNewStreamInterval *time.Duration `yaml:"poll_new_stream_interval,omitempty"` // frequency at which we poll for new streams within the log group
MaxStreamAge *time.Duration `yaml:"max_stream_age,omitempty"` // monitor only streams that have been updated within $duration
PollStreamInterval *time.Duration `yaml:"poll_stream_interval,omitempty"` // frequency at which we poll each stream
StreamReadTimeout *time.Duration `yaml:"stream_read_timeout,omitempty"` // stop monitoring streams that haven't been updated within $duration, might be reopened later tho
AwsApiCallTimeout *time.Duration `yaml:"aws_api_timeout,omitempty"`
AwsProfile *string `yaml:"aws_profile,omitempty"`
PrependCloudwatchTimestamp *bool `yaml:"prepend_cloudwatch_timestamp,omitempty"`
AwsConfigDir *string `yaml:"aws_config_dir,omitempty"`
AwsRegion string `yaml:"aws_region,omitempty"`
}
Configuration allows user to define one or more streams to monitor within a cloudwatch log group
type LogStreamTailConfig ¶
type LogStreamTailConfig struct {
GroupName string
StreamName string
GetLogEventsPagesLimit int32
PollStreamInterval time.Duration
StreamReadTimeout time.Duration
PrependCloudwatchTimestamp *bool
Labels map[string]string
ExpectMode int
StartTime, EndTime time.Time // only used for CatMode
// contains filtered or unexported fields
}
LogStreamTailConfig is the configuration for one given stream within one group
type Source ¶ added in v1.7.4
type Source struct {
Config Configuration
// contains filtered or unexported fields
}
Source is the runtime instance keeping track of N streams within 1 cloudwatch group
func (*Source) CatLogStream ¶ added in v1.7.4
func (*Source) ConfigureByDSN ¶ added in v1.7.4
func (*Source) GetAggregMetrics ¶ added in v1.7.4
func (*Source) GetAggregMetrics() []prometheus.Collector
func (*Source) GetMetrics ¶ added in v1.7.4
func (*Source) GetMetrics() []prometheus.Collector
func (*Source) LogStreamManager ¶ added in v1.7.4
func (s *Source) LogStreamManager(ctx context.Context, in chan LogStreamTailConfig, outChan chan pipeline.Event) error
LogStreamManager receives the potential streams to monitor, and starts a go routine when needed
func (*Source) OneShotAcquisition ¶ added in v1.7.4
func (*Source) StreamingAcquisition ¶ added in v1.7.4
func (*Source) TailLogStream ¶ added in v1.7.4
func (*Source) UnmarshalConfig ¶ added in v1.7.4
func (*Source) WatchLogGroupForStreams ¶ added in v1.7.4
func (s *Source) WatchLogGroupForStreams(ctx context.Context, out chan LogStreamTailConfig) error
Click to show internal directories.
Click to hide internal directories.