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

ctlv3: support "write-out" for "endpoint health" command #9540

Merged
merged 2 commits into from
Apr 6, 2018

Conversation

gyuho
Copy link
Contributor

@gyuho gyuho commented Apr 6, 2018

$ ETCDCTL_API=3 ./bin/etcdctl endpoint --cluster health --write-out simple                                                    
http://127.0.0.1:2379 is healthy: successfully committed proposal: took = 474.51µs                                                                            
http://127.0.0.1:32379 is healthy: successfully committed proposal: took = 719.75µs                                                                           
http://127.0.0.1:22379 is healthy: successfully committed proposal: took = 459.323µs                                                                          

$ ETCDCTL_API=3 ./bin/etcdctl endpoint --cluster health --write-out table                                                     
+------------------------+--------+-----------+-------+                        
|        ENDPOINT        | HEALTH |   TOOK    | ERROR |                        
+------------------------+--------+-----------+-------+                        
|  http://127.0.0.1:2379 |   true | 520.835µs |       |                        
| http://127.0.0.1:32379 |   true | 518.894µs |       |                        
| http://127.0.0.1:22379 |   true | 751.764µs |       |                        
+------------------------+--------+-----------+-------+                        

$ ETCDCTL_API=3 ./bin/etcdctl endpoint --cluster health --write-out proto                                                     
Error: unsupported output format       

$ ETCDCTL_API=3 ./bin/etcdctl endpoint --cluster health --write-out json                                                      
[{"endpoint":"http://127.0.0.1:32379","health":true,"took":"749.662µs"},{"endpoint":"http://127.0.0.1:2379","health":true,"took":"456.438µs"},{"endpoint":"http://127.0.0.1:22379","health":true,"took":"772.233µs"}]

Fix #9532.

/cc @omkensey

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
@gyuho gyuho merged commit ff455e3 into etcd-io:master Apr 6, 2018
@gyuho gyuho deleted the hhh branch April 6, 2018 20:25
gyuho added a commit that referenced this pull request Jun 4, 2019
gyuho added a commit that referenced this pull request Jun 4, 2019
gyuho added a commit that referenced this pull request Jun 4, 2019
jingyih added a commit to jingyih/etcd that referenced this pull request Jun 4, 2019
To make the output consistent with the output before etcd-io#9540.
jingyih added a commit to jingyih/etcd that referenced this pull request Jun 4, 2019
jingyih added a commit to jingyih/etcd that referenced this pull request Jun 4, 2019
jingyih added a commit to jingyih/etcd that referenced this pull request Jun 4, 2019
jingyih added a commit to jingyih/etcd that referenced this pull request Jun 4, 2019
jingyih added a commit to jingyih/etcd that referenced this pull request Jun 4, 2019
jingyih added a commit to jingyih/etcd that referenced this pull request Jun 4, 2019
gyuho added a commit that referenced this pull request Jun 5, 2019
jingyih added a commit to jingyih/etcd that referenced this pull request Jun 5, 2019
To make the output consistent with the output before etcd-io#9540.
jingyih added a commit to jingyih/etcd that referenced this pull request Jun 5, 2019
To make the output consistent with the output before etcd-io#9540.
jingyih added a commit to jingyih/etcd that referenced this pull request Jun 5, 2019
To make the output consistent with the output before etcd-io#9540.
hexfusion pushed a commit to openshift/etcd that referenced this pull request Sep 26, 2019
To make the output consistent with the output before etcd-io#9540.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant