Output of the info page (if this is a bug)
2019-01-14 11:12:44 GMT | INFO | (collector.go:55 in NewCollector) | Embedding Python 2.7.15 (default, Nov 22 2018, 12:31:32) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.38)]
2019-01-14 11:12:44 GMT | INFO | (file.go:70 in Collect) | File: searching for configuration files at: /opt/datadog-agent/etc/conf.d
2019-01-14 11:12:44 GMT | INFO | (file.go:70 in Collect) | File: searching for configuration files at: /opt/datadog-agent/bin/agent/dist/conf.d
2019-01-14 11:12:44 GMT | WARN | (file.go:74 in Collect) | Skipping, open /opt/datadog-agent/bin/agent/dist/conf.d: no such file or directory
2019-01-14 11:12:44 GMT | INFO | (file.go:70 in Collect) | File: searching for configuration files at:
2019-01-14 11:12:44 GMT | WARN | (file.go:74 in Collect) | Skipping, open : no such file or directory
2019-01-14 11:12:44 GMT | ERROR | (loader.go:76 in Load) | core.loader: could not configure check APM Agent: APM agent disabled through main configuration file
2019-01-14 11:12:44 GMT | ERROR | (scheduler.go:184 in GetChecksFromConfigs) | Unable to load the check: unable to load any check from config 'apm'
Describe what happened:
APM does not start by default upon downloading a fresh agent v6 with the autogenerated config files on Mac
Describe what you expected:
I would expect the Agent to start by default or when uncommenting out
apm_config:
enabled: true
from the generated /opt/datadog-agent/etc/datadog.yaml file.
Steps to reproduce the issue:
Download a fresh agent v6 and run it directly on the host machine (not docker).
Additional environment details (Operating System, Cloud provider, etc):
Mac OSX, local machine, non-docker run
馃憢 humans (and bots), I tried to submit a PR with a test verifying the behaviour below but I failed miserably so here's what I think the issue is. In this PR https://github.com/DataDog/datadog-agent/commit/ceff3c9b4e91275d4d67043461173e6949ef712f it seems we are trying to keep some sorts of backwards compatibility with v5 https://github.com/DataDog/datadog-agent/commit/ceff3c9b4e91275d4d67043461173e6949ef712f#diff-87e7e787869de51e337ecd7ae6e74248R78. The issue I believe is, if the key is not present it still gets casted to false so it never starts APM.
The only way I managed to get around it is adding apm_enabled: true as a route key in the /opt/datadog-agent/etc/datadog.yaml.
I think the check should be is the key there first and then do the casting.
Happy to _pair_ async with someone to create a PR.
@periclesroo Had the same issue and adding apm_enabled: true got around it. Thanks for the research!
@periclesroo I have the same issue and apm_enabled: true works, thanks! 馃憤
BUT: what can I do if I need to run it in kubernetes and configuration is done through Datadog agent manifest?
There's only DD_APM_ENABLED option. Is it possible to add there apm_enabled somehow?
@malyborky unfortunately I don't think I will be able to help as I don't have that kind of setup to even test or reproduce it.
I added apm_enabled: true restarted the agent, etc. Still get
Core Check Loader: Could not configure check APM Agent: APM agent disabled through main configuration file
This will be fixed in 6.12.0 with https://github.com/DataDog/datadog-agent/pull/3304. Kudos to @Girbons for writing an earlier fix: https://github.com/DataDog/datadog-agent/pull/3155.
Starting with 6.12.0, on macOS, APM will be enabled by default, and can be disabled with the expected config option, i.e.:
apm_config:
enabled: false
or the DD_APM_ENABLED env var (set to false).
I added
apm_enabled: truerestarted the agent, etc. Still get
Core Check Loader: Could not configure check APM Agent: APM agent disabled through main configuration file
Same for me with Agent 6.11.3
Most helpful comment
@periclesroo Had the same issue and adding
apm_enabled: truegot around it. Thanks for the research!