Enable prometheus by default, update README

This commit is contained in:
Joakim Frostegård 2023-02-26 12:10:12 +01:00
parent 9e7e56b082
commit 07eac06a36
4 changed files with 15 additions and 9 deletions

View file

@ -125,17 +125,11 @@ in emitting of an info-level log message.
#### Prometheus
`aquatic_http` and `aquatic_ws` support exporting [Prometheus](https://prometheus.io/) metrics.
Exporting [Prometheus](https://prometheus.io/) metrics is supported.
Pass the `prometheus` feature when building:
To use, activate the prometheus endpoint in the configuration file:
```sh
. ./scripts/env-native-cpu-without-avx-512
cargo build --release -p aquatic_ws --features "prometheus"
cargo build --release -p aquatic_http --features "prometheus"
```
Then activate the prometheus endpoint in the configuration file:
##### aquatic_http and aquatic_ws
```toml
[metrics]
@ -143,6 +137,15 @@ run_prometheus_endpoint = true
prometheus_endpoint_address = "0.0.0.0:9000"
```
##### aquatic_udp
```toml
[statistics]
interval = 5
run_prometheus_endpoint = true
prometheus_endpoint_address = "0.0.0.0:9000"
```
### Running
If you're running `aquatic_http` or `aquatic_ws`, please make sure locked memory