0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

DataDog Logsを有効にできないと思ったらええ~~っな原因だった話

Posted at
> sudo nano /etc/datadog-agent/datadoc.yaml

して
logs_enabled: true
にするのねハイハイ

> sudo systemctl restart datadog-agent
> sudo systemctl status datadog-agent
● datadog-agent.service - Datadog Agent
   Loaded: loaded (/lib/systemd/system/datadog-agent.service; enabled; vendor preset: enabled)
   Active: failed (Result: start-limit-hit) since Fri 2020-06-26 05:05:32 UTC; 1min 2s ago
  Process: 6456 ExecStart=/opt/datadog-agent/bin/agent/agent run -p /opt/datadog-agent/run/agent.pid (code=exited, status=255)
 Main PID: 6456 (code=exited, status=255)

Jun 26 05:05:31 ip-172-31-40-66 systemd[1]: datadog-agent.service: Unit entered failed state.
Jun 26 05:05:31 ip-172-31-40-66 systemd[1]: datadog-agent.service: Failed with result 'exit-code'.
Jun 26 05:05:32 ip-172-31-40-66 systemd[1]: datadog-agent.service: Service hold-off time over, scheduling restart.
Jun 26 05:05:32 ip-172-31-40-66 systemd[1]: Stopped Datadog Agent.
Jun 26 05:05:32 ip-172-31-40-66 systemd[1]: datadog-agent.service: Start request repeated too quickly.
Jun 26 05:05:32 ip-172-31-40-66 systemd[1]: Failed to start Datadog Agent.
Jun 26 05:05:32 ip-172-31-40-66 systemd[1]: datadog-agent.service: Unit entered failed state.
Jun 26 05:05:32 ip-172-31-40-66 systemd[1]: datadog-agent.service: Failed with result 'start-limit-hit'.

おいどゆこっちゃ。

なんぼやっても結果変わらない
logs_enabled: true をコメントアウトしたら動く

で、調べた結果出た答えが

##################################
## Log collection Configuration ##
##################################

## @param logs_enabled - boolean - optional - default: false
## Enable Datadog Agent log collection by setting logs_enabled to true.
#
# logs_enabled: false

 logs_enabled: true

にしてたけど

logs_enabled: true

が正解
logs_の前に半角スペース入ってたらダメだった。

ついつい、ほにゃらら.conf とか使っているとコメント外すだけでいけると思いがちだけど、yamlみたいなインデントで深さが決まる系のやつは一番上の階層でスペース入れたらダメと分かるはずと言われれば返す言葉がない。
でもやっちまったものは仕方ない、またやらかす可能性を否定しきれないのでここに残しておく。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?