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

Bug in haproxy example config #18016

Open
defcon84 opened this issue Jul 10, 2024 · 2 comments
Open

Bug in haproxy example config #18016

defcon84 opened this issue Jul 10, 2024 · 2 comments
Assignees

Comments

@defcon84
Copy link

If I use the default haproxy.d/conf.yaml.example the integration returns an exception:

Datadog’s haproxy integration is reporting:
Instance #initialization[ERROR]: yaml: unmarshal errors: line 3: cannot unmarshal !!map into []integration.RawMap

It seems Instances is a list and the default dash (-) on row 48 was removed in this changeset:
21e55ad#diff-54a9adc2f86e2b48330c011f28bb25f2fb31dc4f604b129c4d66f645e94198c1

this is the (condensed) current, wrong example config:

init_config:
instances:

This is what it should be:

init_config:
instances:
  -
@iliakur
Copy link
Contributor

iliakur commented Nov 15, 2024

@defcon84 when is it useful to have an empty instances field?

@iliakur iliakur self-assigned this Nov 15, 2024
@CloudInnovationsFC
Copy link

CloudInnovationsFC commented Nov 15, 2024

@iliakur

@defcon84 when is it useful to have an empty instances field?

In the Haproxy specific, I don't know if an empty instance field is useful.
This is the config I use now:

init_config:
instances:
  -
    use_openmetrics: true
    openmetrics_endpoint: http://10.x.x.x:8404/metrics

But the - is needed or it throws an exception.

Also, it would be more in line with the other example config files, eg:
https://github.com/DataDog/integrations-core/blob/master/iis/datadog_checks/iis/data/conf.yaml.example

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