config

package
v0.0.0-...-c036721 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChanSizes         = 100
	NumberOfPipelines = int32(4)
)

Pipeline constraints

View Source
const (
	TCPType    = "tcp"
	UDPType    = "udp"
	FileType   = "file"
	DockerType = "docker"
)

Logs source types

View Source
const (
	ExcludeAtMatch = "exclude_at_match"
	IncludeAtMatch = "include_at_match"
	MaskSequences  = "mask_sequences"
	MultiLine      = "multi_line"
)

Logs rule types

View Source
const (
	DateFormat = "2006-01-02T15:04:05.000000000Z"
)

Date and time format

View Source
const (
	DefaultTailingLimit = 100
)

Default open files limit

Variables

View Source
var (
	SevInfo  = []byte("<46>")
	SevError = []byte("<43>")
)

Severities

View Source
var LogsAgent = ddconfig.Datadog

LogsAgent is the global configuration object

Functions

func Build

func Build() error

Build initializes logs-agent configuration

func BuildTagsPayload

func BuildTagsPayload(configTags, source, sourceCategory string) []byte

BuildTagsPayload generates the bytes array that will be inserted into messages given a list of tags

Types

type IntegrationConfig

type IntegrationConfig struct {
	Logs []IntegrationConfigLogSource
}

IntegrationConfig represents a dd agent config, which includes infra and logs parts

type IntegrationConfigLogSource

type IntegrationConfigLogSource struct {
	Type string

	Port int    // Network
	Path string // File

	Image string // Docker
	Label string // Docker

	Service         string
	Logset          string
	Source          string
	SourceCategory  string
	Tags            string
	TagsPayload     []byte
	ProcessingRules []LogsProcessingRule `mapstructure:"log_processing_rules"`

	Tracker *status.Tracker
}

IntegrationConfigLogSource represents a log source config, which can be for instance a file to tail or a port to listen to

func GetLogsSources

func GetLogsSources() []*IntegrationConfigLogSource

GetLogsSources returns the list of logs sources

type LogsProcessingRule

type LogsProcessingRule struct {
	Type                    string
	Name                    string
	ReplacePlaceholder      string `mapstructure:"replace_placeholder"`
	Pattern                 string
	Reg                     *regexp.Regexp
	ReplacePlaceholderBytes []byte
}

LogsProcessingRule defines an exclusion or a masking rule to be applied on log lines

Jump to

Keyboard shortcuts

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