Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logs_agent_config attribute is ignored #800

Open
axl89 opened this issue May 28, 2021 · 1 comment
Open

logs_agent_config attribute is ignored #800

axl89 opened this issue May 28, 2021 · 1 comment

Comments

@axl89
Copy link
Contributor

axl89 commented May 28, 2021

This issue seems related with #704 .

When having a datadog role like the following one, the /etc/datadog-agent/datadog.yaml does not print the logs_agent_config section:

Role

{
    "name": "datadog",
    "description": "Installs Datadog agent",
    "default_attributes": {
        "datadog": {
            "api_key": "xx",
            "application_key": "yy",
            "enable_process_agent": true,
            "enable_logs_agent": true,
            "logs_agent_config": {
                "container_collect_all": true
            },
            "collect_ec2_tags": true,
            "system_probe": {
                "network_enabled": true
            },
            "enable_trace_agent": true,
            "extra_config": {
                "runtime_security_config": true,
                "compliance_config": true,
                "fim_enabled": true,
                "syscall_monitor": true
            }
        }
    },
    "run_list": [
        "recipe[datadog::dd-agent]",
        "recipe[datadog::dd-handler]"
    ]
}

Obtained datadog.yaml

# Generated by Chef, local modifications will be overwritten

---
runtime_security_config: true
compliance_config: true
fim_enabled: true
syscall_monitor: true
api_key: xx
site: datadoghq.eu
hostname: wutwut
bind_host: localhost
additional_endpoints: {}
tags: []
collect_ec2_tags: true
dogstatsd_non_local_traffic: false
histogram_aggregates:
- max
- median
- avg
- count
histogram_percentiles:
- '0.95'
use_dogstatsd: true
log_level: INFO
logs_enabled: true
log_file: "/var/log/datadog/agent.log"
process_config:
  enabled: 'true'
  intervals: {}
  blacklist_patterns: []
  scrub_args: true
  custom_sensitive_words: []
  process_dd_url: https://process.datadoghq.com
apm_config:
  enabled: true
  apm_non_local_traffic: false
@axl89
Copy link
Contributor Author

axl89 commented May 28, 2021

We ended up having to modify the role (the datadog.extra_config section to be precise) as this to get it working:

diff --git a/datadog.json b/datadog.json
index 46c4955..25a8231 100644
--- a/datadog.json
+++ b/datadog.json
@@ -7,9 +7,6 @@
       "application_key": "yy",
       "enable_process_agent": true,
       "enable_logs_agent": true,
-      "logs_agent_config": {
-        "container_collect_all": true
-      },
       "collect_ec2_tags": true,
       "system_probe": {
         "network_enabled": true
@@ -19,11 +16,14 @@
         "runtime_security_config": true,
         "compliance_config": true,
         "fim_enabled": true,
-        "syscall_monitor": true
+        "syscall_monitor": true,
+        "logs_agent_config": {
+          "container_collect_all": true
+        }
       }
     }
   },
   "run_list": [
        "recipe[datadog::dd-agent]",
        "recipe[datadog::dd-handler]"
   ]
-}
\ No newline at end of file
+}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant