Skip to content

Commit

Permalink
Merge pull request #1 from gree/gree
Browse files Browse the repository at this point in the history
Setup CI
  • Loading branch information
komazarari authored Sep 12, 2022
2 parents a986ae3 + 4805aa1 commit 2a9d9cf
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ 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"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--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"
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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=<memcached_addr:port>` 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=<memcached_addr:port>` parameter like [redis_exporter](https://github.com/oliver006/redis_exporter#prometheus-configuration-to-scrape-multiple-redis-hosts).

An example with `static_configs` is here:
```
Expand Down

0 comments on commit 2a9d9cf

Please sign in to comment.