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

Add configuration options to datadog.yml #29

Closed
mr337 opened this issue Nov 19, 2018 · 4 comments
Closed

Add configuration options to datadog.yml #29

mr337 opened this issue Nov 19, 2018 · 4 comments

Comments

@mr337
Copy link

mr337 commented Nov 19, 2018

The DD formula has worked great but we are needing to tweak settings within datadog.yml such as tags, collect_ec2_tags, and enable_metadata_collection.

I do see a related PR #24. Looking at how this is designed as the number of options need to get added the amount of if statements will continue to grow (https://github.com/DataDog/datadog-formula/pull/24/files#diff-14b50415a1c3f0d35d35d0e6bd0b322aR40).

Would this repo be open/interest to move datadog.yml to a jinja templated file, so an user could just plug values into pillar for arbitrary config?

Example of the test.pillar updated that would write to datadog.yml only under the dd_config block:

datadog:
  api_key: aaaaaaaabbbbbbbbccccccccdddddddd
  checks:
    process:
      init_config:
        procfs_path: /proc
      instances:
        - name: ssh
          search_string: ['sshd']
    tcp_check:
      instances:
        - host: 127.0.0.1
          name: sshd
          port: 22
  dd_config:
    - collect_ec2_tags: True
    - enable_metadata_collection: True

@mr337
Copy link
Author

mr337 commented Dec 4, 2018

Hoping to get an opinion on this. Thanks!

@MSeven
Copy link
Contributor

MSeven commented Feb 15, 2019

i'm currently using the following state to use any pillar data to overwrite the config file.

/etc/datadog-agent/datadog.yaml:
  file.serialize:
    - dataset: {{ salt['pillar.get']('datadog:config') }}
    - formatter: yaml

@mr337
Copy link
Author

mr337 commented Feb 15, 2019

Nice, that is way less work :D

@mr337 mr337 closed this as completed Apr 23, 2019
@davidvasandani
Copy link

This didn't work as well for me. Any suggestions?

# cat /etc/datadog-agent/datadog.yaml
u'api_key': u'aaaaaaaabbbbbbbbccccccccdddddddd'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants