0
0
mirror of https://github.com/openwrt/packages.git synced 2025-07-06 23:15:29 +00:00
Files
Andre Heider 06c2ef2ce4 prometheus-node-exporter-ucode: add new package
This is a port of prometheus-node-exporter-lua to ucode.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2023-08-25 10:18:26 +02:00

15 lines
202 B
Ucode

import { cursor } from "uci";
const uci = cursor();
uci.load("dhcp");
let m = gauge("dhcp_host_info");
uci.foreach('dhcp', `host`, (s) => {
m({
name: s.name,
mac: s.mac,
ip: s.ip,
}, 1);
});