docs: simplify Docker commands in README and enhance logging in WebRTC stats exporter
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m16s
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m16s
This commit is contained in:
@@ -15,7 +15,7 @@ peertube-collector is a project designed to collect and analyze WebRTC statistic
|
||||
|
||||
Ports can be opened in the host machine's firewall with:
|
||||
```sh
|
||||
ufw allow from 172.30.0.0/16 to any port 4444
|
||||
ufw allow from 172.100.0.0/16 to any port 4444
|
||||
```
|
||||
|
||||
#### External (OPTIONAL):
|
||||
@@ -48,13 +48,11 @@ ufw allow 27107/tcp
|
||||
|
||||
4. Start the Docker containers:
|
||||
```sh
|
||||
docker compose up \
|
||||
--pull always \
|
||||
--abort-on-container-exit
|
||||
docker compose up --abort-on-container-exit
|
||||
```
|
||||
or in detached mode:
|
||||
```sh
|
||||
docker compose up --pull always -d
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
The collector will start gathering WebRTC stats from the Selenium container and sending them to the Telegraf service.
|
||||
|
@@ -14,6 +14,7 @@ services:
|
||||
interval: 5s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
pull_policy: always
|
||||
network_mode: host
|
||||
|
||||
telegraf:
|
||||
@@ -30,6 +31,7 @@ services:
|
||||
interval: 5s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
pull_policy: always
|
||||
networks:
|
||||
- backend
|
||||
|
||||
@@ -50,6 +52,7 @@ services:
|
||||
- "9092:9092"
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
pull_policy: always
|
||||
networks:
|
||||
- backend
|
||||
|
||||
@@ -57,4 +60,4 @@ networks:
|
||||
backend:
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 172.30.0.0/16
|
||||
- subnet: 172.100.0.0/16
|
||||
|
@@ -92,10 +92,12 @@ class WebrtcInternalExporter {
|
||||
window.postMessage(
|
||||
{
|
||||
event: "webrtc-internal-exporter:peer-connection-stats",
|
||||
stats
|
||||
stats: [stats]
|
||||
},
|
||||
stats
|
||||
[stats]
|
||||
);
|
||||
|
||||
log(`Single stat collected:`, [stats]);
|
||||
}
|
||||
|
||||
async collectAllStats() {
|
||||
@@ -112,11 +114,12 @@ class WebrtcInternalExporter {
|
||||
window.postMessage(
|
||||
{
|
||||
event: "webrtc-internal-exporter:peer-connections-stats",
|
||||
data: JSON.parse(JSON.stringify(stats)),
|
||||
data: stats
|
||||
},
|
||||
stats
|
||||
);
|
||||
|
||||
log(`Stats collected:`, JSON.parse(JSON.stringify(stats)));
|
||||
log(`Stats collected:`, stats);
|
||||
|
||||
setTimeout(this.collectAllStats.bind(this), this.updateInterval);
|
||||
return stats;
|
||||
|
Reference in New Issue
Block a user