-
Notifications
You must be signed in to change notification settings - Fork 318
Description
Why does the datadog library try to read the Datadog Agent config on /etc/dd-agent/datadog.conf? It seems to only be used in
datadogpy/datadog/util/hostname.py
Line 54 in 969c703
| config = get_config() |
To be able to read the config file, the service running the datadog library must have read privileges for that file. However, the default settings from the datadog cookbook marks the config file as owned by dd-agent:root, with permissions 0640. We don't want to run our services as either the dd-agent user or a user in the root group, and the datadog cookbook doesn't allow us to change the permissions.
It all works fine even without the read permissions - datadog defaults to parsing hostname -f. However, as of #161, we get a log line like
2016-10-30 20:57:28,874: INFO: (-) datadog.api: No agent or invalid configuration file found
every time we start our services.
Why do we need to read the hostname from the config file - isn't hostname -f good enough? Or do people often have custom hostnames in the datadog agent config file? How do people solve the config file permission issue?