This repository has been archived on 2024-10-15. You can view files and clone it, but cannot push or open issues or pull requests.
huawei_lte_exporter/README.md

72 lines
2.6 KiB
Markdown
Raw Normal View History

2020-04-07 16:52:27 +02:00
# huawei_lte_exporter
2020-04-06 22:27:29 +02:00
2020-04-07 16:52:27 +02:00
A promethus exporter for the Huawei series of 4G LTE routers, exporting various LTE signal strength measures e.g. rssi, snr etc ... It should be compatible with a range of Huawei routers including B310, B315, B525 and B535. A full range is listed at [huawei-lte-api](https://pypi.org/project/huawei-lte-api/).
## Example
![Grafana Dashboard Screenshot](/examples/screenshot.png "Grafana Dashboard Screenshot")
2020-04-09 22:11:22 +02:00
## Data Availability
2020-04-09 22:13:37 +02:00
Different operators appear to provide different signal information, so not all values will be available across all operators. A handy way to identify the available information is to login to your router and then view [device api](http://192.168.8.1/api/device/signal) and view source.
2020-04-09 22:11:22 +02:00
2020-04-07 16:52:27 +02:00
## Install
2020-04-06 22:27:29 +02:00
2020-04-07 17:08:46 +02:00
Follow the usual docker build and run flow.
Required environment variables:
* ROUTER_ADDRESS - IP address of the Huawei router on your network (typically '192.168.8.1')
* ROUTER_USER - Username to login to the router (typically 'admin')
* ROUTER_PASS - Password to login to the router (typically 'admin')
* PROM_PORT - Port to start the exporter on in the container
2020-04-06 22:27:29 +02:00
```
docker build -t huawei_lte_exporter .
export ROUTER_ADDRESS=192.168.8.1
export ROUTER_USER=admin
export ROUTER_PASS=admin
export PROM_PORT=8080
2020-04-07 00:03:55 +02:00
docker run -d -it -p $PROM_PORT:$PROM_PORT -e ROUTER_ADDRESS=$ROUTER_ADDRESS -e ROUTER_USER=$ROUTER_USER -e ROUTER_PASS=$ROUTER_PASS -e PROM_PORT=$PROM_PORT --name=hle huawei_lte_exporter
2020-04-06 22:27:29 +02:00
sleep 5
curl http://localhost:$PROM_PORT
HELP band The signal band the LTE connection is using
TYPE band gauge
band{deviceName="B535-232",iccid="111"} 1
HELP rsrp The average power received from a single Reference signal, and Its typical range is around -44dbm (good) to -140dbm(bad)
TYPE rsrp gauge
2020-04-07 17:08:46 +02:00
rsrp{deviceName="B535-232",iccid="111",band="3"} -98
2020-04-06 22:27:29 +02:00
HELP rsrq Indicates quality of the received signal, and its range is typically -19.5dB(bad) to -3dB (good)
TYPE rsrq gauge
2020-04-07 17:08:46 +02:00
rsrq{deviceName="B535-232",iccid="111",band="3"} -10.0
2020-04-06 22:27:29 +02:00
HELP rssi Represents the entire received power including the wanted power from the serving cell as well as all co-channel power and other sources of noise in dBm
TYPE rssi gauge
2020-04-07 17:08:46 +02:00
rssi{deviceName="B535-232",iccid="111",band="3"} -71
2020-04-06 22:27:29 +02:00
HELP sinr The signal-to-noise ratio of the given signal in dB
TYPE sinr gauge
2020-04-07 17:08:46 +02:00
rsrq{deviceName="B535-232",iccid="111",band="3"} 11
2020-04-06 22:27:29 +02:00
```
2020-04-07 16:52:27 +02:00
## Configure
### Prometheus
```
- job_name: '4g'
scrape_interval: 1m
static_configs:
- targets:
2020-04-07 21:20:23 +02:00
- server.home:8080
2020-04-07 16:52:27 +02:00
```
### Grafana
2020-04-09 22:11:22 +02:00
Example dashboard for Three (UK) [config](/examples/grafana.json)
2020-04-07 17:08:46 +02:00
Guage values taken from: https://wiki.teltonika-networks.com/view/Mobile_Signal_Strength_Recommendations
## Todo