Skip to content

Commit

Permalink
update readme (add gateway arg)
Browse files Browse the repository at this point in the history
  • Loading branch information
tchapacan authored and drkaine committed Apr 8, 2024
1 parent 857f67b commit 9f9fe92
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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...*

Expand All @@ -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 <exporter_port>:<exporter_port> tchapacan/livebox-exporter-rs:latest --password <livebox_password> --port <exporter_port>
```

3. **Access Metrics:** Once the exporter is running, access the exposed metrics at:

`http://localhost:<exporter_port>/metrics`


### Sources

1. **Clone the Repository:** to your local machine.

Expand Down Expand Up @@ -86,6 +105,7 @@ Supported command-line options (hope `-P` vs `-p` not to confusing):
| -P, --password <password> | Livebox password **(required)** | None |
| -p, --port <port> | Exporter port | 9100 |
| -l, --listen <address> | Listen address | 0.0.0.0 |
| -G, --gateway <address> | 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 |

Expand All @@ -97,6 +117,7 @@ Options:
-l, --listen <address> listen address [default: 0.0.0.0]
-v, --verbose... verbose logging
-P, --password <password> Livebox password [required]
-G, --gateway <gateway> Livebox gateway ip address [default: 192.168.1.1]
-h, --help Print help
-V, --version Print version
```
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ mod tests {
"-P",
"mypassword",
"-G",
"192.168.1.10"
"192.168.1.10",
];
let matches = parse_args(args);
assert_eq!(
Expand Down

0 comments on commit 9f9fe92

Please sign in to comment.