-
Notifications
You must be signed in to change notification settings - Fork 813
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
Add a varnish service check. #1213
Conversation
@conorbranagan we can specify the same setup guidelines that we give in the postfix check: The "have better experience when check needs root access" is on the new agent core roadmap. |
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE) | ||
output, _ = proc.communicate() | ||
if varnishadm_path: | ||
self._parse_varnishadm(varnishadm_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In these two last lines, you probably meant output
instead of varnishadm_path
?
70f49b9
to
63453b0
Compare
Updated to use sudo now and fixed that other issue. Thanks. |
# privilleges. You can configure your sudoers file for this: | ||
# | ||
# example /etc/sudoers entry: | ||
# dd-agent ALL=(ALL) NOPASSWD:/usr/bin/find |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/find/varnishadm/ :rocket:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops! Copypasta
The service check uses the `varnishadm debug.health` command to get the health of available backends. One check per backend will be submitted, tagged by the backend name. The BIG question here is how we will let users enable this because the varnishadm command requires access to the secret key which has root permissions by default (and is owned by root).
63453b0
to
e28661b
Compare
😄 thanks! |
Add a varnish service check.
output, error = proc.communicate() | ||
if error and len(error) > 0: | ||
self.log.error(error) | ||
self._parse_varnishstat_metrics(varnishstat_path, use_xml, tags) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should pass "output" instead of "varnishstat_path" here.
See pullrequest #1377
Another change from #1213 introduced a regression by passing the path of the command instead of the output of the comand.
Another change from #1213 introduced a regression by passing the path of the command instead of the output of the comand.
The service check uses the
varnishadm debug.health
command toget the health of available backends. One check per backend will
be submitted, tagged by the backend name.
The BIG question here is how we will let users enable this because
the varnishadm command requires access to the secret key which has
root permissions by default (and is owned by root).
I don't know what the answer is yet but this will open up the discussion.