ethtool-lua + prometheus-node-exporter-lua plugin
The ethtool-lua library is a partial re-implementation of the ethtool. The goal is to provide the CLI queries and configuration options as a Lua API.
The reason for starting this library, was the desire for a nice and efficient way to query DSA switch statistics in the prometheus-node-exporter-lua on OpenWRT devices. Existing suggestions around the internet focussed mainly on calling the ethtool CLI program and parsing the output. This is neither elegant nor efficient, as the collection time for this implementation was 300% higher on my rtl838x based switch running OpenWRT.
@champtar Would you mind reviewing these changes?
Hi @Kevinjil,
I haven't had time to fully review your work, but as those stats are also implemented in the official node-exporter, can you confirm the naming is exactly the same ? (https://github.com/prometheus/node_exporter/blob/master/collector/ethtool_linux.go#L458)
I'll make sure they align
@champtar I've changed the naming of metrics to align with the upstream names.
@champtar A small reminder. Also, should I resolve the merge conflict or will you do it when it in the pull.
Did some small changes: ethtool-lua:
- changed
PKG_SOURCE/PKG_SOURCE_URL(file indlfolder was named v0.1.0.tar.gz) prometheus-node-exporter-lua: - squash commits
- bump version
- fix permission (not needed)
- use untyped instead of counter (match upstream)
- rename to ethtool instead of ethtool-stats (match upstream)
@Kevinjil could you rename ethtool-lua to lua-ethtool and move it with all the small lua libs in the repo ?