Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sunsided committed Mar 6, 2023
1 parent 17615b1 commit 1e77649
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
# Prometheus gRPC Bridge

A Prometheus metrics endpoint bridging data from a gRPC service,
A Prometheus `/metrics` endpoint bridging data from a gRPC service,
for when you cannot host gRPC and HTTP at the same time.

## HTTP /metrics endpoint

When running the service using Docker, provide the `GRPC_SERVER_CONNECT_ADDRESS`
environment variable with the host and port combination of the gRPC server to addess:

```shell
docker run --rm \
--env GRPC_SERVER_CONNECT_ADDRESS="example:11000" \
--publish 80:80 \
nyris/prometheus-grpc-bridge:0.1.0
```

You can optionally provide `GRPC_SERVER_CONNECT_SCHEME` as well, this defaults to `http`.

The server supports both HTTP/1.1 and HTTP/2 transparently without
requiring a secure connection to perform ALPN.

Expand All @@ -15,7 +27,9 @@ both the bridge and an example server by running:
docker compose up
```

To instead host the service locally, run e.g.
## Testing locally

To host the service locally, run e.g.

```shell
cargo run -- --serve 0.0.0.0:8080
Expand Down

0 comments on commit 1e77649

Please sign in to comment.