Documentation
¶
Index ¶
- Constants
- Variables
- func BuildLogsAgentConfig(ddconfigPath, ddconfdPath string) error
- func BuildLogsAgentIntegrationsConfigs(ddconfdPath string) error
- func BuildTagsPayload(configTags, source, sourceCategory string) []byte
- type IntegrationConfig
- type IntegrationConfigLogSource
- type LogsProcessingRule
Constants ¶
const ( ChanSizes = 100 NumberOfPipelines = int32(4) )
const ( LOGS_RULES = "LogsRules" TCP_TYPE = "tcp" UDP_TYPE = "udp" FILE_TYPE = "file" DOCKER_TYPE = "docker" EXCLUDE_AT_MATCH = "exclude_at_match" MASK_SEQUENCES = "mask_sequences" MULTILINE = "multi_line" )
const (
DateFormat = "2006-01-02T15:04:05.000000000Z"
)
const INTEGRATION_CONFIG_EXTENTION = ".yaml"
const MainConfig = "datadog"
MainConfig is the name of the main config file, while we haven't merged in dd agent
Variables ¶
var ( SEV_INFO = []byte("<46>") SEV_ERROR = []byte("<43>") )
var LogsAgent = ddconfig.Datadog
LogsAgent is the global configuration object
Functions ¶
func BuildLogsAgentConfig ¶
BuildLogsAgentConfig initializes the LogsAgent config and sets default values
func BuildLogsAgentIntegrationsConfigs ¶
BuildLogsAgentIntegrationsConfigs looks for all yml configs in the ddconfdPath directory, and initializes the LogsAgent integrations configs
func BuildTagsPayload ¶
Given a list of tags, BuildTagsPayload generates the bytes array that will be inserted into messages
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"`
}
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 a list of integration sources