config

package
v0.73.2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package config defines the configurations to install.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolToPtr

func BoolToPtr(b bool) *bool

BoolToPtr converts a bool to a pointer of a bool

func WriteConfigs

func WriteConfigs(config Config, configDir string) error

WriteConfigs writes the configuration files to the given directory.

Types

type APMConfigurationDefault

type APMConfigurationDefault struct {
	TraceDebug                    *bool   `yaml:"DD_TRACE_DEBUG,omitempty"`
	IntegrationsEnabled           *bool   `yaml:"DD_INTEGRATIONS_ENABLED,omitempty"`
	DataJobsCommandPattern        string  `yaml:"DD_DATA_JOBS_COMMAND_PATTERN,omitempty"`
	DataJobsSparkAppNameAsService *bool   `yaml:"DD_SPARK_APP_NAME_AS_SERVICE,omitempty"`
	RuntimeMetricsEnabled         *bool   `yaml:"DD_RUNTIME_METRICS_ENABLED,omitempty"`
	LogsInjection                 *bool   `yaml:"DD_LOGS_INJECTION,omitempty"`
	APMTracingEnabled             *bool   `yaml:"DD_APM_TRACING_ENABLED,omitempty"`
	ProfilingEnabled              *string `yaml:"DD_PROFILING_ENABLED,omitempty"`
	DataStreamsEnabled            *bool   `yaml:"DD_DATA_STREAMS_ENABLED,omitempty"`
	AppsecEnabled                 *bool   `yaml:"DD_APPSEC_ENABLED,omitempty"`
	IastEnabled                   *bool   `yaml:"DD_IAST_ENABLED,omitempty"`
	DataJobsEnabled               *bool   `yaml:"DD_DATA_JOBS_ENABLED,omitempty"`
	AppsecScaEnabled              *bool   `yaml:"DD_APPSEC_SCA_ENABLED,omitempty"`
}

APMConfigurationDefault represents a host-wide configuration for services

type ApplicationMonitoringConfig

type ApplicationMonitoringConfig struct {
	Default APMConfigurationDefault `yaml:"apm_configuration_default,omitempty"`
}

ApplicationMonitoringConfig represents the configuration for the application monitoring

type Config

type Config struct {
	// DatadogYAML is the content of the datadog.yaml file
	DatadogYAML DatadogConfig
	// SecurityAgentYAML is the content of the security-agent.yaml file
	SecurityAgentYAML *SecurityAgentConfig
	// SystemProbeYAML is the content of the system-probe.yaml file
	SystemProbeYAML *SystemProbeConfig
	// IntegrationConfigs is the content of the integration configuration files under conf.d/
	IntegrationConfigs map[string]IntegrationConfig
	// ApplicationMonitoringYAML is the content of the application_monitoring.yaml configuration file
	ApplicationMonitoringYAML *ApplicationMonitoringConfig
}

Config represents the configuration to write in /etc/datadog-agent

type DatadogConfig

type DatadogConfig struct {
	APIKey               string                     `yaml:"api_key,omitempty"`
	Hostname             string                     `yaml:"hostname,omitempty"`
	Site                 string                     `yaml:"site,omitempty"`
	Proxy                DatadogConfigProxy         `yaml:"proxy,omitempty"`
	Env                  string                     `yaml:"env,omitempty"`
	Tags                 []string                   `yaml:"tags,omitempty"`
	ExtraTags            []string                   `yaml:"extra_tags,omitempty"`
	LogsEnabled          *bool                      `yaml:"logs_enabled,omitempty"`
	DJM                  DatadogConfigDJM           `yaml:"djm_config,omitempty"`
	ProcessConfig        DatadogConfigProcessConfig `yaml:"process_config,omitempty"`
	ExpectedTagsDuration string                     `yaml:"expected_tags_duration,omitempty"`
	RemoteUpdates        *bool                      `yaml:"remote_updates,omitempty"`
	Installer            DatadogConfigInstaller     `yaml:"installer,omitempty"`
	DDURL                string                     `yaml:"dd_url,omitempty"`
	LogsConfig           LogsConfig                 `yaml:"logs_config,omitempty"`
	GPUCheck             GPUCheckConfig             `yaml:"gpu,omitempty"`
	SBOM                 SBOMConfig                 `yaml:"sbom,omitempty"`
	InfrastructureMode   string                     `yaml:"infrastructure_mode,omitempty"`
}

DatadogConfig represents the configuration to write in /etc/datadog-agent/datadog.yaml

type DatadogConfigDJM

type DatadogConfigDJM struct {
	Enabled *bool `yaml:"enabled,omitempty"`
}

DatadogConfigDJM represents the configuration for the Data Jobs Monitoring

type DatadogConfigInstaller

type DatadogConfigInstaller struct {
	Registry DatadogConfigInstallerRegistry `yaml:"registry,omitempty"`
}

DatadogConfigInstaller represents the configuration for the installer

type DatadogConfigInstallerRegistry

type DatadogConfigInstallerRegistry struct {
	URL  string `yaml:"url,omitempty"`
	Auth string `yaml:"auth,omitempty"`
}

DatadogConfigInstallerRegistry represents the configuration for the installer registry

type DatadogConfigProcessConfig

type DatadogConfigProcessConfig struct {
	ExpvarPort int `yaml:"expvar_port,omitempty"`
}

DatadogConfigProcessConfig represents the configuration for the process agent

type DatadogConfigProxy

type DatadogConfigProxy struct {
	HTTP    string   `yaml:"http,omitempty"`
	HTTPS   string   `yaml:"https,omitempty"`
	NoProxy []string `yaml:"no_proxy,omitempty"`
}

DatadogConfigProxy represents the configuration for the proxy

