Skip to content

cluster health does not print out json #10778

Closed
@ajs11174

Description

@ajs11174

I am just running a simple endpoint health command and expecting the output to be json

root@ip-10-0-0-10:/home/ubuntu# ETCDCTL_API=3 etcdctl --cacert /etc/etcd/pki/ca.crt \
--cert /etc/etcd/pki/client.crt --key /etc/etcd/pki/client.key \
--endpoints "https://10.0.0.10:2379" endpoint --cluster health --write-out json

https://10.0.0.10:2379 is healthy: successfully committed proposal: took = 17.043735ms
https://10.0.8.10:2379 is healthy: successfully committed proposal: took = 2.440481ms
https://10.0.4.10:2379 is healthy: successfully committed proposal: took = 1.686717ms

Here is my etcdctl/etcd version

root@ip-10-0-0-10:/home/ubuntu# ETCDCTL_API=3 etcdctl --cacert /etc/etcd/pki/ca.crt \
--cert /etc/etcd/pki/client.crt --key /etc/etcd/pki/client.key version

etcdctl version: 3.3.13
API version: 3.3

Other commands do print out correctly. For example cluster status prints out just fine

ETCDCTL_API=3 etcdctl --cacert /etc/etcd/pki/ca.crt --cert /etc/etcd/pki/client.crt --key /etc/etcd/pki/client.key --endpoints "https://m0.etcd.dealcube:2379" endpoint --cluster status --write-out json
[{"Endpoint":"https://10.0.4.10:2379","Status":{"header":{"cluster_id":16453928603903837334,"member_id":280618240456672560,"revision":431256,"raft_term":177},"version":"3.3.13","dbSize":10039296,"leader":280618240456672560,"raftIndex":540029,"raftTerm":177}},{"Endpoint":"https://10.0.0.10:2379","Status":{"header":{"cluster_id":16453928603903837334,"member_id":3546093130203668075,"revision":431256,"raft_term":177},"version":"3.3.13","dbSize":10117120,"leader":280618240456672560,"raftIndex":540029,"raftTerm":177}},{"Endpoint":"https://10.0.8.10:2379","Status":{"header":{"cluster_id":16453928603903837334,"member_id":11471290683035990776,"revision":431256,"raft_term":177},"version":"3.3.13","dbSize":9900032,"leader":280618240456672560,"raftIndex":540029,"raftTerm":177}}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions