k8s.io/kubernetes@v1.31.0-alpha.0.0.20240520171757-56147500dadc/cluster/images/etcd-version-monitor/README.md (about) 1 # etcd-version-monitor 2 3 This is a tool for exporting etcd metrics and supplementing them with etcd 4 server binary version and cluster version. These metrics are in 5 prometheus format and can be scraped by a prometheus server. 6 The metrics are exposed at the http://localhost:9101/metrics endpoint. 7 8 For etcd 3.1+, the 9 [go-grpc-prometheus](https://github.com/grpc-ecosystem/go-grpc-prometheus) 10 metrics format, which backward incompatibly replaces the 3.0 legacy grpc metric 11 format, is exposed in both the 3.1 format and in the 3.0. This preserves 12 backward compatibility. 13 14 For etcd 3.1+, the `--metrics=extensive` must be set on etcd for grpc request 15 latency metrics (`etcd_grpc_unary_requests_duration_seconds`) to be exposed. 16 17 **RUNNING THE TOOL** 18 19 To run this tool as a docker container: 20 - make build 21 - docker run --net=host -i -t staging-k8s.gcr.io/etcd-version-monitor:0.1.3 /etcd-version-monitor 22 23 To run this as a pod on the kubernetes cluster: 24 - Place the 'etcd-version-monitor.yaml' in the manifests directory of 25 kubelet on the master machine. 26 27 *Note*: This tool has to run on the same machine as etcd, as communication 28 with etcd is over localhost. 29 30 **VERIFYING THE TOOL** 31 32 - Goto [http://localhost:9101/metrics](http://localhost:9101/metrics) in order to view the exported metrics. 33 - The metrics prefixed with "etcd_" are the ones of interest to us.