This is a simple ETCD check, it's intended to verify if all endpoints are ok, and it's useful to better understand ETCD api :)
To run this software you have to enumerate all endpoints and the certificate it will use to access them
etcd_check -endpoints etcd1:2379,etcd2:2381,etcd3:2383 -cert ./etcd_tls/etcd1.pem -key ./etcd_tls/etcd1-key.pem
-n -u
etcd_check:
-cacert string
Certification authority file (default "etcd_tls/ca.pem")
-cert string
Server or Client certificate file (default "etcd_tls/server.pem")
-endpoints string
Comma separated list of ETCD endpoints without protocol (default "etcd1:2379")
-key string
Server or Client certificate key file (default "etcd_tls/server-key.pem")
-maxFailingMember int
The max number of ETCD servers can fail in your cluster
-maxRaftDrift int
The max drift the raft index can support (default 1)
-n Print cluster status in NAGIOS ready format
-u Print only unreachable nodes in NAGIOS ready format, it excludes raft check
It returns the status of the cluster depending on flags.
-n
returns the status of cluster in NAGIOS format. The RAFT index of all cluster's members are checked, all RAFT indexes must be in the +/- maxRaftDrift
interval.
-u
returns the status of cluster in NAGIOS format. The RAFT is not checked, it fails if the number of failing (not reached) members is more than maxFailingMember
.
It's useful to have an ETCD cluster to test the software. In this repo you'll find some useful (and very "stupid") scripts to run a dummy ETCD cluster with TLS on docker.
cluster_start.sh
: It's no more than a list of commands to initiate an ETCD cluster composed by 3 ETCD nodes, Note: it deletes the previous ETCD instance. Use it to spawn your clusternode_start.sh
: It's called bycluster_start.sh
to initiate the ETCD docker containersdelete_all_cluster_etcd.sh
: It's called bycluster_start.sh
to delete all previously spawned ETCD instancetest.sh
: It performs a cURL to your first etcd server via docker exported port and perform etcdctl cluster status to your first etcd1 .jumpin.sh
: I'm too lazy to write commands, it jumps in the first ETCD container, it's very dumb.
Please DO NOT USE the .sh scripts in production.