Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

setting logs_enabled: true during install?

未关闭
#435 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
52/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
shell
领域
devops

调研方向

先阅读报告中引用的安装脚本,并跟踪生成 /etc/datadog-agent/datadog.yaml 时如何处理 DD_LOGS_ENABLED。设置该变量后重现一次全新安装,然后验证生成的配置包含 logs_enabled: true;文档所述的环境变量在安装过程中能够生效即表示完成。

由索引模型根据 Issue 内容生成。

描述

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?

主要语言
Shell
星标
17
派生
14
平均合并
2 天 22 小时
30 天内合并 PR
7

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

DataDog/agent-linux-install-script 的其他 Issue

查看 DataDog/agent-linux-install-script 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。