Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

setting logs_enabled: true during install?

Open
#435 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
shell
Domain
devops

Research direction

Start by reading the install script referenced in the report and trace how DD_LOGS_ENABLED is handled while generating /etc/datadog-agent/datadog.yaml. Reproduce a clean install with the variable set, then verify that the resulting configuration contains logs_enabled: true; done means the documented environment variable works during installation.

Written by the indexing model from the issue text.

Description

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?

Dominant language
Shell
Stars
17
Forks
14
Avg merge
2d 22h
Merged PRs (30d)
7

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DataDog/agent-linux-install-script

All issues in DataDog/agent-linux-install-script

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.