-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
The output for version flag is printed on stderr #912
Comments
There's a relatively straightforward "fix" for this:
But it's worth nothing that this is NOT what Prometheus (or promtool, etc) does. Looking thru the discussion in the other issue, it was changed to accommodate this request, even if the specific issue being reported is fixed by:
(quoting might need to be different, not sure how ansible processes this) |
Thank you. I might have found a workaround for my issue on ansible by adding multiple conditions to check both stdout and stderr. Since the Prometheus and other subsidiaries of Prometheus are showing the version output on stdout, It makes sense to have the same in here as well. Can you consider this improvement in a future release? |
Yes, are you willing to contribute this change to the project? Thanks! |
It was changed in Prometheus: prometheus/prometheus#8542 and per dev summit, we want it everywhere. |
Hey! I missed this update. TBH I don't have prior knowledge in go lang. To save you some time, it's better for someone familiar with the exporter code to raise a PR. TIA. |
Following the change in prometheus/prometheus#8542 blackbox_exporter will send all usage out to stdout, not stderr. Fixes: #912 Signed-off-by: Marcelo E. Magallon <[email protected]>
Following the change in prometheus/prometheus#8542 blackbox_exporter will send all usage out to stdout, not stderr. Fixes: #912 Signed-off-by: Marcelo E. Magallon <[email protected]>
Thank you so much @mem @roidelapluie |
Was facing an issue with the version check for the exporter. But found a similar issue on node_exporter issues which is already fixed. Linking the same here prometheus/node_exporter#1271
Can we do the same fix here?
Host operating system: Linux 3.10.0-1062.12.1.el7.x86_64 #1 SMP Tue Feb 4 23:02:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
blackbox_exporter version: blackbox_exporter, version 0.20.0 (branch: HEAD, revision: 91372eb)
What is the blackbox.yml module config.
What is the prometheus.yml scrape config.
What logging output did you get from adding
&debug=true
to the probe URL?What did you do that produced an error?
Register the version output via ansible and display it using debug.
"cmd": [
"/usr/local/bin/blackbox_exporter",
"--version"
]
What did you expect to see?
"stdout": "blackbox_exporter, version 0.20.0
What did you see instead?
"stderr": "blackbox_exporter, version 0.20.0
The text was updated successfully, but these errors were encountered: