Publish prometheus metrics into NATS
This tool is only compliant with prometheus 2.0 instances as it uses remote write feature to collect timeseries from prometheus. The nats client used in this project is the vanilla one
You just have to pull visheyra/prometheus-nats-gateway
- Clone this repo in the
${GOPATH}/src/github.com/visheyra/prometheus-nats-gateway
directory - Download the dep tool
- go in the
src
folder of this repo - run
go dep ensure
- run go install github.com/visheyra/prometheus-nats-exporter
- the binary will be in
${GOPATH}/bin
tool that listen prometheus 2.0 events translate them to json, then publish them to nats
Usage:
png [command]
Available Commands:
help Help about any command
start Start the tool
Flags:
-f, --forward string address of the remote nats endpoint (default "http://localhost:4222")
-h, --help help for png
-l, --listen string listen address of the prometheus receiver endpoint (default ":8080")
Use "png [command] --help" for more information about a command.
Type | Support | Description |
---|---|---|
certificates | no | not implemented |
user creds | partial | only when supplied in the URI (eg: nats://user:pass@server:port) |
plain (no auth) | yes | - |
- Support user sefined NATS subject
- Support authentication methods (current implementation support only plain connections)
- Add a /metrics endpoint for telemetry