prometheus-node-exporter-lua: uci_dhcp_host module
authorGérondal Thibault <contact@tycale.be>
Fri, 3 Jul 2020 21:21:12 +0000 (23:21 +0200)
committerPaul Spooren <mail@aparcar.org>
Mon, 20 Jul 2020 23:11:04 +0000 (13:11 -1000)
commite2b3fec6bfca8e9843aa5ec297803869061d2a5d
tree6f47089905df126167e6ad6d72bc8949fa74c092
parentf4e878c215d0cfd2acfc2cf823e7900e7bb0dd80
prometheus-node-exporter-lua: uci_dhcp_host module

Extract data from configuration file /etc/config/dhcp and create labels
{name, ip, mac, dns} via uci. Those labels are useful in order to craft
complex prometheus queries as replacing the MAC address to a custom
name.  E.g.: wifi_station_signal_dbm * on (mac) group_left(name)
uci_dhcp_host or on (mac) label_replace(wifi_station_signal_dbm, "name",
"$1", "mac", "(.+)")

Signed-off-by: Gérondal Thibault <contact@tycale.be>
utils/prometheus-node-exporter-lua/Makefile
utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/uci_dhcp_host.lua [new file with mode: 0644]