Huawei GSM modem API – telegraf input plugin

This input plugin will gather huawei api data

HiLink API list for Huawei ( Polish site ): http://forum.jdtech.pl/Watek-hilink-api-dla-urzadzen-huawei

Configuration:

[[inputs.huawei_hilink_api]]
 # List of devices
 DevicesAddress = ["http://192.168.2.1", "http://192.168.8.1"] # require
 
 [[inputs.huawei_hilink_api.module]]
 Url = "api/device/signal"
 Fields = ["pci", "rsrq", "rsrp", "rssi", "sinr" ]
 [[inputs.huawei_hilink_api.module]]
 Url = "api/monitoring/status"
 Fields = [ "CurrentNetworkType" ]
 [[inputs.huawei_hilink_api.module]]
 Url = "api/device/information"
 Fields = ["DeviceName"]
 Is_tag = true

Tags:

  • address
  • api_url

Example Output:

$ ./telegraf --config telegraf.conf --input-filter huawei_hilink_api --test
* Plugin: inputs.huawei_hilink_api, Collection 1
> huawei_api,address=http://192.168.8.1,host=debian,api_url=api/device/signal,DeviceName=E3372 rsrq=-7i,rsrp=-93i,sinr=7i,rssi=-69i,pci=90i 1498032147000000000
> huawei_api,api_url=api/device/signal,DeviceName=E3272,address=http://192.168.2.1,host=debian pci=90i,rsrq=-9i,sinr=9i,rsrp=-92i,rssi=-63i 1498032147000000000
> huawei_api,api_url=api/monitoring/status,DeviceName=E3372,address=http://192.168.8.1,host=debian CurrentNetworkType=19i 1498032147000000000
> huawei_api,api_url=api/monitoring/status,DeviceName=E3272,address=http://192.168.2.1,host=debian CurrentNetworkType=19i 1498032147000000000

Telegraf:

Grafana dashboard:

Source code: https://github.com/marianob85/telegraf

One comment on “Huawei GSM modem API – telegraf input plugin

  1. Arno Smith 17 November 2020 05:06

    Hi, interesting app. Can it be made to work in Windows 10 too?

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>