README
¶
Inventory Agent Payload
This package populates some of the agent-related fields in the inventories product in DataDog. More specifically the
datadog-agent table.
This is enabled by default but can be turned off using inventories_enabled config.
The payload is sent every 10min (see inventories_max_interval in the config) or whenever it's updated with at most 1
update every minute (see inventories_min_interval).
Content
The Set method from the component allow the rest of the codebase to add any information to the payload.
Agent Configuration
The agent configurations are scrubbed from any sensitive information (same logic than for the flare). The Format
section goes into more default about what configuration is sent.
Sending Agent configuration can be disabled using inventories_configuration_enabled.
Format
The payload is a JSON dict with the following fields
hostname- string: the hostname of the agent as shown on the status page.uuid- string: a unique identifier of the agent, used in case the hostname is empty.timestamp- int: the timestamp when the payload was created.agent_metadata- dict of string to JSON type:hostname_source- string: the source for the agent hostname (see pkg/util/hostname/providers.go:GetWithProvider).agent_version- string: the version of the Agent.agent_startup_time_ms- int: the Agent startup timestamp (Unix milliseconds timestamp).flavor- string: the flavor of the Agent. The Agent can be build under different flavor such as standalone dogstatsd, iot, serverless ... (seepkg/util/flavorpackage).fips_mode- bool: True if the Datadog Agent is in FIPS mode.config_apm_dd_url- string: the configuration valueapm_config.dd_url(scrubbed)config_dd_url- string: the configuration valuedd_url(scrubbed)config_site- string: the configuration valuesite(scrubbed)config_logs_dd_url- string: the configuration valuelogs_config.logs_dd_url(scrubbed)config_logs_socks5_proxy_address- string: the configuration valuelogs_config.socks5_proxy_address(scrubbed)config_no_proxy- array of strings: the configuration valueproxy.no_proxy(scrubbed)config_process_dd_url- string: the configuration valueprocess_config.process_dd_url(scrubbed)config_proxy_http- string: the configuration valueproxy.http(scrubbed)config_proxy_https- string: the configuration valueproxy.https(scrubbed)config_eks_fargate- bool: the configuration valueeks_fargatediagnostics- dict of string to JSON type: the result of series of connectivity checks performed on the agent including description, error and metadatainstall_method_tool- string: the name of the tool used to install the agent (ie, Chef, Ansible, ...).install_method_tool_version- string: the tool version used to install the agent (ie: Chef version, Ansible version, ...). This defaults to"undefined"when not installed through a tool (like when installed with apt, source build, ...).install_method_installer_version- string: The version of Datadog module (ex: the Chef Datadog package, the Datadog Ansible playbook, ...).logs_transport- string: The transport used to send logs to Datadog. Value is either"HTTP"or"TCP"when logs collection is enabled, otherwise the field is omitted.feature_cws_enabled- bool: True if the Cloud Workload Security is enabled (see:runtime_security_config.enabledconfig option).feature_process_enabled- bool: True if the Process Agent has process collection enabled (see:process_config.process_collection.enabledconfig option).feature_process_language_detection_enabled- bool: True if process language detection is enabled (see:language_detection.enabledconfig option).feature_processes_container_enabled- bool: True if the Process Agent has container collection enabled (see:process_config.container_collection.enabled)feature_networks_enabled- bool: True if the Network Performance Monitoring is enabled (see:network_config.enabledconfig option insystem-probe.yaml).feature_traceroute_enabled- bool: True if the Traceroute module is enabled in the System Probe (see:traceroute.enabledconfig option insystem-probe.yaml).feature_oom_kill_enabled- bool: True if the OOM Kill check is enabled for System Probe (see:system_probe_config.enable_oom_killconfig option insystem-probe.yaml).feature_synthetics_collector_enabled- bool: True if Synthetics Test module is enabled.feature_tcp_queue_length_enabled- bool: True if TCP Queue Length check is enabled in System Probe (see:system_probe_config.enable_tcp_queue_lengthconfig option insystem-probe.yaml).system_probe_telemetry_enabled- bool: True if Telemetry is enabled in the System Probe (see:system_probe_config.telemetry_enabledconfig option insystem-probe.yaml).system_probe_core_enabled- bool: True if CO-RE is enabled in the System Probe (see:system_probe_config.enable_co_reconfig option insystem-probe.yaml).system_probe_runtime_compilation_enabled- bool: True if Runtime Compilation is enabled in the System Probe (see:system_probe_config.enable_runtime_compilerconfig option insystem-probe.yaml).system_probe_kernel_headers_download_enabled- bool: True if Kernel header downloading is enabled in the System Probe (see:system_probe_config.enable_kernel_header_downloadconfig option insystem-probe.yaml).system_probe_prebuilt_fallback_enabled- bool: True if the System Probe will fallback to prebuilt when other options fail (see:system_probe_config.allow_prebuilt_fallbackconfig option insystem-probe.yaml).system_probe_max_connections_per_message- int: The maximum number of connections per message (see:system_probe_config.max_conns_per_messageconfig option insystem-probe.yaml).system_probe_track_tcp_4_connections- bool: True if tracking TCPv4 connections is enabled in the System Probe (see:network_config.collect_tcp_v4config option insystem-probe.yaml).system_probe_track_tcp_6_connections- bool: True if tracking TCPv6 connections is enabled in the System Probe (see:network_config.collect_tcp_v6config option insystem-probe.yaml).system_probe_track_udp_4_connections- bool: True if tracking UDPv4 connections is enabled in the System Probe (see:network_config.collect_udp_v4config option insystem-probe.yaml).system_probe_track_udp_6_connections- bool: True if tracking UDPv6 connections is enabled in the System Probe (see:network_config.collect_udp_v6config option insystem-probe.yaml).system_probe_protocol_classification_enabled- bool: True if protocol classification is enabled in the System Probe (see:network_config.enable_protocol_classificationconfig option insystem-probe.yaml).system_probe_gateway_lookup_enabled- bool: True if gateway lookup is enable in the System Probe (see:network_config.enable_gateway_lookupconfig option insystem-probe.yaml).system_probe_root_namespace_enabled- bool: True if the System Probe will run in the root namespace of the host (see:network_config.enable_root_netnsconfig option insystem-probe.yaml).feature_networks_http_enabled- bool: True if HTTP monitoring is enabled for Network Performance Monitoring (see:service_monitoring_config.http.enabledconfig option insystem-probe.yaml).feature_networks_https_enabled- bool: True if HTTPS monitoring is enabled for Universal Service Monitoring (see:service_monitoring_config.tls.native.enabledconfig option insystem-probe.yaml).feature_remote_configuration_enabled- bool: True if Remote Configuration is enabled (see:remote_configuration.enabledconfig option).feature_remote_updates_enabled- bool: True if Remote Updates is enabled (see:remote_updatesconfig option).feature_usm_enabled- bool: True if Universal Service Monitoring is enabled (see:service_monitoring_config.enabledconfig option insystem-probe.yaml)feature_usm_http2_enabled- bool: True if HTTP2 monitoring is enabled for Universal Service Monitoring (see:service_monitoring_config.http2.enabledconfig option insystem-probe.yaml).feature_usm_kafka_enabled- bool: True if Kafka monitoring is enabled for Universal Service Monitoring (see:service_monitoring_config.enable_kafka_monitoringconfig option insystem-probe.yaml)feature_usm_postgres_enabled- bool: True if Postgres monitoring is enabled for Universal Service Monitoring (see:service_monitoring_config.postgres.enabledconfig option insystem-probe.yaml)feature_usm_redis_enabled- bool: True if Redis monitoring is enabled for Universal Service Monitoring (see:service_monitoring_config.enable_redis_monitoringconfig option insystem-probe.yaml)feature_usm_go_tls_enabled- bool: True if HTTPS monitoring through GoTLS is enabled for Universal Service Monitoring (see:service_monitoring_config.tls.go.enabledconfig option insystem-probe.yaml).feature_discovery_enabled- bool: True if discovery module is enabled (see:discovery.enabledconfig option).feature_dynamic_instrumentation_enabled- bool: True if dynamic instrumentation module is enabled (see:dynamic_instrumentation.enabledconfig option).feature_logs_enabled- bool: True if the logs collection is enabled (see:logs_enabledconfig option).feature_cspm_enabled- bool: True if the Cloud Security Posture Management is enabled (see:compliance_config.enabledconfig option).feature_cspm_host_benchmarks_enabled- bool: True if host benchmarks are enabled (see:compliance_config.host_benchmarks.enabledconfig option).feature_apm_enabled- bool: True if the APM Agent is enabled (see:apm_config.enabledconfig option).feature_otlp_enabled- bool: True if the OTLP pipeline is enabled.feature_imdsv2_enabled- bool: True if the IMDSv2 is enabled (see:ec2_prefer_imdsv2config option).feature_container_images_enabled- bool: True if Container Images is enabled (see:container_image.enabledconfig option).feature_csm_vm_containers_enabled- bool: True if VM Containers is enabled for Cloud Security Management (see:sbom.enabled,container_image.enabledandsbom.container_image.enabledconfig options).feature_csm_vm_hosts_enabled- bool: True if VM Hosts is enabled for Cloud Security Management (see:sbom.enableandsbom.host.enabledconfig option).feature_cws_network_enabled- bool: True if Network Monitoring is enabled for Cloud Workload Security (see:event_monitoring_config.network.enabledconfig option).feature_cws_remote_config_enabled- bool: True if Remote Config is enabled for Cloud Workload Security (see:runtime_security_config.remote_configuration.enabledconfig option).feature_cws_security_profiles_enabled- bool: True if Security Profiles is enabled for Cloud Workload Security (see:runtime_security_config.activity_dump.enabledconfig option).feature_usm_istio_enabled- bool: True if Istio is enabled for Universal Service Monitoring (see:service_monitoring_config.tls.istio.enabledconfig option).feature_windows_crash_detection_enabled- bool: True if Windows Crash Detection is enabled (see:windows_crash_detection.enabledconfig option).feature_auto_instrumentation_enabled- bool: True if APM Auto-Instrumentation is installed and enabled.full_configuration- string: the current Agent configuration scrubbed, including all the defaults, as a YAML string.provided_configuration- string: the current Agent configuration (scrubbed), without the defaults, as a YAML string. This includes the settings configured by the user (throuh the configuration file, the environment or CLI), as well as any settings explicitly set by the agent (for example the number of workers is dynamically set by the agent itself based on the load).file_configuration- string: the Agent configuration specified by the configuration file (scrubbed), as a YAML string. Only the settings written in the configuration file are included, and their value might not match what's applyed by the agent because they can be overriden by other sources.environment_variable_configuration- string: the Agent configuration specified by the environment variables (scrubbed), as a YAML string. Only the settings written in the environment variables are included, and their value might not match what's applyed by the agent because they can be overriden by other sources.agent_runtime_configuration- string: the Agent configuration set by the agent itself (scrubbed), as a YAML string. Only the settings set by the agent itself are included, and their value might not match what's applyed by the agent because they can be overriden by other sources.remote_configuration- string: the Agent configuration specified by the Remote Configuration (scrubbed), as a YAML string. Only the settings currently used by Remote Configuration are included, and their value might not match what's applyed by the agent because they can be overriden by other sources.fleet_policies_configuration- string: the Agent configuration specified by the Fleet Automation Policies (scrubbed), as a YAML string. Only the settings currently used by Fleet Automation Policies are included, and their value might not match what's applyed by the agent since they can be overriden by other sources.cli_configuration- string: the Agent configuration specified by the CLI (scrubbed), as a YAML string. Only the settings set in the CLI are included, they cannot be overriden by any other sources.source_local_configuration- string: the Agent configuration synchronized from the local Agent process, as a YAML string.ecs_fargate_task_arn- string: if the Agent runs in ECS Fargate, contains the Agent's Task ARN. Else, is empty.ecs_fargate_cluster_name- string: if the Agent runs in ECS Fargate, contains the Agent's cluster name. Else, is empty.fleet_policies_applied-- array of string: The Fleet Policies that have been applied to the agent, if any. Is empty if no policy is applied.config_id-- string: the Fleet Config ID, the configuration valueconfig_id.auto_instrumentation_modes-- array of string: The injection types enabled for APM Auto-Instrumentation.infrastructure_mode-- string: The monitoring mode the agent is configured in, each mode offers different amount of feature (default isfull, other potential values areend_user_deviceorbasic).application_monitoring_config-- string: the Application Monitoring configuration, as a YAML string.
("scrubbed" indicates that secrets are removed from the field value just as they are in logs)
Example Payload
Here an example of an inventory payload:
{
"agent_metadata": {
"agent_version": "7.37.0-devel+git.198.68a5b69",
"config_apm_dd_url": "",
"config_dd_url": "",
"config_logs_dd_url": "",
"config_logs_socks5_proxy_address": "",
"config_no_proxy": [
"http://some-no-proxy"
],
"config_process_dd_url": "",
"config_proxy_http": "",
"config_proxy_https": "http://localhost:9999",
"config_site": "",
"feature_imdsv2_enabled": false,
"feature_apm_enabled": true,
"feature_cspm_enabled": false,
"feature_cws_enabled": false,
"feature_logs_enabled": true,
"feature_networks_enabled": false,
"feature_traceroute_enabled": false,
"feature_synthetics_collector_enabled": false,
"feature_process_enabled": false,
"feature_remote_configuration_enabled": false,
"flavor": "agent",
"hostname_source": "os",
"install_method_installer_version": "",
"install_method_tool": "undefined",
"install_method_tool_version": "",
"logs_transport": "HTTP",
"full_configuration": "<entire yaml configuration for the agent>",
"provided_configuration": "api_key: \"***************************aaaaa\"\ncheck_runners: 4\ncontainerd_namespace: []\ncontainerd_namespaces: []tracemalloc_debug: false\nlog_level: \"warn\"",
"file_configuration": "check_runners: 4\ncontainerd_namespace: []\ncontainerd_namespaces: []tracemalloc_debug: false",
"agent_runtime_configuration": "runtime_block_profile_rate: 5000",
"environment_variable_configuration": "api_key: \"***************************aaaaa\"",
"remote_configuration": "log_level: \"debug\"",
"cli_configuration": "log_level: \"warn\"",
"source_local_configuration": "",
"config_id": "my-config"
}
"hostname": "my-host",
"timestamp": 1631281754507358895
}
Documentation
¶
Overview ¶
Package inventoryagent implements a component to generate the 'datadog_agent' metadata payload for inventory.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component interface {
// Set updates a metadata value in the payload. The given value will be stored in the cache without being copied. It is
// up to the caller to make sure the given value will not be modified later.
Set(name string, value interface{})
// Get returns a copy of the agent metadata. Useful to be incorporated in the status page.
Get() map[string]interface{}
}
Component is the component type.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package inventoryagentimpl implements a component to generate the 'datadog_agent' metadata payload for inventory.
|
Package inventoryagentimpl implements a component to generate the 'datadog_agent' metadata payload for inventory. |