diff --git a/Cargo.toml b/Cargo.toml index f57b644..f930bb3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "livebox-exporter-rs" -version = "0.1.1" +version = "0.1.2" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/README.md b/README.md index a8e303a..47b581a 100644 --- a/README.md +++ b/README.md @@ -27,10 +27,10 @@ Available: - **Should work** on livebox 4 and upper 🤷🏻‍ - **Extracts metrics:** general status, wan configuration, devices status, bandwidth - **Exposes metrics:** in Prometheus format, compatible with Grafana +- **Docker image:** [tchapacan/livebox-exporter-rs:latest](https://hub.docker.com/r/tchapacan/livebox-exporter-rs) Future: -- *Docker image soon available...* - *Grafana dashboard template soon available...* - *More metrics...* @@ -51,7 +51,26 @@ Future: ## Usage -To use **livebox-exporter-rs**, follow these steps: +### Docker + +1. **Pull latest docker image:** to your local machine. + + ```bash + docker pull tchapacan/livebox-exporter-rs:latest + ``` + +2. **Run the Exporter:** run the docker images, using the options. + + ```bash + docker run -d --name livebox-exporter-rs -h livebox-exporter-rs -p : tchapacan/livebox-exporter-rs:latest --password --port + ``` + +3. **Access Metrics:** Once the exporter is running, access the exposed metrics at: + + `http://localhost:/metrics` + + +### Sources 1. **Clone the Repository:** to your local machine. @@ -86,6 +105,7 @@ Supported command-line options (hope `-P` vs `-p` not to confusing): | -P, --password | Livebox password **(required)** | None | | -p, --port | Exporter port | 9100 | | -l, --listen
| Listen address | 0.0.0.0 | +| -G, --gateway
| Livebox gateway ip address | 192.168.1.1 | | -v, --verbose | Enable verbose logging (repeat for increased verbosity) | Off | | -h, --help | Display help message | N/A | @@ -97,6 +117,7 @@ Options: -l, --listen
listen address [default: 0.0.0.0] -v, --verbose... verbose logging -P, --password Livebox password [required] + -G, --gateway Livebox gateway ip address [default: 192.168.1.1] -h, --help Print help -V, --version Print version ``` diff --git a/src/main.rs b/src/main.rs index dfab73a..c89ad34 100644 --- a/src/main.rs +++ b/src/main.rs @@ -383,7 +383,7 @@ mod tests { "-P", "mypassword", "-G", - "192.168.1.10" + "192.168.1.10", ]; let matches = parse_args(args); assert_eq!(