mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-04 17:21:23 -07:00
docs: update speedtest setup instructions for native engine
This commit is contained in:
@@ -6,20 +6,30 @@ A plugin allowing for executing regular internet speed tests.
|
|||||||
|
|
||||||
This plugin supports two engines:
|
This plugin supports two engines:
|
||||||
1. **Baseline Engine**: Uses the Python `speedtest-cli` library (default).
|
1. **Baseline Engine**: Uses the Python `speedtest-cli` library (default).
|
||||||
2. **Native Engine (Optimized)**: Uses the native Ookla Speedtest binary.
|
2. **Native Engine (Optimized)**: Uses the official native Ookla Speedtest binary.
|
||||||
|
|
||||||
#### Opt-in for Native Engine
|
#### Opt-in for Native Engine
|
||||||
To use the native engine:
|
To use the native engine, you must provide the official binary to the container. The native binary is **strongly recommended** for internet connections > 100 Mbps to ensure CPU bottlenecks don't affect your results.
|
||||||
- Provide the native `speedtest` binary in your environment: [Speedtest CLI Homepage](https://www.speedtest.net/apps/cli)
|
|
||||||
- Map the binary to `/usr/bin/speedtest` in the container.
|
**Setup Instructions:**
|
||||||
- **Ensure the native speedtest binary is installed on the host at the source path.**
|
1. **Download:** Get the official binary for your architecture from the [Speedtest CLI Homepage](https://www.speedtest.net/apps/cli).
|
||||||
|
2. **Place & Prepare:** Place the binary on your host machine (e.g., in `/opt/netalertx/`) and ensure it has executable permissions:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
chmod +x /opt/netalertx/speedtest
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Docker Mapping: Map the host file to exactly `/usr/bin/speedtest` inside the container via your `docker-compose.yml`:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
volumes:
|
services:
|
||||||
- /usr/bin/speedtest:/usr/bin/speedtest:ro
|
netalertx:
|
||||||
|
volumes:
|
||||||
|
- /opt/netalertx/speedtest:/usr/bin/speedtest:ro
|
||||||
```
|
```
|
||||||
- The plugin will automatically detect and use it for subsequent tests.
|
|
||||||
|
|
||||||
|
### Why this mapping?
|
||||||
|
Inside the container, a Python version of speedtest often exists in the virtual environment (`/opt/venv/bin/speedtest`). Mapping your native binary specifically to `/usr/bin/speedtest` allows the plugin to prioritize the high-performance native engine over the baseline library.
|
||||||
|
|
||||||
### Data Mapping
|
### Data Mapping
|
||||||
|
|
||||||
@@ -30,4 +40,4 @@ volumes:
|
|||||||
### Notes
|
### Notes
|
||||||
|
|
||||||
- The native binary is recommended for connections > 100 Mbps.
|
- The native binary is recommended for connections > 100 Mbps.
|
||||||
- If the native binary is not detected, the plugin seamlessly falls back to the baseline library.
|
- If the native binary is not detected at /usr/bin/speedtest, or if it fails to execute, the plugin will seamlessly fall back to the baseline Python library.
|
||||||
Reference in New Issue
Block a user