Skip to content

OpenWrt collectd-exec and rrdtool scripts to collect and display DSL modem statistics

Notifications You must be signed in to change notification settings

turboproc/openwrt-collectd-exec-dslstats

 
 

Repository files navigation

This set of scripts collects and displays xDSL modem statistics in OpenWrt for Lantiq targets with an internal xDSL modem.

Compatibility

OpenWrt 21.02, 22.03, snapshots (as of May 2022)

Requirements

To collect data, the packages collectd and collectd-mod-exec are required. To display the statistics in LuCI, luci-app-statistics is neccessary, and for ease of configuration it is recommended.

Installation

Put the following files into the file system:

  • /etc/collectd/collectd-dslstats-lantiq.sh and make it executable (chmod +x)
    the shell script responsible for collecting the data
  • /usr/share/rpcd/acl.d/collectd-exec-lantiqdsl.json
    extends the ACL (access control list) to allow the shell script to access dsl metrics via ubus
  • /www/luci-static/resources/statistics/rrdtool/definitions/exec.js
    definitions for statistics display in LuCI
  • optional: /www/luci-static/resources/statistics/rrdtool.js
    improved/modified statistics display script, allowing for more control over the graphs' visual parameters

Reboot the system to have the ACL extension take effect.

Enable the script in collectd:

  • In LuCI, under Statistics > Setup, in the General tab, enable the exec plugin, and in its configuration add the command for reading values:
    /etc/collectd/collectd-dslstats-lantiq.sh
    keep User and Group at "nobody"

Notes

  • I am not aware of any other, more elegant way to reload the ACL than to reboot the system. Please tell me if you do.

  • The script will collect additional data for Vectoring lines if a build containing the fixes for Vectoring samples is used. In 21.02 and 22.03-RCs the statistics will show an empty graph for these values.

  • The optional modified rrdtool.js mainly allows graph areas without lines and setting the area colors. The default script insists on lines and reduces the saturation of area colors, which obscures minor variations in the graph and makes it hard to distinguish areas from each other. Using the modified rrdtool.jsshould (and in all my tests does) not influence existing statistics definitions, but I can't test all cases of all definitions. If it causes errors in other more uncommon scenarios feedback will be appreciated.

  • exec.js contains code to display the same data, collected from a Broadcom-based ZyXEL VMG1312-B30A modem using a different shell script. I can currently not test the script to collect the data, so it is not published here until I can.

About

OpenWrt collectd-exec and rrdtool scripts to collect and display DSL modem statistics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 83.8%
  • Shell 16.2%