Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Prometheus metrics #10

Merged
merged 7 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ RELAY_IP=0.0.0.0
EXTERNAL_RELAY_IP=167.235.241.140
```

Remember to use the `DOMAIN_NAME` variable specific to your deployment. It's used in e.g. `REALM` STUN attributes.
Remember to use the `DOMAIN` variable specific to your deployment. It's used in e.g. `REALM` STUN attributes.

```console
DOMAIN_NAME=my-amazing-turn.com
DOMAIN=my-amazing-turn.com
```

### Auth
Expand Down
2 changes: 1 addition & 1 deletion config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ config :rel,
relay_ip: relay_ip,
external_relay_ip: external_relay_ip,
listen_port: System.get_env("UDP_LISTEN_PORT", "3478") |> ConfigUtils.parse_port(),
domain_name: System.get_env("DOMAIN_NAME", "example.com")
domain: System.get_env("DOMAIN", "example.com")

# Metrics endpoint configuration
config :rel,
Expand Down
20 changes: 16 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
version: '3.2'
version: '3.8'
services:
turn:
rel:
image: ghcr.io/elixir-webrtc/rel:${TAG}
container_name: turn
container_name: rel
restart: on-failure
network_mode: host
environment:
DOMAIN: "${DOMAIN}"

node-exporter:
image: prom/node-exporter:v1.6.1
container_name: node_exporter
restart: on-failure
command:
- --path.rootfs=/host
network_mode: host
pid: host
volumes:
- /:/host:ro,rslave

prometheus:
image: prom/prometheus:v2.46.0
container_name: prometheus
Expand All @@ -21,7 +32,8 @@ services:
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus_data:/prometheus
depends_on:
- turn
- rel
- node-exporter

grafana:
image: grafana/grafana:10.0.3
Expand Down
Loading
Loading