type DelayedAgentRestartConfig added in v0.69.0

type DelayedAgentRestartConfig struct {
	Scheduled bool
	Delay     time.Duration
	LogFile   string
}

DelayedAgentRestartConfig represents the config to restart the agent with a delay at the end of the install

type GPUCheckConfig added in v0.70.0

type GPUCheckConfig struct {
	Enabled     *bool  `yaml:"enabled,omitempty"`
	NvmlLibPath string `yaml:"nvml_lib_path,omitempty"`
}

GPUCheckConfig represents the configuration for the GPU check

type GPUMonitoringConfig added in v0.69.0

type GPUMonitoringConfig struct {
	Enabled *bool `yaml:"enabled,omitempty"`
}

GPUMonitoringConfig represents the configuration for GPU monitoring

type InjectTracerConfig

type InjectTracerConfig struct {
	Version                        int                        `yaml:"version,omitempty"`
	ConfigSources                  string                     `yaml:"config_sources,omitempty"`
	AdditionalEnvironmentVariables []InjectTracerConfigEnvVar `yaml:"additional_environment_variables,omitempty"`
}

InjectTracerConfig represents the configuration to write in /etc/datadog-agent/inject/tracer.yaml

type InjectTracerConfigEnvVar

type InjectTracerConfigEnvVar struct {
	Key   string `yaml:"key"`
	Value string `yaml:"value"`
}

InjectTracerConfigEnvVar represents an environment variable to inject

type IntegrationConfig

type IntegrationConfig struct {
	InitConfig any                     `yaml:"init_config"`
	Instances  []any                   `yaml:"instances,omitempty"`
	Logs       []IntegrationConfigLogs `yaml:"logs,omitempty"`
}

IntegrationConfig represents the configuration for an integration under conf.d/

type IntegrationConfigInstanceSpark

type IntegrationConfigInstanceSpark struct {
	SparkURL         string `yaml:"spark_url"`
	SparkClusterMode string `yaml:"spark_cluster_mode"`
	ClusterName      string `yaml:"cluster_name"`
	StreamingMetrics bool   `yaml:"streaming_metrics"`
}

IntegrationConfigInstanceSpark represents the configuration for the Spark integration

type IntegrationConfigInstanceYarn

type IntegrationConfigInstanceYarn struct {
	ResourceManagerURI string `yaml:"resourcemanager_uri"`
	ClusterName        string `yaml:"cluster_name"`
}

IntegrationConfigInstanceYarn represents the configuration for the Yarn integration

type IntegrationConfigLogs

type IntegrationConfigLogs struct {
	Type                   string              `yaml:"type,omitempty"`
	Path                   string              `yaml:"path,omitempty"`
	Service                string              `yaml:"service,omitempty"`
	Source                 string              `yaml:"source,omitempty"`
	Tags                   string              `yaml:"tags,omitempty"`
	AutoMultiLineDetection *bool               `yaml:"auto_multi_line_detection,omitempty"`
	LogProcessingRules     []LogProcessingRule `yaml:"log_processing_rules,omitempty"`
}

IntegrationConfigLogs represents the configuration for the logs of an integration

type LogProcessingRule

type LogProcessingRule struct {
	Type    string `yaml:"type" json:"type"`
	Name    string `yaml:"name" json:"name"`
	Pattern string `yaml:"pattern" json:"pattern"`
}

LogProcessingRule represents the configuration for a log processing rule

type LogsConfig

type LogsConfig struct {
	ProcessingRules []LogProcessingRule `yaml:"processing_rules"`
}

LogsConfig represents the configuration for global log processing rules

type RuntimeSecurityConfig

type RuntimeSecurityConfig struct {
	Enabled *bool      `yaml:"enabled,omitempty"`
	SBOM    SBOMConfig `yaml:"sbom,omitempty"`
}

RuntimeSecurityConfig represents the configuration for the runtime security

type SBOMConfig added in v0.71.0

type SBOMConfig struct {
	Enabled        *bool                    `yaml:"enabled,omitempty"`
	ContainerImage SBOMContainerImageConfig `yaml:"container_image,omitempty"`
	Host           SBOMHostConfig           `yaml:"host,omitempty"`
}

SBOMConfig represents the configuration for the SBOM

type SBOMContainerImageConfig added in v0.71.0

type SBOMContainerImageConfig struct {
	Enabled *bool `yaml:"enabled,omitempty"`
}

SBOMContainerImageConfig represents the configuration for the SBOM container image

type SBOMHostConfig added in v0.71.0

type SBOMHostConfig struct {
	Enabled *bool `yaml:"enabled,omitempty"`
}

SBOMHostConfig represents the configuration for the SBOM host

type SecurityAgentComplianceConfig

type SecurityAgentComplianceConfig struct {
	Enabled *bool `yaml:"enabled,omitempty"`
}

SecurityAgentComplianceConfig represents the configuration for the compliance

type SecurityAgentConfig

type SecurityAgentConfig struct {
	ComplianceConfig      SecurityAgentComplianceConfig `yaml:"compliance_config,omitempty"`
	RuntimeSecurityConfig RuntimeSecurityConfig         `yaml:"runtime_security_config,omitempty"`
}

SecurityAgentConfig represents the configuration to write in /etc/datadog-agent/security-agent.yaml

type SystemProbeConfig

type SystemProbeConfig struct {
	RuntimeSecurityConfig RuntimeSecurityConfig `yaml:"runtime_security_config,omitempty"`
	GPUMonitoringConfig   GPUMonitoringConfig   `yaml:"gpu_monitoring,omitempty"`
}

SystemProbeConfig represents the configuration to write in /etc/datadog-agent/system-probe.yaml

Jump to

Keyboard shortcuts

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