Add a README

This commit is contained in:
Diego Fernando Carrión 2024-10-19 15:53:50 +02:00
parent 1114af5f90
commit 1661a347f4
Signed by: CRThaze
GPG Key ID: 8279B79A1A7F8194

View File

@ -0,0 +1,40 @@
# Speedporter
A simple daemon that executes the [Ookla Speedtest CLI](https://www.speedtest.net/apps/cli)
and exposes the metrics via a Prometheus Exporter.
## Usage
The following environment variables can be used to configure the daemon:
| Name | Default | Description |
| --- | --- | --- |
| `SPEEDTEST_METRICS_LISTEN_PORT` | `9090` | Which port to bind to for serving metrics |
| `SPEEDTEST_METRICS_LISTEN_ADDR` | `0.0.0.0` | Which address to bind to for serving metrics |
| `SPEEDTEST_PERIOD_MINS` | `5` | How often to run the test |
| `SPEEDTEST_EXEC` | `/usr/bin/speedtest` | The Path to the Ookla Speedtest Executable |
## SystemD Daemon
Here's an example Unit File you can use for SystemD
```
[Unit]
Description=Speedtest Metrics Reporter
After=network.target
[Service]
Type=simple
ExecStart=/opt/speedporter/speedporter
Restart=always
RestartSec=10
Environment="SPEEDTEST_METRICS_LISTEN_PORT=9091"
[Install]
WantedBy=default.target
```
- Create this unit file in `/etc/systemd/system/speedporter.service`
- Then run: `systemd enable speedporter`
- And start it with: `systemd start speedporter`