I've been maintaining an ansible install script and have been calling it like this:
DD_API_KEY={{ DD_API_KEY }} \
DD_ENV={{ env }} \
DD_HOSTNAME={{ sftp_hostname }} \
DD_LOGS_ENABLED=true \
DD_REMOTE_UPDATES=true \
DD_SITE="datadoghq.com" \
bash -c "$(curl -L https://install.datadoghq.com/scripts/install_script_agent7.sh)"
I expect that setting the DD_LOGS_ENABLED parameter to translate into the logs_enabled key in the conf file during a fresh install, according to this comment in the datadog.yaml.
## Log collection Configuration ##
##################################
## @param logs_enabled - boolean - optional - default: false
## @env DD_LOGS_ENABLED - boolean - optional - default: false
## Enable Datadog Agent log collection by setting logs_enabled to true.
#
# logs_enabled: false
However, during a clean install, I am still seeing logs_enabled set to false despite including the DD_LOGS_ENABLED variable.
Attached the relevant install logs:
Installed:
datadog-agent-1:7.80.2-1.aarch64
Complete!
* Adding your API key to the Datadog Agent configuration: /etc/datadog-agent/datadog.yaml
* Setting SITE in the Datadog Agent configuration: /etc/datadog-agent/datadog.yaml
* Adding your HOSTNAME to the Datadog Agent configuration: /etc/datadog-agent/datadog.yaml
* Adding your DD_ENV to the Datadog Agent configuration: /etc/datadog-agent/datadog.yaml
* Setting Datadog Agent configuration to use Remote Updates: /etc/datadog-agent/datadog.yaml
/usr/bin/systemctl
* Starting the Datadog Agent...
Your Datadog Agent is running and functioning properly.
It will continue to run in the background and submit metrics to Datadog.
If you ever want to stop the Datadog Agent, run:
systemctl stop datadog-agent
Is there a way to set logs_enabled: true during install?
I've been maintaining an ansible install script and have been calling it like this:
I expect that setting the
DD_LOGS_ENABLEDparameter to translate into thelogs_enabledkey in the conf file during a fresh install, according to this comment in the datadog.yaml.However, during a clean install, I am still seeing
logs_enabledset to false despite including theDD_LOGS_ENABLEDvariable.Attached the relevant install logs:
Is there a way to set
logs_enabled: trueduring install?