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:
|
Ports can be opened in the host machine's firewall with:
|
||||||
```sh
|
```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):
|
#### External (OPTIONAL):
|
||||||
@@ -48,13 +48,11 @@ ufw allow 27107/tcp
|
|||||||
|
|
||||||
4. Start the Docker containers:
|
4. Start the Docker containers:
|
||||||
```sh
|
```sh
|
||||||
docker compose up \
|
docker compose up --abort-on-container-exit
|
||||||
--pull always \
|
|
||||||
--abort-on-container-exit
|
|
||||||
```
|
```
|
||||||
or in detached mode:
|
or in detached mode:
|
||||||
```sh
|
```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.
|
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
|
interval: 5s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 5
|
retries: 5
|
||||||
|
pull_policy: always
|
||||||
network_mode: host
|
network_mode: host
|
||||||
|
|
||||||
telegraf:
|
telegraf:
|
||||||
@@ -30,6 +31,7 @@ services:
|
|||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 5
|
retries: 5
|
||||||
|
pull_policy: always
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
|
|
||||||
@@ -50,6 +52,7 @@ services:
|
|||||||
- "9092:9092"
|
- "9092:9092"
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "host.docker.internal:host-gateway"
|
- "host.docker.internal:host-gateway"
|
||||||
|
pull_policy: always
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
|
|
||||||
@@ -57,4 +60,4 @@ networks:
|
|||||||
backend:
|
backend:
|
||||||
ipam:
|
ipam:
|
||||||
config:
|
config:
|
||||||
- subnet: 172.30.0.0/16
|
- subnet: 172.100.0.0/16
|
||||||
|
@@ -92,10 +92,12 @@ class WebrtcInternalExporter {
|
|||||||
window.postMessage(
|
window.postMessage(
|
||||||
{
|
{
|
||||||
event: "webrtc-internal-exporter:peer-connection-stats",
|
event: "webrtc-internal-exporter:peer-connection-stats",
|
||||||
stats
|
stats: [stats]
|
||||||
},
|
},
|
||||||
stats
|
[stats]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
log(`Single stat collected:`, [stats]);
|
||||||
}
|
}
|
||||||
|
|
||||||
async collectAllStats() {
|
async collectAllStats() {
|
||||||
@@ -112,11 +114,12 @@ class WebrtcInternalExporter {
|
|||||||
window.postMessage(
|
window.postMessage(
|
||||||
{
|
{
|
||||||
event: "webrtc-internal-exporter:peer-connections-stats",
|
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);
|
setTimeout(this.collectAllStats.bind(this), this.updateInterval);
|
||||||
return stats;
|
return stats;
|
||||||
|
Reference in New Issue
Block a user