Update readme.md

main
"Riku" 2025-01-21 13:50:34 +02:00
parent bd2f1e59fa
commit c7fca21c94
1 changed files with 30 additions and 3 deletions

View File

@ -2,14 +2,41 @@
## Getting started
One can just run the provided python script by `python3 zte_exporter.py --port <port> <router ip> --username <admin username> <admin password> --device <device type, ie. mc7010>`
One can just run the provided python script by `python3 zte_exporter.py <ip address> <password>`
The script accepts following options
- --port <port>
- --username <admin username>
- --device <device type>
- --reset yes/anything
Port tells on what port the HTTP server will serve the metrics. Path to the metrics is just /
Username is the username used with the device. This defaults to admin. If device type is set to MC7010 which doesn't use username, it'll be ignored. On MC889A just use default (generic)
## TR069 reset?
You can safely ignore everything else, and just use the script with --reset to clear out TR069 configuration. Just run `python3 <ip> <password> --reset yes` and follow the output. If it quietly fails, take a look at the code and check --device options.
## Docker?
A docker file is provided to compile this and example compose.yml to use in compose tools. To use with docker run, just create .env with the correct values. dockerhub vvkvvk/zte-exporter has the outdated version of this available and should not be used. A compose.yml file is provided as example.
## TR069 reset
## Prometheus configuration
A simple scrape config will suffice. Scrape interval will dicatete how often data is fetch.
```
- job_name: 'zte'
static_configs:
- targets: ['localhost:port']
labels:
instance: '5g'
```
## Dashboard
Is provided with the dashboard.json. It should just work.
Passing --reset True will try to clear out TR069 config and display current config.
## Running via systemd