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

Extra double quotes in env file lead to invalid syntax #600

Open
efoft opened this issue Dec 20, 2021 · 0 comments · May be fixed by #621
Open

Extra double quotes in env file lead to invalid syntax #600

efoft opened this issue Dec 20, 2021 · 0 comments · May be fixed by #621

Comments

@efoft
Copy link

efoft commented Dec 20, 2021

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.25.1
  • Distribution: CentOS 7.9
  • Module version: v12.2.0 (current master branch has the same problem)

What are you seeing

Invalid env file is created when installing haproxy_exporter with install_method == 'package':

ARGS="--haproxy.scrape-uri="unix:/var/lib/haproxy/stats" "

This is due to how this string is formed in the code

$options = "--haproxy.scrape-uri=\"${cnf_scrape_uri}\" ${extra_options}"

In /var/log/messages:
haproxy_exporter: ts=2021-12-19T00:28:14.598Z caller=haproxy_exporter.go:384 level=error msg="Can't scrape HAProxy" err="dial unix /var/lib/haproxy/stats : connect: no such file or directory"

Any additional information you'd like to impart

Once quotation is corrected like below the problem is gone

ARGS="--haproxy.scrape-uri=unix:/var/lib/haproxy/stats"

Double quotes around socket path is not requred.

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 a pull request may close this issue.

1 participant