Skip to content

Why do we try to read /etc/dd-agent/datadog.conf? #176

@tgwizard

Description

@tgwizard

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

config = get_config()
, and it is causing some issues for us.

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions