We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
etcdctl endpoint health -w json
The health subcommands of etcdctl do not output in JSON even when JSON is explicitly requested:
$ ETCDCTL_API=3 etcdctl endpoint health -w json http://127.0.0.1:10001 is healthy: successfully committed proposal: took = 668.335µs
$ ETCDCTL_API=3 etcdctl endpoint --cluster health -w json http://127.0.0.1:20001 is healthy: successfully committed proposal: took = 601.324µs http://127.0.0.1:20003 is healthy: successfully committed proposal: took = 804.816µs http://127.0.0.1:20002 is unhealthy: failed to connect: dial tcp 127.0.0.1:20002: connect: connection refused Error: unhealthy cluster
Something like this would work:
{ "cluster": { "health": { "healthy": "false" }, "peers": [ { "Endpoint": "http://127.0.0.1:20003", "health": { "healthy": "true", "reason": "successfully committed proposal: took = 804.816µs" } }, { "Endpoint": "http://127.0.0.1:20001", "health": { "healthy": "true", "reason": "successfully committed proposal: took = 601.324µs" } }, { "Endpoint": "http://127.0.0.1:20002", "health": { "healthy": "false", "reason": "failed to connect: dial tcp 127.0.0.1:20002: connect: connection refused" } } ] } }
The text was updated successfully, but these errors were encountered:
Oh was confused with below issue. Yeah, this should not happen. Will fix.
Thanks for report!
Sorry, something went wrong.
Will the fix get backported to v3.3?
No branches or pull requests
The health subcommands of etcdctl do not output in JSON even when JSON is explicitly requested:
Something like this would work:
The text was updated successfully, but these errors were encountered: