simple exporter service for zte 5G modems
 
 
Go to file
"Riku" c7fca21c94 Update readme.md 2025-01-21 13:50:34 +02:00
Dockerfile update dockerfile 2025-01-21 13:42:13 +02:00
compose.yml Update compose.yml 2025-01-21 13:42:49 +02:00
grafana.json Latest and greatest dash 2025-01-21 13:40:35 +02:00
readme.md Update readme.md 2025-01-21 13:50:34 +02:00
zte_exporter.py fixes for logics 2025-01-21 13:00:36 +02:00

readme.md

Grafana exporter for ZTE 5G modems

Getting started

One can just run the provided python script by python3 zte_exporter.py <ip address> <password>

The script accepts following options

  • --port
  • --username
  • --device
  • --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.

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.

Running via systemd

Create a systemd unit file to /etc/systemd/system/zte-exporter.service with following

[Unit]
Description=ZTE exporter service

[Service]
Type=simple
ExecStart=/bin/python3 /opt/zte.py --port 8082 192.168.8.1 1234

[Install]
WantedBy=network-online.target

Tested devices

Devices currently supported / tested are only MC889A and it should just work with passing IP and password, default username is admin.

Thanks

Largely based on https://github.com/Kajkac/ZTE-MC-Home-assistant