diff --git a/.github/goreleaser.yml b/.github/goreleaser.yml index 591c9e41..be199f36 100644 --- a/.github/goreleaser.yml +++ b/.github/goreleaser.yml @@ -1,7 +1,8 @@ +version: 2 project_name: kvrocks-exporter release: github: - owner: KvrocksLabs + owner: RocksLabs name: kvrocks_exporter builds: @@ -13,32 +14,23 @@ builds: - "-X main.BuildCommitSha={{.Commit}}" goos: - linux + - windows + - darwin goarch: - amd64 - arm64 -dockers: - - id: kvrocks-exporter-docker-amd64 - goos: linux - goarch: amd64 - ids: - - kvrocks-exporter - image_templates: - - "kvrocks/kvrocks-exporter:v{{ .Version }}-amd64" - build_flag_templates: - - "--platform=linux/amd64" - use: buildx - - id: kvrocks-exporter-docker-arm64 - goos: linux - goarch: arm64 - ids: - - kvrocks-exporter - image_templates: - - "kvrocks/kvrocks-exporter:v{{ .Version }}-arm64" - build_flag_templates: - - "--platform=linux/arm64" - use: buildx -docker_manifests: - - name_template: kvrocks/kvrocks-exporter:v{{ .Version }} - image_templates: - - kvrocks/kvrocks-exporter:v{{ .Version }}-amd64 - - kvrocks/kvrocks-exporter:v{{ .Version }}-arm64 +kos: + - repository: docker.io/kvrocks/kvrocks-exporter + tags: + - "{{.Version}}" + - latest + preserve_import_paths: false + base_image: alpine:3.20 + bare: true + ldflags: + - "-X main.BuildVersion={{ .Version }}" + - "-X main.BuildDate={{.Date}}" + - "-X main.BuildCommitSha={{.Commit}}" + platforms: + - linux/amd64 + - linux/arm64 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f628989f..29493978 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: # We must fetch at least the immediate parents so that if this is # a pull request then we can checkout the head. @@ -27,7 +27,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v3 # Override language selection by uncommenting this and choosing your languages # with: # languages: go, javascript, csharp, python, cpp, java @@ -35,7 +35,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v3 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -49,4 +49,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/release-binaries-docker.yaml b/.github/workflows/release-binaries-docker.yaml new file mode 100644 index 00000000..59df57a2 --- /dev/null +++ b/.github/workflows/release-binaries-docker.yaml @@ -0,0 +1,75 @@ +name: goreleaser + +on: + pull_request: + push: + # run only against tags + tags: + - "*" + +permissions: + contents: write + packages: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: stable + + - name: Run GoReleaser for build + uses: goreleaser/goreleaser-action@v6 + if: success() && !startsWith(github.ref, 'refs/tags/') + with: + # either 'goreleaser' (default) or 'goreleaser-pro' + distribution: goreleaser + # 'latest', 'nightly', or a semver + version: "~> v2" + args: release --snapshot --clean -f ./.github/goreleaser.yml + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up Docker Buildx + if: success() && startsWith(github.ref, 'refs/tags/') + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub if publishing tag + if: success() && startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + if: success() && startsWith(github.ref, 'refs/tags/') + with: + # either 'goreleaser' (default) or 'goreleaser-pro' + distribution: goreleaser + # 'latest', 'nightly', or a semver + version: "~> v2" + args: release --clean -f ./.github/goreleaser.yml + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Docker Hub Description + uses: peter-evans/dockerhub-description@v4 + if: success() && startsWith(github.ref, 'refs/tags/') + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + repository: kvrocks/kvrocks-exporter + short-description: ${{ github.event.repository.description }} + + - name: Upload build results + uses: actions/upload-artifact@v4 + with: + name: kvrocks_exporter_artifacts_${{ github.run_number }} + path: dist/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 9e55ab26..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Release - -on: - push: - tags: - - "*" - -jobs: - release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v1 - - name: Login to Docker Hub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Release kvrocks-exporter - uses: goreleaser/goreleaser-action@v2 - with: - version: latest - args: release --rm-dist -f ./.github/goreleaser.yml - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index bbc322f0..ffb64c58 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ contrib/tls/ca.key contrib/tls/ca.txt contrib/tls/redis.crt contrib/tls/redis.key + +dist/ diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 541c32d0..00000000 --- a/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM alpine -COPY /kvrocks_exporter /kvrocks_exporter - -EXPOSE 9121 - -ENTRYPOINT [ "/kvrocks_exporter" ] diff --git a/Makefile b/Makefile index 15ac116d..f6e5a4cf 100644 --- a/Makefile +++ b/Makefile @@ -63,20 +63,12 @@ upload-coverage: go install github.com/mattn/goveralls@v0.0.11 /go/bin/goveralls -coverprofile=coverage.txt -service=drone.io +.PHONY: build +build: + go build . +.PHONY: release +release: + go install github.com/goreleaser/goreleaser/v2@latest -BUILD_DT:=$(shell date +%F-%T) -GO_LDFLAGS:="-s -w -extldflags \"-static\" -X main.BuildVersion=${DRONE_TAG} -X main.BuildCommitSha=${DRONE_COMMIT_SHA} -X main.BuildDate=$(BUILD_DT)" - -.PHONE: build-binaries -build-binaries: - go get github.com/oliver006/gox@master - - rm -rf .build | true - - export CGO_ENABLED=0 ; \ - gox -os="linux windows freebsd netbsd openbsd" -arch="amd64 386" -verbose -rebuild -ldflags $(GO_LDFLAGS) -output ".build/redis_exporter-${DRONE_TAG}.{{.OS}}-{{.Arch}}/{{.Dir}}" && \ - gox -os="darwin solaris illumos" -arch="amd64" -verbose -rebuild -ldflags $(GO_LDFLAGS) -output ".build/redis_exporter-${DRONE_TAG}.{{.OS}}-{{.Arch}}/{{.Dir}}" && \ - gox -os="linux freebsd netbsd" -arch="arm" -verbose -rebuild -ldflags $(GO_LDFLAGS) -output ".build/redis_exporter-${DRONE_TAG}.{{.OS}}-{{.Arch}}/{{.Dir}}" && \ - gox -os="linux" -arch="arm64 mips64 mips64le ppc64 ppc64le s390x" -verbose -rebuild -ldflags $(GO_LDFLAGS) -output ".build/redis_exporter-${DRONE_TAG}.{{.OS}}-{{.Arch}}/{{.Dir}}" && \ - echo "done" + goreleaser release --clean -f .github/goreleaser.yml diff --git a/README.md b/README.md index 42597491..34bcd2a4 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,69 @@ This is a fork of oliver006/redis_exporter to export the kvrocks metrics. ### Build and run locally ```sh -git clone https://github.com/KvrocksLabs/kvrocks_exporter.git +git clone https://github.com/RocksLabs/kvrocks_exporter.git cd kvrocks_exporter go build . ./kvrocks_exporter --version ``` +### Release + +All releases are done via Github Actions. To create a new release, create a new Release + Tag from master. +Actions will automatically add the release artifacts and publish new docker images to Docker hub. + +### Arguments + +These mostly match the redis exporter but with "redis" replaced with "kvrocks". Please note this includes the protocol version. + +``` +Usage of ./kvrocks_exporter: + -config-command string + What to use for the CONFIG command (default "CONFIG") + -connection-timeout string + Timeout for connection to Kvrocks instance (default "15s") + -debug + Output verbose debug information + -export-client-port + Whether to include the client's port when exporting the client list. Warning: including the port increases the number of metrics generated and will make your Prometheus server take up more memory + -include-system-metrics + Whether to include system metrics like e.g. kvrocks_total_system_memory_bytes + -is-cluster + Whether this is a Kvrocks cluster (Enable this if you need to fetch key level data on a Kvrocks Cluster). + -kvrocks.addr string + Address of the Kvrocks instance to scrape (default "kvrocks://localhost:6666") + -kvrocks.password string + Password of the Kvrocks instance to scrape + -kvrocks.password-file string + Password file of the Kvrocks instance to scrape + -log-format string + Log format, valid options are txt and json (default "txt") + -namespace string + Namespace for metrics (default "kvrocks") + -ping-on-connect + Whether to ping the Kvrocks instance after connecting + -set-client-name + Whether to set client name to kvrocks_exporter (default true) + -skip-tls-verification + Whether to to skip TLS verification + -tls-ca-cert-file string + Name of the CA certificate file (including full path) if the server requires TLS client authentication + -tls-client-cert-file string + Name of the client certificate file (including full path) if the server requires TLS client authentication + -tls-client-key-file string + Name of the client key file (including full path) if the server requires TLS client authentication + -tls-server-cert-file string + Name of the server certificate file (including full path) if the web interface and telemetry should use TLS + -tls-server-key-file string + Name of the server key file (including full path) if the web interface and telemetry should use TLS + -version + Show version information and exit + -web.listen-address string + Address to listen on for web interface and telemetry. (default ":9121") + -web.telemetry-path string + Path under which to expose metrics. (default "/metrics") +``` + ### Basic Prometheus Configuration Add a block to the `scrape_configs` of your prometheus.yml config file: diff --git a/exporter/exporter.go b/exporter/exporter.go index 09bd48e7..12d7a1dd 100644 --- a/exporter/exporter.go +++ b/exporter/exporter.go @@ -104,7 +104,6 @@ func NewKvrocksExporter(kvrocksURI string, opts Options) (*Exporter, error) { "monitor_clients": "monitor_clients", // # Memory - "used_memory": "memory_used_bytes", "used_memory_rss": "memory_used_rss_bytes", "used_memory_lua": "memory_used_lua_bytes", @@ -115,6 +114,8 @@ func NewKvrocksExporter(kvrocksURI string, opts Options) (*Exporter, error) { // # Stats "pubsub_channels": "pubsub_channels", "pubsub_patterns": "pubsub_patterns", + "keyspace_hits": "keyspace_hits", + "keyspace_misses": "keyspace_misses", // # Replication "connected_slaves": "connected_slaves", @@ -186,6 +187,7 @@ func NewKvrocksExporter(kvrocksURI string, opts Options) (*Exporter, error) { "db_avg_ttl_seconds": {txt: "Avg TTL in seconds", lbls: []string{"db"}}, "db_keys": {txt: "Total number of keys by DB", lbls: []string{"db"}}, "db_keys_expiring": {txt: "Total number of expiring keys by DB", lbls: []string{"db"}}, + "db_keys_expired": {txt: "Total number of expired keys by DB", lbls: []string{"db"}}, "exporter_last_scrape_error": {txt: "The last scrape error status.", lbls: []string{"err"}}, "instance_info": {txt: "Information about the kvrocks instance", lbls: []string{"role", "version", "git_sha1", "os", "tcp_port", "gcc_version", "process_id"}}, "last_slow_execution_duration_seconds": {txt: `The amount of time needed for last slow execution, in seconds`}, diff --git a/exporter/info.go b/exporter/info.go index b4105674..865c9caa 100644 --- a/exporter/info.go +++ b/exporter/info.go @@ -36,7 +36,7 @@ func (e *Exporter) extractInfoMetrics(ch chan<- prometheus.Metric, info string, line = strings.TrimSpace(line) log.Debugf("info: %s", line) if len(line) > 0 && strings.HasPrefix(line, "# ") { - if strings.HasPrefix(line, "# Last scan db time") { + if strings.HasPrefix(line, "# Last DBSIZE SCAN") { continue } fieldClass = line[2:] @@ -77,11 +77,12 @@ func (e *Exporter) extractInfoMetrics(ch chan<- prometheus.Metric, info string, continue case "Keyspace": - if keysTotal, keysEx, avgTTL, ok := parseDBKeyspaceString(fieldKey, fieldValue); ok { + if keysTotal, keysEx, avgTTL, keysExpired, ok := parseDBKeyspaceString(fieldKey, fieldValue); ok { dbName := fieldKey e.registerConstMetricGauge(ch, "db_keys", keysTotal, dbName) e.registerConstMetricGauge(ch, "db_keys_expiring", keysEx, dbName) + e.registerConstMetricGauge(ch, "db_keys_expired", keysExpired, dbName) if avgTTL > -1 { e.registerConstMetricGauge(ch, "db_avg_ttl_seconds", avgTTL, dbName) @@ -105,6 +106,7 @@ func (e *Exporter) extractInfoMetrics(ch chan<- prometheus.Metric, info string, if _, exists := handledDBs[dbName]; !exists { e.registerConstMetricGauge(ch, "db_keys", 0, dbName) e.registerConstMetricGauge(ch, "db_keys_expiring", 0, dbName) + e.registerConstMetricGauge(ch, "db_keys_expired", 0, dbName) } } @@ -127,9 +129,11 @@ func (e *Exporter) extractInfoMetrics(ch chan<- prometheus.Metric, info string, } /* - valid example: db0:keys=1,expires=0,avg_ttl=0 +valid examples: + - db0:keys=1,expires=0,avg_ttl=0 + - db0:keys=1,expires=10,avg_ttl=0,expired=2 */ -func parseDBKeyspaceString(inputKey string, inputVal string) (keysTotal float64, keysExpiringTotal float64, avgTTL float64, ok bool) { +func parseDBKeyspaceString(inputKey string, inputVal string) (keysTotal float64, keysExpiringTotal float64, avgTTL float64, keysExpiredTotal float64, ok bool) { log.Debugf("parseDBKeyspaceString inputKey: [%s] inputVal: [%s]", inputKey, inputVal) if !strings.HasPrefix(inputKey, "db") { @@ -138,7 +142,7 @@ func parseDBKeyspaceString(inputKey string, inputVal string) (keysTotal float64, } split := strings.Split(inputVal, ",") - if len(split) != 4 { + if len(split) < 2 || len(split) > 4 { log.Debugf("parseDBKeyspaceString strings.Split(inputVal) invalid: %#v", split) return } @@ -162,13 +166,21 @@ func parseDBKeyspaceString(inputKey string, inputVal string) (keysTotal float64, avgTTL /= 1000 } + keysExpiredTotal = 0 + if len(split) > 3 { + if keysExpiredTotal, err = extractVal(split[3]); err != nil { + log.Debugf("parseDBKeyspaceString extractVal(split[3]) invalid, err: %s", err) + return + } + } + ok = true return } /* - slave0:ip=10.254.11.1,port=6379,state=online,offset=1751844676,lag=0 - slave1:ip=10.254.11.2,port=6379,state=online,offset=1751844222,lag=0 +slave0:ip=10.254.11.1,port=6379,state=online,offset=1751844676,lag=0 +slave1:ip=10.254.11.2,port=6379,state=online,offset=1751844222,lag=0 */ func parseConnectedSlaveString(slaveName string, keyValues string) (offset float64, ip string, port string, state string, lag float64, ok bool) { ok = false @@ -249,13 +261,25 @@ func (e *Exporter) handleMetricsReplication(ch chan<- prometheus.Metric, masterH } func (e *Exporter) handleMetricsRocksDB(ch chan<- prometheus.Metric, fieldKey string, fieldValue string) { + sharedMetric := []string{"block_cache_usage"} + for _, field := range sharedMetric { + // format like `block_cache_usage:0` + if strings.Compare(fieldKey, field) == 0 { + if statValue, err := strconv.ParseFloat(fieldValue, 64); err == nil { + e.registerConstMetricGauge(ch, fieldKey, statValue, "-") + } + // return ASAP + return + } + } + prefixs := []string{ "block_cache_usage", "block_cache_pinned_usage", "index_and_filter_cache_usage", "estimate_keys", "level0_file_limit_slowdown", "level0_file_limit_stop", "pending_compaction_bytes_slowdown", "pending_compaction_bytes_stop", "memtable_count_limit_slowdown", "memtable_count_limit_stop", } for _, prefix := range prefixs { - // format like `block_cache_usage[default]:0` + // format like `estimate_keys[default]:0` if strings.HasPrefix(fieldKey, prefix) { fields := strings.Split(fieldKey, "[") if len(fields) != 2 { @@ -266,6 +290,7 @@ func (e *Exporter) handleMetricsRocksDB(ch chan<- prometheus.Metric, fieldKey st if statValue, err := strconv.ParseFloat(fieldValue, 64); err == nil { e.registerConstMetricGauge(ch, metricName, statValue, columnFamily) } + return } } } diff --git a/exporter/info_test.go b/exporter/info_test.go index 653ec748..526bb7ca 100644 --- a/exporter/info_test.go +++ b/exporter/info_test.go @@ -14,10 +14,10 @@ import ( func TestKeyspaceStringParser(t *testing.T) { tsts := []struct { - db string - stats string - keysTotal, keysEx, avgTTL float64 - ok bool + db string + stats string + keysTotal, keysEx, avgTTL, keysExpired float64 + ok bool }{ {db: "xxx", stats: "", ok: false}, {db: "xxx", stats: "keys=1,expires=0,avg_ttl=0", ok: false}, @@ -28,20 +28,20 @@ func TestKeyspaceStringParser(t *testing.T) { {db: "db3", stats: "keys=abcde,expires=0", ok: false}, {db: "db3", stats: "keys=213,expires=xxx", ok: false}, {db: "db3", stats: "keys=123,expires=0,avg_ttl=zzz", ok: false}, - - {db: "db0", stats: "keys=1,expires=0,avg_ttl=0", keysTotal: 1, keysEx: 0, avgTTL: 0, ok: true}, + {db: "db0", stats: "keys=22113592,expires=21683101,avg_ttl=3816396,expired=340250", keysTotal: 22113592, keysEx: 21683101, avgTTL: 3816.396, keysExpired: 340250, ok: true}, + {db: "db0", stats: "keys=1,expires=0,avg_ttl=0", keysTotal: 1, keysEx: 0, avgTTL: 0, keysExpired: 0, ok: true}, } for _, tst := range tsts { - if kt, kx, ttl, ok := parseDBKeyspaceString(tst.db, tst.stats); true { + if kt, kx, ttl, kexp, ok := parseDBKeyspaceString(tst.db, tst.stats); true { if ok != tst.ok { t.Errorf("failed for: db:%s stats:%s", tst.db, tst.stats) continue } - if ok && (kt != tst.keysTotal || kx != tst.keysEx || ttl != tst.avgTTL) { - t.Errorf("values not matching, db:%s stats:%s %f %f %f", tst.db, tst.stats, kt, kx, ttl) + if ok && (kt != tst.keysTotal || kx != tst.keysEx || ttl != tst.avgTTL || kexp != tst.keysExpired) { + t.Errorf("values not matching, db:%s stats:%s %f %f %f", tst.db, tst.stats, kt, kx, ttl, kexp) } } } diff --git a/go.mod b/go.mod index 7ffed041..9a1b0e3b 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,12 @@ -module github.com/KvrocksLabs/kvrocks_exporter +module github.com/RocksLabs/kvrocks_exporter -go 1.20 +go 1.21 + +toolchain go1.23.1 require ( github.com/gomodule/redigo v1.9.2 - github.com/prometheus/client_golang v1.20.2 + github.com/prometheus/client_golang v1.20.5 github.com/prometheus/client_model v0.6.1 github.com/sirupsen/logrus v1.9.3 ) @@ -12,10 +14,10 @@ require ( require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/klauspost/compress v1.17.9 // indirect + github.com/klauspost/compress v1.17.11 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/common v0.60.1 // indirect github.com/prometheus/procfs v0.15.1 // indirect - golang.org/x/sys v0.24.0 // indirect - google.golang.org/protobuf v1.34.2 // indirect + golang.org/x/sys v0.26.0 // indirect + google.golang.org/protobuf v1.35.1 // indirect ) diff --git a/go.sum b/go.sum index 95f70269..00525bd4 100644 --- a/go.sum +++ b/go.sum @@ -8,19 +8,23 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/gomodule/redigo v1.9.2 h1:HrutZBLhSIU8abiSfW8pj8mPhOyMYjZT/wcA4/L9L9s= github.com/gomodule/redigo v1.9.2/go.mod h1:KsU3hiK/Ay8U42qpaJk+kuNa3C+spxapWpM+ywhcgtw= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= -github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= +github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.20.2 h1:5ctymQzZlyOON1666svgwn3s6IKWgfbjsejTMiXIyjg= -github.com/prometheus/client_golang v1.20.2/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= +github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= -github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= +github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= +github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPAaSc= +github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= @@ -28,11 +32,13 @@ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= -golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/main.go b/main.go index cbcd9ed8..0793a096 100644 --- a/main.go +++ b/main.go @@ -9,7 +9,7 @@ import ( "strconv" "time" - "github.com/KvrocksLabs/kvrocks_exporter/exporter" + "github.com/RocksLabs/kvrocks_exporter/exporter" "github.com/prometheus/client_golang/prometheus" log "github.com/sirupsen/logrus" )