OpenWRT from CollectD to telegraf

Hi,

with the last version of OpenWRT, I have switched from CollectD to telegraph to push my data on my InfluxDB v2. But since I have loosing 2 pieces of information:

  • Signal quality for WiFi (2.5 and 5G).
  • Number of peripherals connected by WiFi (2.5 and 5G).

Is there a way to recover these informations from telegraf?

Hi,

  • Signal quality for WiFi (2.5 and 5G).

Take a look at the wireless plugin and see if that gets you the signal quality information you are after.

  • Number of peripherals connected by WiFi (2.5 and 5G).

Hmm I am not certain we have something for this. Do you know how CollectD was tracking that information as well?

Thanks

Thx.

On collectD, I count the station:

from(bucket: "${bucket}")
  |> range(start: v.timeRangeStart, stop:v.timeRangeStop)
  |> filter(fn: (r) =>
    r._measurement == "iwinfo_value" and
    r._field == "value" and
    r.host == "hubble" and
    r.type == "stations" and
    r.instance == "wlan0"
  )
  |> aggregateWindow(every: v.windowPeriod, fn: last)
  |> yield(name: "last")

The wireless plugin uses data from /proc/net/wireless. Briefly looking at my system I do not see that info there. If iwinfo has a JSON output option, you could use the exec input plugin and parse the output.

Thx. It’s true, on OpenWRT iwconfig / /proc/net/wireless is deprecated… But iwinfo haven’t any JSON or other simple format. I search on the code of LuCi (the OpenWRT WebUI) to find how LuCi find and display information.