Add a README
This commit is contained in:
parent
1114af5f90
commit
1661a347f4
40
README.md
40
README.md
@ -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`
|
||||
|
Loading…
Reference in New Issue
Block a user