Documentation ¶
Overview ¶
Package config defines the configuration of the agent
Index ¶
- Constants
- Variables
- func GetBindHost() string
- func GetBindHostFromConfig(config model.Reader) string
- func GetIPCAddress() (string, error)
- func GetObsPipelineURL(datatype pkgconfigsetup.DataType) (string, error)
- func GetProcessAPIAddressPort() (string, error)
- func GetSyslogURI() string
- func GetValidHostAliases(ctx context.Context) ([]string, error)
- func IsAutoconfigEnabled() bool
- func IsCLCRunner() bool
- func IsCloudProviderEnabled(cloudProvider string) bool
- func LoadCustom(config model.Config, origin string, ...) (*model.Warnings, error)
- func LoadDatadogCustom(config model.Config, origin string, ...) (*model.Warnings, error)
- func LoadWithoutSecret() (*model.Warnings, error)
- func SetupDogstatsdLogger(logFile string) (slog.LoggerInterface, error)
- func SetupJMXLogger(logFile, syslogURI string, syslogRFC, logToConsole, jsonFormat bool) error
- func SetupLogger(loggerName LoggerName, logLevel, logFile, syslogURI string, ...) error
- type ChangeChecker
- type Config
- type ConfigurationProviders
- type Feature
- type FeatureMap
- type LegacyConfigConverter
- type Listeners
- type Loader
- type LoggerName
- type MappingProfile
- type MockConfig
- type Proxy
- type Reader
- type ReaderWriter
- type Warnings
- type Writer
Constants ¶
const ( ECSFargate = env.ECSFargate Podman = env.Podman Docker = env.Docker EKSFargate = env.EKSFargate ECSEC2 = env.ECSEC2 Kubernetes = env.Kubernetes CloudFoundry = env.CloudFoundry Cri = env.Cri Containerd = env.Containerd KubeOrchestratorExplorer = env.KubeOrchestratorExplorer ECSOrchestratorExplorer = env.ECSOrchestratorExplorer )
Aliases for constants
const ( Metrics = pkgconfigsetup.Metrics Traces = pkgconfigsetup.Traces Logs = pkgconfigsetup.Logs )
Datatype Aliases
const ( DefaultForwarderRecoveryInterval = pkgconfigsetup.DefaultForwarderRecoveryInterval DefaultAPIKeyValidationInterval = pkgconfigsetup.DefaultAPIKeyValidationInterval DefaultBatchWait = pkgconfigsetup.DefaultBatchWait DefaultInputChanSize = pkgconfigsetup.DefaultInputChanSize DefaultBatchMaxConcurrentSend = pkgconfigsetup.DefaultBatchMaxConcurrentSend DefaultBatchMaxContentSize = pkgconfigsetup.DefaultBatchMaxContentSize DefaultLogsSenderBackoffRecoveryInterval = pkgconfigsetup.DefaultLogsSenderBackoffRecoveryInterval DefaultLogsSenderBackoffMax = pkgconfigsetup.DefaultLogsSenderBackoffMax DefaultLogsSenderBackoffFactor = pkgconfigsetup.DefaultLogsSenderBackoffFactor DefaultLogsSenderBackoffBase = pkgconfigsetup.DefaultLogsSenderBackoffBase DefaultBatchMaxSize = pkgconfigsetup.DefaultBatchMaxSize DefaultNumWorkers = pkgconfigsetup.DefaultNumWorkers MaxNumWorkers = pkgconfigsetup.MaxNumWorkers DefaultSite = pkgconfigsetup.DefaultSite OTLPTracePort = pkgconfigsetup.OTLPTracePort DefaultAuditorTTL = pkgconfigsetup.DefaultAuditorTTL DefaultMaxMessageSizeBytes = pkgconfigsetup.DefaultMaxMessageSizeBytes DefaultProcessEntityStreamPort = pkgconfigsetup.DefaultProcessEntityStreamPort DefaultProcessEventsCheckInterval = pkgconfigsetup.DefaultProcessEventsCheckInterval DefaultProcessEventsMinCheckInterval = pkgconfigsetup.DefaultProcessEventsMinCheckInterval ProcessMaxPerMessageLimit = pkgconfigsetup.ProcessMaxPerMessageLimit DefaultProcessMaxPerMessage = pkgconfigsetup.DefaultProcessMaxPerMessage ProcessMaxMessageBytesLimit = pkgconfigsetup.ProcessMaxMessageBytesLimit DefaultProcessDiscoveryHintFrequency = pkgconfigsetup.DefaultProcessDiscoveryHintFrequency DefaultProcessMaxMessageBytes = pkgconfigsetup.DefaultProcessMaxMessageBytes DefaultProcessExpVarPort = pkgconfigsetup.DefaultProcessExpVarPort DefaultProcessQueueBytes = pkgconfigsetup.DefaultProcessQueueBytes DefaultProcessQueueSize = pkgconfigsetup.DefaultProcessQueueSize DefaultProcessRTQueueSize = pkgconfigsetup.DefaultProcessRTQueueSize DefaultRuntimePoliciesDir = pkgconfigsetup.DefaultRuntimePoliciesDir DefaultGRPCConnectionTimeoutSecs = pkgconfigsetup.DefaultGRPCConnectionTimeoutSecs DefaultProcessEndpoint = pkgconfigsetup.DefaultProcessEndpoint DefaultProcessEventsEndpoint = pkgconfigsetup.DefaultProcessEventsEndpoint )
Aliases for config defaults
const (
// ClusterIDCacheKey is the key name for the orchestrator cluster id in the agent in-mem cache
ClusterIDCacheKey = "orchestratorClusterID"
)
Variables ¶
var ( IsFeaturePresent = env.IsFeaturePresent IsECS = env.IsECS IsKubernetes = env.IsKubernetes IsECSFargate = env.IsECSFargate IsServerless = env.IsServerless IsContainerized = env.IsContainerized IsDockerRuntime = env.IsDockerRuntime GetEnvDefault = env.GetEnvDefault IsHostProcAvailable = env.IsHostProcAvailable IsHostSysAvailable = env.IsHostSysAvailable IsAnyContainerFeaturePresent = env.IsAnyContainerFeaturePresent GetDetectedFeatures = env.GetDetectedFeatures )
environment Aliases
var ( // Datadog Alias Datadog = pkgconfigsetup.Datadog // SystemProbe Alias SystemProbe = pkgconfigsetup.SystemProbe )
var ( AddOverride = model.AddOverride AddOverrides = model.AddOverrides AddOverrideFunc = model.AddOverrideFunc )
Aliases for config overrides
var ( NewLogWriter = logs.NewLogWriter ChangeLogLevel = logs.ChangeLogLevel NewTLSHandshakeErrorWriter = logs.NewTLSHandshakeErrorWriter )
Aliases for logs
var ( // IsRemoteConfigEnabled Alias IsRemoteConfigEnabled = pkgconfigsetup.IsRemoteConfigEnabled // StartTime Alias StartTime = pkgconfigsetup.StartTime // StandardJMXIntegrations Alias StandardJMXIntegrations = pkgconfigsetup.StandardJMXIntegrations // SetupOTLP Alias SetupOTLP = pkgconfigsetup.OTLP // InitSystemProbeConfig Alias InitSystemProbeConfig = pkgconfigsetup.InitSystemProbeConfig // InitConfig Alias InitConfig = pkgconfigsetup.InitConfig // GetRemoteConfigurationAllowedIntegrations Alias GetRemoteConfigurationAllowedIntegrations = pkgconfigsetup.GetRemoteConfigurationAllowedIntegrations // LoadProxyFromEnv Alias LoadProxyFromEnv = pkgconfigsetup.LoadProxyFromEnv // GetIPCPort Alias GetIPCPort = pkgconfigsetup.GetIPCPort )
var ( DefaultUpdaterLogFile = pkgconfigsetup.DefaultUpdaterLogFile DefaultSecurityAgentLogFile = pkgconfigsetup.DefaultSecurityAgentLogFile DefaultProcessAgentLogFile = pkgconfigsetup.DefaultProcessAgentLogFile DefaultDDAgentBin = pkgconfigsetup.DefaultDDAgentBin )
Aliases to setup package
var NewConfig = model.NewConfig
NewConfig is alias for Config object.
Functions ¶
func GetBindHostFromConfig ¶
GetBindHostFromConfig Alias using Datadog config
func GetObsPipelineURL ¶
func GetObsPipelineURL(datatype pkgconfigsetup.DataType) (string, error)
GetObsPipelineURL Alias using Datadog config
func GetProcessAPIAddressPort ¶
GetProcessAPIAddressPort Alias using Datadog config
func GetValidHostAliases ¶ added in v0.9.0
GetValidHostAliases Alias using Datadog config
func IsAutoconfigEnabled ¶ added in v0.9.0
func IsAutoconfigEnabled() bool
IsAutoconfigEnabled is alias for model.IsAutoconfigEnabled
func IsCloudProviderEnabled ¶
IsCloudProviderEnabled Alias using Datadog config
func LoadCustom ¶
func LoadCustom(config model.Config, origin string, secretResolver optional.Option[secrets.Component], additionalKnownEnvVars []string) (*model.Warnings, error)
LoadCustom Alias
func LoadDatadogCustom ¶
func LoadDatadogCustom(config model.Config, origin string, secretResolver optional.Option[secrets.Component], additionalKnownEnvVars []string) (*model.Warnings, error)
LoadDatadogCustom Alias
func LoadWithoutSecret ¶
LoadWithoutSecret Alias using Datadog config
func SetupDogstatsdLogger ¶
func SetupDogstatsdLogger(logFile string) (slog.LoggerInterface, error)
SetupDogstatsdLogger Alias using Datadog config
func SetupJMXLogger ¶ added in v0.9.0
SetupJMXLogger Alias using Datadog config
func SetupLogger ¶
func SetupLogger(loggerName LoggerName, logLevel, logFile, syslogURI string, syslogRFC, logToConsole, jsonFormat bool) error
SetupLogger Alias using Datadog config
Types ¶
type ChangeChecker ¶
type ChangeChecker struct {
// contains filtered or unexported fields
}
ChangeChecker checks the state of `config.Datadog` did not change between `NewChangeChecker()“ and `HasChanged()`. It is designed to be used in `TestMain` function as follow:
func TestMain(m *testing.M) { checker := testutil.NewConfigChangeChecker() exit := m.Run() if checker.HasChanged() { os.Exit(1) } os.Exit(exit) }
func NewChangeChecker ¶
func NewChangeChecker() *ChangeChecker
NewChangeChecker creates a new instance of ConfigChangeChecker
func (*ChangeChecker) HasChanged ¶
func (c *ChangeChecker) HasChanged() bool
HasChanged returns whether `config.Datadog` changed since `NewConfigChangeChecker`. If some changes are detected this function displays on the standard error what keys changed.
type ConfigurationProviders ¶
type ConfigurationProviders = pkgconfigsetup.ConfigurationProviders
ConfigurationProviders Alias
type LegacyConfigConverter ¶
type LegacyConfigConverter struct {
Config
}
LegacyConfigConverter is used in the legacy package to convert A5 config to A6
func NewConfigConverter ¶
func NewConfigConverter() *LegacyConfigConverter
NewConfigConverter is creating and returning a config converter
func (*LegacyConfigConverter) Set ¶
func (c *LegacyConfigConverter) Set(key string, value interface{})
Set is used for setting configuration from A5 config
type MappingProfile ¶
type MappingProfile = pkgconfigsetup.MappingProfile
MappingProfile Alias
func GetDogstatsdMappingProfiles ¶
func GetDogstatsdMappingProfiles() ([]MappingProfile, error)
GetDogstatsdMappingProfiles Alias using Datadog config
type MockConfig ¶
type MockConfig struct {
Config
}
MockConfig should only be used in tests
func MockSystemProbe ¶
func MockSystemProbe(t testing.TB) *MockConfig
MockSystemProbe is creating and returning a mock system-probe config
func (*MockConfig) Set ¶
func (c *MockConfig) Set(key string, value interface{}, source model.Source)
Set is used for setting configuration in tests
func (*MockConfig) SetKnown ¶
func (c *MockConfig) SetKnown(key string)
SetKnown is used for setting configuration in tests
func (*MockConfig) SetWithoutSource ¶
func (c *MockConfig) SetWithoutSource(key string, value interface{})
SetWithoutSource is used for setting configuration in tests
type ReaderWriter ¶
type ReaderWriter = model.ReaderWriter
ReaderWriter is alias to model.ReaderWriter
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package autodiscovery contains helper function that return autodiscovery providers from the config and from the environment where the Agent is running.
|
Package autodiscovery contains helper function that return autodiscovery providers from the config and from the environment where the Agent is running. |
env
module
|
|
Package fetcher is a collection of high level helpers to pull the configuration from other agent processes
|
Package fetcher is a collection of high level helpers to pull the configuration from other agent processes |
Package legacy contains the logic to convert the old agent configuration
|
Package legacy contains the logic to convert the old agent configuration |
logs
module
|
|
model
module
|
|
remote
module
|
|
Package settings implements runtime settings and profiling
|
Package settings implements runtime settings and profiling |
http
Package http implements helpers for the runtime settings HTTP API
|
Package http implements helpers for the runtime settings HTTP API |
setup
module
|
|
utils
module
|