Improve README format

This commit is contained in:
Diego Fernando Carrión 2024-10-20 14:50:29 +02:00
parent 4ad2495de0
commit c407f5c011
Signed by: CRThaze
GPG Key ID: 8279B79A1A7F8194

View File

@ -3,6 +3,17 @@
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 |
## Dependencies
Install the [Ookla Speedtest CLI](https://www.speedtest.net/apps/cli)
@ -16,23 +27,12 @@ Install the [Ookla Speedtest CLI](https://www.speedtest.net/apps/cli)
- `git clone https://git.sdf.org/CRThaze/speedporter`
- `cd speedporter`
- `go build`
- Copy `speedporter` executable to the desired installation location. Perhaps:
- Copy `speedporter` executable to the desired installation location. Perhaps one of:
- `/usr/local/bin`
- `/opt/speedporter`
- `~/.local/bin`
## 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
### SystemD Daemon
Here's an example Unit File you can use for SystemD