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

Remove indentation of the pgbouncer template to match the needed format of configuration file #427

Merged

Conversation

fwelschen
Copy link
Contributor

With the current template, the output of the configuration is wrong indented if the tags field was set

Output Example:

init_config:

instances:
  - host: localhost
    port: 5678
    username: datadog
    password: some-password
      tags:
      - dbinstanceidentifier:some-instance-identifier

In this scenario the pgbouncer integration doesn't work, when run datadog-agent status I get the following:

Config Errors
  ==============
    pgbouncer
    ---------
      yaml: line 9: mapping values are not allowed in this context

With this fix, the format will be the following

init_config:

instances:
  - host: localhost
    port: 5678
    username: datadog
    password: some-interesting-password
    tags:
      - dbinstanceidentifier:some-instance-identifier

Making the integration works if tags are specified.

…t of configuration file

With the current template the output of the configuration if the tags field was set was wrongly indented:

Output Example:

```
init_config:

instances:
  - host: localhost
    port: 5678
    username: datadog
    password: some-interesting-password
      tags:
      - dbinstanceidentifier:some-instance-identifier
```

The agent in this scenario was working right but if the integration with pgbouncer was not working as the tag field was wrongly indented.

With this change, the format will be the following

```
init_config:

instances:
  - host: localhost
    port: 5678
    username: datadog
    password: some-interesting-password
    tags:
      - dbinstanceidentifier:some-instance-identifier
```

Making the integration work if tags are specified.
Copy link
Member

@truthbk truthbk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix @fwelschen - greatly appreciated!

@truthbk truthbk added this to the 2.2.0 milestone Apr 25, 2018
@truthbk truthbk merged commit 5a38c82 into DataDog:master Apr 25, 2018
cegeka-jenkins pushed a commit to cegeka/puppet-datadog_agent that referenced this pull request Apr 6, 2020
…t of configuration file (DataDog#427)

With the current template the output of the configuration if the tags field was set was wrongly indented:

Output Example:

```
init_config:

instances:
  - host: localhost
    port: 5678
    username: datadog
    password: some-interesting-password
      tags:
      - dbinstanceidentifier:some-instance-identifier
```

The agent in this scenario was working right but if the integration with pgbouncer was not working as the tag field was wrongly indented.

With this change, the format will be the following

```
init_config:

instances:
  - host: localhost
    port: 5678
    username: datadog
    password: some-interesting-password
    tags:
      - dbinstanceidentifier:some-instance-identifier
```

Making the integration work if tags are specified.
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

Successfully merging this pull request may close these issues.

2 participants