modem_exporter
所属分类:Modem编程
开发工具:GO
文件大小:0KB
下载次数:0
上传日期:2022-10-24 21:41:04
上 传 者:
sh-1993
说明: 调制解调器管理器度量的导出器,
(Exporter for modemmanager metrics,)
文件列表:
Dockerfile (427, 2022-04-28)
LICENSE (11357, 2022-04-28)
docker-compose.yml (223, 2022-04-28)
go.mod (136, 2022-04-28)
go.sum (40393, 2022-04-28)
main.go (9052, 2022-04-28)
# modem_exporter
Prometheus Exporter for modemmanager metrics.
## architecture
This exporter is basically piggy-backing on ModemManager and some [golang bindings](https://github.com/ravens/modem_exporter/blob/master/github.com/maltegrosse/go-modemmanager) to build a minimal prometheus exporter to expose the state of an LTE modem as prometheus metrics.
## port and endpoint
Default port is 9898 and endpoint is http://EXPORTERENDPOINT:9898/metrics.
## APN connection
if the variable MODEM_EXPORTER_APN is populated, the modem will try to establish a minimal bearer with the provided string value each time the metrics URL is polled.
## Metrics exported
Right now are exposed:
```
# HELP modem_up Was the last modem query successful
# TYPE modem_up gauge
modem_up 1
# HELP modem_tac TAC currently used by the modem
# TYPE modem_tac gauge
modem_tac{icc="0000000000000000000",imei="00000000000000",imsi="00000000000000",operator="foobar",operatorid="00101",rat="lte",v_operator="VisitedNetwork"} 50620
# HELP modem_roaming Is the modem roaming
# TYPE modem_roaming gauge
modem_roaming{icc="0000000000000000000",imei="00000000000000",imsi="00000000000000",operator="foobar",operatorid="00101",rat="lte",v_operator="VisitedNetwork"} 1
# HELP modem_registered Is the modem registered
# TYPE modem_registered gauge
modem_registered{icc="0000000000000000000",imei="00000000000000",imsi="00000000000000",operator="foobar",operatorid="00101",rat="lte",v_operator="VisitedNetwork"} 1
# HELP modem_connected Is the modem connected
# TYPE modem_connected gauge
modem_connected{icc="0000000000000000000",imei="00000000000000",imsi="00000000000000",operator="foobar",operatorid="00101",rat="lte",v_operator="VisitedNetwork"} 1
# HELP modem_operatorcode Code of the operator currently used by the modem
# TYPE modem_operatorcode gauge
modem_operatorcode{icc="0000000000000000000",imei="00000000000000",imsi="00000000000000",operator="foobar",operatorid="00101",rat="lte",v_operator="VisitedNetwork"} 00101
# HELP modem_lac LAC currently used by the modem
# TYPE modem_lac gauge
modem_lac{icc="0000000000000000000",imei="00000000000000",imsi="00000000000000",operator="foobar",operatorid="00101",rat="lte",v_operator="VisitedNetwork"} 65534
# TYPE modem_cellid gauge
modem_cellid{icc="0000000000000000000",imei="00000000000000",imsi="00000000000000",operator="foobar",operatorid="00101",rat="lte",v_operator="VisitedNetwork"} 1.28013588e+08
```
Right now CellID, TAC and LAC are exposed as Gauge. Perhaps it should be labels. I am not really sure.
## Hardware BOM
Using Amazon:
- M2 to USB2 converter https://www.amazon.es/gp/product/B06ZYXH76M - 32 euros
- Dell M2 4G LT X7 Qualcomm Modem https://www.amazon.es/gp/product/B07QMQRZCN - 18 euros
A linux machine with Ubuntu 20.04 to host it should be enough.
## build
```
docker-compose build
docker-compose up
```
近期下载者:
相关文件:
收藏者: