Compare commits
1 Commits
c19ecae493
...
6a7d4e922b
Author | SHA1 | Date | |
---|---|---|---|
6a7d4e922b |
61
README.md
Normal file
61
README.md
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
# PeerTube collector
|
||||||
|
|
||||||
|
peertube-collector is a project designed to collect and analyze WebRTC statistics from a Chromium browser and export them to a Prometheus PushGateway service. This project includes a Docker setup for running the necessary services.
|
||||||
|
|
||||||
|
## Project Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
peertube-collector/
|
||||||
|
├── README.md
|
||||||
|
├── requirements.txt
|
||||||
|
├── telegraf.conf
|
||||||
|
├── docker-compose.yml
|
||||||
|
├── Dockerfile
|
||||||
|
├── main.py
|
||||||
|
└── webrtc-internals-exporter/
|
||||||
|
├── manifest.json
|
||||||
|
├── options.html
|
||||||
|
├── popup.html
|
||||||
|
├── README.md
|
||||||
|
└── webrtc-internals-exporter.js
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- Docker
|
||||||
|
- Docker Compose
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
1. Clone the repository:
|
||||||
|
```sh
|
||||||
|
git clone <repository-url>
|
||||||
|
cd peertube-collector
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Build and start the Docker containers:
|
||||||
|
```sh
|
||||||
|
docker-compose up --build
|
||||||
|
```
|
||||||
|
|
||||||
|
## Components
|
||||||
|
|
||||||
|
### Docker Compose
|
||||||
|
|
||||||
|
The `docker-compose.yml` file defines the following services:
|
||||||
|
- **selenium**: Runs a Selenium standalone Chromium container.
|
||||||
|
- **telegraf**: Collects and sends metrics to the specified output.
|
||||||
|
- **collector**: Runs the main Python application to collect WebRTC stats.
|
||||||
|
|
||||||
|
### Dockerfile
|
||||||
|
|
||||||
|
The `Dockerfile` sets up the Python environment and installs the necessary dependencies to run the `main.py` script.
|
||||||
|
|
||||||
|
### Main Python Script
|
||||||
|
|
||||||
|
The `main.py` script sets up the Selenium WebDriver, collects WebRTC stats, and sends them to the Telegraf service.
|
||||||
|
|
||||||
|
### WebRTC Internals Exporter
|
||||||
|
|
||||||
|
The `webrtc-internals-exporter` directory contains a Chromium extension that collects WebRTC stats from the browser.
|
Reference in New Issue
Block a user