etcd/tools/etcd-dump-metrics
Jes Cok 2415c826c2 all: simplify and clean up
This patch modernizes the for-range-loop code to copy a map with
"maps.Clone" and "maps.Copy", also eliminates "copyFloats" with
"slices.Clone".

Also simplify "aggSort" and "sortMap" with slices and maps functions.

Signed-off-by: Jes Cok <xigua67damn@gmail.com>
2025-01-08 21:35:32 +08:00
..
etcd.go *: enable goimports in verify-lint 2023-09-21 21:14:09 +08:00
install_darwin.go chore: delete // +build buildtag by go fix 2022-12-29 14:17:05 +08:00
install_linux.go chore: delete // +build buildtag by go fix 2022-12-29 14:17:05 +08:00
install_windows.go chore: delete // +build buildtag by go fix 2022-12-29 14:17:05 +08:00
main.go *: enable goimports in verify-lint 2023-09-21 21:14:09 +08:00
metrics.go fix: enable gofmt and whitespace linters 2024-10-11 07:03:18 +02:00
OWNERS Automate labels for tools pull requests. 2024-05-12 22:27:19 +12:00
README.md Doc: add installtion instructions for tools 2022-04-28 01:13:02 -04:00
utils.go all: simplify and clean up 2025-01-08 21:35:32 +08:00

etcd-dump-metrics

etcd-dump-metrics provides metrics for the latest main branch, a given endpoint, or version.

Installation

Install the tool by running the following command from the etcd source directory.

  $ go install -v ./tools/etcd-dump-metrics

The installation will place executables in the $GOPATH/bin. If $GOPATH environment variable is not set, the tool will be installed into the $HOME/go/bin. You can also find out the installed location by running the following command from the etcd source directory. Make sure that $PATH is set accordingly in your environment.

  $ go list -f "{{.Target}}" ./tools/etcd-dump-metrics

Alternatively, instead of installing the tool, you can use it by simply running the following command from the etcd source directory.

  $ go run ./tools/etcd-dump-metrics

Usage

The following command should output the usage per the latest development.

  $ etcd-dump-metrics --help

An example of usage detail is provided below.

For the latest main branch

  $ etcd-dump-metrics

For the provided endpoint

  $ goreman start
  $ etcd-dump-metrics --addr http://localhost:2379/metrics

Download specific version to temporary directory to fetch metrics

  $ etcd-dump-metrics --debug --download-ver v3.5.3
  $ etcd-dump-metrics --download-ver v3.5.3