Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{} placed at end of /etc/datadog-agent/datadog.yaml #93

Closed
rtizzy opened this issue Jan 5, 2018 · 8 comments · Fixed by #107
Closed

{} placed at end of /etc/datadog-agent/datadog.yaml #93

rtizzy opened this issue Jan 5, 2018 · 8 comments · Fixed by #107
Assignees
Labels

Comments

@rtizzy
Copy link

rtizzy commented Jan 5, 2018

Using the latest version of the Ansible galaxy role from the Galaxy repo, I have the following issue.

Replication:

Set the API variable
Enabled dd agent 6 (Believe this same error may happen regardless of agent 6)
Run the role.

Result:

The service will fail to start and a {} is placed at the end of the datadog.yaml file.
Removing the {} causes the service to start properly.

@rtizzy
Copy link
Author

rtizzy commented Jan 5, 2018

I believe this is unintended behavior causes when no extra config values are being set.

If I do something like set a tag via variables, everything works as expected.

This works:

datadog_api_key: REDACTED
# Testing the new beta agent due to superior performance and functionality
datadog_agent6: true

datadog_config:
  tags: "customer:{{ customer }}"

customer: bobsdogstore

This doesn't work.

datadog_api_key: REDACTED
# Testing the new beta agent due to superior performance and functionality
datadog_agent6: true

Looking at main.yml you see the following variable set.

# default datadog.conf options
datadog_config: {}

This behavior will need to be modified at some level to work properly when config is not set.

The best manner of handling this may be to simply unset the datadog_config default variable.

Please comment.

@k4nar
Copy link

k4nar commented Mar 5, 2018

I'm also encountering this issue with the version 2.0.1. It worked fined prior to 2.0 & with the agent v5.

@Meovel
Copy link

Meovel commented Mar 7, 2018

Out of this topic, just wanna mention there's a typo in README

Variables:
datadog_agent5 - install an agent5 instead of agent5 (default to false)

@sonjz
Copy link

sonjz commented Mar 8, 2018

same.

image

temporary fix:

# just added a default value from datadog.yaml.example so my service will start!
- name: Setup Datadog
  include_role:
    name: Datadog.datadog
  vars:
    datadog_api_key: "{{ datadog.api_key }}"
    datadog_config:
      skip_ssl_validation: no  # by default this is set

@pbudzon
Copy link

pbudzon commented Mar 12, 2018

Updated to the new version of the role and monitoring blew up because of this bug... not very nice :(

Thanks for the workaround @sonjz

@ohaiwalt
Copy link

Any word on when this will release? Ran into the issue yesterday :(

@hush-hush hush-hush self-assigned this Mar 23, 2018
@hush-hush hush-hush added the bug label Mar 23, 2018
@hush-hush
Copy link
Member

@rtizzy Thanks for reporting the issue and sorry for the late delay. I'll get on it right away.

@hush-hush
Copy link
Member

The fix is available in 2.0.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment