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

Creation of munged rabbitmq.yaml files -- but it works fine for other integrations #15

Closed
mnewell opened this issue Feb 8, 2016 · 1 comment

Comments

@mnewell
Copy link

mnewell commented Feb 8, 2016

When I use this role to configure agent integrations for Postgres, Mongo, and Docker it works just fine. With RabbitMQ the generated YAML file gets munged inexplicably.

I send code like this to the role to configure RabbitMQ:

  roles:
    - { role: Datadog.datadog, sudo: true }
    - datadog
  vars:
    datadog_api_key: "0000000000000"
    datadog_checks:
      rabbitmq:
        init_config:
        instances:
        - rabbitmq_api_url: https://hostname1.com:15672/api/
          rabbitmq_user: ********
          rabbitmq_pass: ********
          tags:
            - env:prod
            - prod_rmq4
            - prod_rabbitmq
          queues_regexes:
            - .*WebReportJobQueue.*
            - .*tx_history_queue.*
          vhosts:
            - prod
            - prodjob

And when I run it in a playbook, it generates an /etc/dd-agent/conf.d/rabbitmq.yaml like this:

init_config: null
instances:
-   queues_regexes:
    - .*WebReportJobQueue.*
    - .*tx_history_queue.*
    rabbitmq_api_url: https://hostname1.com:15672/api/
    rabbitmq_pass: ********
    rabbitmq_user: ********
    tags:
    - env:prod
    - prod_rmq4
    - prod_rabbitmq
    vhosts:
    - prod
    - prodjob

Is there a bug or am I just stupidly screwing up the config YAML?

@olivielpeau
Copy link
Member

Hi @mnewell, thanks for opening this issue!

Actually the generated yaml you've given is semantically equivalent to the one that's defined in your role. The order of the keys in an element of the list of instances doesn't matter.

YAML syntax can be quite confusing sometimes, feel free to use a YAML parser (for instance http://yaml-online-parser.appspot.com/) if you have doubts.

I'll go ahead and close this issue but feel free to add a comment if you have anything to add. Thanks!

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

2 participants