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

varnishstat defaultBinary variable is not used #1752

Closed
joshuaspence opened this issue Sep 12, 2016 · 0 comments · Fixed by #1805
Closed

varnishstat defaultBinary variable is not used #1752

joshuaspence opened this issue Sep 12, 2016 · 0 comments · Fixed by #1805
Labels
bug unexpected problem or unintended behavior
Milestone

Comments

@joshuaspence
Copy link

I was trying to use the varnish input but was getting the following error:

> telegraf -config /etc/telegraf/telegraf.conf -input-filter varnish -test
* Plugin: varnish, Collection 1
2016/09/11 22:54:57 error gathering metrics: error running varnishstat: fork/exec : no such file or directory

It took me a while to figure it out, but it seems that I am required to specified the path to the varnishstat binary. This wasn't obvious from the usage text, which seemed to imply that the default should be set:

> telegraf -usage varnish

# A plugin to collect stats from Varnish HTTP Cache
[[inputs.varnish]]
  ## The default location of the varnishstat binary can be overridden with:
  binary = "/usr/bin/varnishstat"

  ## By default, telegraf gather stats for 3 metric points.
  ## Setting stats will override the defaults shown below.
  ## Glob matching can be used, ie, stats = ["MAIN.*"]
  ## stats may also be set to ["*"], which will collect all stats
  stats = ["MAIN.cache_hit", "MAIN.cache_miss", "MAIN.uptime"]

Looking at the source code, it looks like defaultBinary is set to /usr/bin/varnishstat but never referenced.

@sparrc sparrc added the bug unexpected problem or unintended behavior label Sep 12, 2016
@sparrc sparrc added this to the 1.1.0 milestone Sep 12, 2016
@sparrc sparrc changed the title defaultBinary variable is not used varnishstat defaultBinary variable is not used Sep 12, 2016
sparrc added a commit that referenced this issue Sep 23, 2016
jackzampolin pushed a commit that referenced this issue Oct 7, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants