LoginSignup
2
2

More than 5 years have passed since last update.

DataDogはホスト名がRFC 1123に準拠してないとインストール失敗する

Last updated at Posted at 2015-09-02

インストールコケたのでメモ

確認した環境

  • Amazon Linux (2015.03.0.x86_64)
  • datadog-agent (1:5.4.3-1)

インストール

[root@hoge_hoge ~]# DD_API_KEY=******************* bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/dd-agent/master/packaging/datadog-agent/source/install_agent.sh)"
.....
.....
2015-08-26 11:24:15,824 | WARNING | dd.collector | util(util.py:161) | Hostname: hoge_hoge is not complying with RFC 1123
2015-08-26 11:24:15,825 | CRITICAL | dd.collector | util(util.py:227) | Unable to reliably determine host name. You can define one in datadog.conf or in your hosts file
Traceback (most recent call last):
  File "/opt/datadog-agent/agent/agent.py", line 375, in <module>
    sys.exit(main())
  File "/opt/datadog-agent/agent/agent.py", line 219, in main
    hostname = get_hostname(agentConfig)
  File "/opt/datadog-agent/agent/util.py", line 228, in get_hostname
    raise Exception('Unable to reliably determine host name. You can define one in datadog.conf or in your hosts file')
Exception: Unable to reliably determine host name. You can define one in datadog.conf or in your hosts file
.....

こんな感じのエラーが多数出てくる。
RFC 1123 に準拠しないのでエラーと出てる。

回避策

エラーメッセージに書いてある通り、 datadog.conf を編集してRFC1123に準拠する名前に書き換える必要が有る。
AmazonLinuxの場合は /etc/dd-agent/datadog.conf を編集

vim /etc/dd-agent/datadog.conf

[Main]

....


# Force the hostname to whatever you want.
hostname: hogehoge

関連するソース

RFC1123に準拠しているか正規表現でチェックしてる。

明示的にチェックしてる理由は分からないけれど、Datadog導入を考えている場合はホスト名はRFC1123に準拠してた方がベター。

2
2
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
2
2