aboutsummaryrefslogtreecommitdiff
path: root/utils/prometheus-node-exporter-ucode/files/extra/uci_dhcp_host.uc
blob: 0d55724f9778b3e7b243959054329cd84e6b902b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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);
});