From 4805aa169ddca043a21287d5c9e71c6328f5f4da Mon Sep 17 00:00:00 2001 From: Takuto Komazaki Date: Mon, 12 Sep 2022 08:13:57 +0000 Subject: [PATCH] setup CI --- .goreleaser.yaml | 6 +++--- README.md | 23 +++++++++++++++++++---- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 2788288..d6df6c8 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -43,8 +43,8 @@ dockers: - goos: linux goarch: amd64 image_templates: - - 'ghcr.io/gree-main/{{ .ProjectName }}:{{ .Version }}' - - 'ghcr.io/gree-main/{{ .ProjectName }}:latest' + - 'ghcr.io/gree/{{ .ProjectName }}:{{ .Version }}' + - 'ghcr.io/gree/{{ .ProjectName }}:latest' build_flag_templates: - "--pull" @@ -52,5 +52,5 @@ dockers: - "--label=org.opencontainers.image.title={{.ProjectName}}" - "--label=org.opencontainers.image.revision={{.FullCommit}}" - "--label=org.opencontainers.image.version={{.Version}}" - - "--label=org.opencontainers.image.source=https://github.com/gree-main/{{ .ProjectName }}" + - "--label=org.opencontainers.image.source=https://github.com/gree/{{ .ProjectName }}" - "--platform=linux/arm64" diff --git a/README.md b/README.md index 4c53554..d159b71 100644 --- a/README.md +++ b/README.md @@ -15,13 +15,28 @@ Superexporter dynamically forks exporters for requested targets and acts as a HT \_ /path/to/memcached_exporter --memcached.address memcached-host-c:11211 --web.listen-address localhost:46123 ``` -## Building and running -### Prerequisite +## Running the exporter +### Docker image +``` +docker run -p 9150:9150 ghcr.io/gree/superexporter:latest +``` + +To verify: +``` +curl 'localhost:9150/scrape?target=your-memcached-host:11211' +``` + +### Pre-built binary + +Pre-built binary is available at [the releases](https://github.com/gree/superexporter/releases). + +### Build from source +#### Prerequisite The superexporter needs the memcached_exporter executable in PATH. You can find the released binaries on https://github.com/prometheus/memcached_exporter/releases. -### Run locally +#### Build and run ``` $ which memcached_exporter /some/path/to/memcached_exporter @@ -36,7 +51,7 @@ curl 'localhost:9150/scrape?target=your-memcached-host:11211' ``` ### Prometheus configuration for multiple memcached hosts -Use `GET superexporter-host:9150/scrape` endpoint with `target=` parameter like [redis_exporter](https://github.com/oliver006/redis_exporter#prometheus-configuration-to-scrape-multiple-redis-hosts). +Use `GET superexporter-host:9150/scrape` endpoint with `target=` parameter like [redis_exporter](https://github.com/oliver006/redis_exporter#prometheus-configuration-to-scrape-multiple-redis-hosts). An example with `static_configs` is here: ```