2 # Copyright (C) 2013-2017 OpenWrt.org
4 include $(TOPDIR
)/rules.mk
6 PKG_NAME
:=prometheus-node-exporter-lua
7 PKG_VERSION
:=2021.07.24
10 PKG_MAINTAINER
:=Etienne CHAMPETIER
<champetier.etienne@gmail.com
>
11 PKG_LICENSE
:=Apache-2.0
13 include $(INCLUDE_DIR
)/package.mk
17 define Package
/prometheus-node-exporter-lua
/Default
20 TITLE
:=Prometheus node exporter
24 define Package
/prometheus-node-exporter-lua
25 $(call Package
/prometheus-node-exporter-lua
/Default
)
26 DEPENDS
:=+luasocket
+lua
29 define Package
/prometheus-node-exporter-lua
/install
30 $(INSTALL_DIR
) $(1)/etc
/config
31 $(INSTALL_CONF
) .
/files
/etc
/config
/prometheus-node-exporter-lua
$(1)/etc
/config
/prometheus-node-exporter-lua
32 $(INSTALL_DIR
) $(1)/etc
/init.d
33 $(INSTALL_BIN
) .
/files
/etc
/init.d
/prometheus-node-exporter-lua
$(1)/etc
/init.d
/prometheus-node-exporter-lua
34 $(INSTALL_DIR
) $(1)/usr
/bin
35 $(INSTALL_BIN
) .
/files
/usr
/bin
/prometheus-node-exporter-lua
$(1)/usr
/bin
/prometheus-node-exporter-lua
36 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/prometheus-collectors
37 $(INSTALL_BIN
) .
/files
/usr
/lib
/lua
/prometheus-collectors
/cpu.lua
$(1)/usr
/lib
/lua
/prometheus-collectors
/
38 $(INSTALL_BIN
) .
/files
/usr
/lib
/lua
/prometheus-collectors
/conntrack.lua
$(1)/usr
/lib
/lua
/prometheus-collectors
/
39 $(INSTALL_BIN
) .
/files
/usr
/lib
/lua
/prometheus-collectors
/filefd.lua
$(1)/usr
/lib
/lua
/prometheus-collectors
/
40 $(INSTALL_BIN
) .
/files
/usr
/lib
/lua
/prometheus-collectors
/loadavg.lua
$(1)/usr
/lib
/lua
/prometheus-collectors
/
41 $(INSTALL_BIN
) .
/files
/usr
/lib
/lua
/prometheus-collectors
/meminfo.lua
$(1)/usr
/lib
/lua
/prometheus-collectors
/
42 $(INSTALL_BIN
) .
/files
/usr
/lib
/lua
/prometheus-collectors
/netdev.lua
$(1)/usr
/lib
/lua
/prometheus-collectors
/
43 $(INSTALL_BIN
) .
/files
/usr
/lib
/lua
/prometheus-collectors
/time.lua
$(1)/usr
/lib
/lua
/prometheus-collectors
/
44 $(INSTALL_BIN
) .
/files
/usr
/lib
/lua
/prometheus-collectors
/uname.lua
$(1)/usr
/lib
/lua
/prometheus-collectors
/
47 define Package
/prometheus-node-exporter-lua
/conffiles
48 /etc
/config
/prometheus-node-exporter-lua
51 define Package
/prometheus-node-exporter-lua
/description
52 Provides node metrics
as Prometheus scraping endpoint.
54 This service is a lightweight rewrite in LUA of the offical Prometheus node_exporter.
57 # Additional optional exporters:
59 define Package
/prometheus-node-exporter-lua-bmx6
60 $(call Package
/prometheus-node-exporter-lua
/Default
)
61 TITLE
+= (bmx6 links collector
)
62 DEPENDS
:=prometheus-node-exporter-lua bmx6
+lua-cjson
+bmx6-json
65 define Package
/prometheus-node-exporter-lua-bmx6
/install
66 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/prometheus-collectors
67 $(INSTALL_BIN
) .
/files
/usr
/lib
/lua
/prometheus-collectors
/bmx6.lua
$(1)/usr
/lib
/lua
/prometheus-collectors
/
70 define Package
/prometheus-node-exporter-lua-bmx7
71 $(call Package
/prometheus-node-exporter-lua
/Default
)
72 TITLE
+= (bmx7 links collector
)
73 DEPENDS
:=prometheus-node-exporter-lua bmx7
+lua-cjson
+bmx7-json
76 define Package
/prometheus-node-exporter-lua-bmx7
/install
77 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/prometheus-collectors
78 $(INSTALL_BIN
) .
/files
/usr
/lib
/lua
/prometheus-collectors
/bmx7.lua
$(1)/usr
/lib
/lua
/prometheus-collectors
/
81 define Package
/prometheus-node-exporter-lua-dawn
82 $(call Package
/prometheus-node-exporter-lua
/Default
)
83 TITLE
+= (dawn collector
)
84 DEPENDS
:=prometheus-node-exporter-lua
+libiwinfo-lua
+libubus-lua
87 define Package
/prometheus-node-exporter-lua-dawn
/install
88 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/prometheus-collectors
89 $(INSTALL_BIN
) .
/files
/usr
/lib
/lua
/prometheus-collectors
/dawn.lua
$(1)/usr
/lib
/lua
/prometheus-collectors
/
92 define Package
/prometheus-node-exporter-lua-hostapd_stations
93 $(call Package
/prometheus-node-exporter-lua
/Default
)
94 TITLE
+= (hostapd_stations collector
) - Requires a full hostapd
/ wpad build
95 DEPENDS
:=prometheus-node-exporter-lua
+hostapd-utils
+lua-bit32
+libubus-lua
98 define Package
/prometheus-node-exporter-lua-hostapd_stations
/install
99 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/prometheus-collectors
100 $(INSTALL_BIN
) .
/files
/usr
/lib
/lua
/prometheus-collectors
/hostapd_stations.lua
$(1)/usr
/lib
/lua
/prometheus-collectors
/
103 define Package
/prometheus-node-exporter-lua-hostapd_ubus_stations
104 $(call Package
/prometheus-node-exporter-lua
/Default
)
105 TITLE
+= (hostapd_ubus_stations collector
)
106 DEPENDS
:=prometheus-node-exporter-lua
+luabitop
+libubus-lua
109 define Package
/prometheus-node-exporter-lua-hostapd_ubus_stations
/install
110 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/prometheus-collectors
111 $(INSTALL_BIN
) .
/files
/usr
/lib
/lua
/prometheus-collectors
/hostapd_ubus_stations.lua
$(1)/usr
/lib
/lua
/prometheus-collectors
/
114 define Package
/prometheus-node-exporter-lua-ltq-dsl
115 $(call Package
/prometheus-node-exporter-lua
/Default
)
116 TITLE
+= (lantiq dsl collector
)
117 DEPENDS
:=prometheus-node-exporter-lua @
(PACKAGE_ltq-adsl-app||PACKAGE_ltq-vdsl-app
)
120 define Package
/prometheus-node-exporter-lua-ltq-dsl
/install
121 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/prometheus-collectors
122 $(INSTALL_BIN
) .
/files
/usr
/lib
/lua
/prometheus-collectors
/ltq-dsl.lua
$(1)/usr
/lib
/lua
/prometheus-collectors
/
125 define Package
/prometheus-node-exporter-lua-nat_traffic
126 $(call Package
/prometheus-node-exporter-lua
/Default
)
127 TITLE
+= (nat_traffic collector
)
128 DEPENDS
:=prometheus-node-exporter-lua
131 define Package
/prometheus-node-exporter-lua-nat_traffic
/install
132 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/prometheus-collectors
133 $(INSTALL_BIN
) .
/files
/usr
/lib
/lua
/prometheus-collectors
/nat_traffic.lua
$(1)/usr
/lib
/lua
/prometheus-collectors
/
136 define Package
/prometheus-node-exporter-lua-netstat
137 $(call Package
/prometheus-node-exporter-lua
/Default
)
138 TITLE
+= (netstat collector
)
139 DEPENDS
:=prometheus-node-exporter-lua
142 define Package
/prometheus-node-exporter-lua-netstat
/install
143 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/prometheus-collectors
144 $(INSTALL_BIN
) .
/files
/usr
/lib
/lua
/prometheus-collectors
/netstat.lua
$(1)/usr
/lib
/lua
/prometheus-collectors
/
147 define Package
/prometheus-node-exporter-lua-openwrt
148 $(call Package
/prometheus-node-exporter-lua
/Default
)
149 TITLE
+= (openwrt collector
)
150 DEPENDS
:=prometheus-node-exporter-lua
+libubus-lua
153 define Package
/prometheus-node-exporter-lua-openwrt
/install
154 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/prometheus-collectors
155 $(INSTALL_BIN
) .
/files
/usr
/lib
/lua
/prometheus-collectors
/openwrt.lua
$(1)/usr
/lib
/lua
/prometheus-collectors
/
158 define Package
/prometheus-node-exporter-lua-textfile
159 $(call Package
/prometheus-node-exporter-lua
/Default
)
160 TITLE
+= (textfile collector
)
161 DEPENDS
:=prometheus-node-exporter-lua
+luci-lib-nixio
164 define Package
/prometheus-node-exporter-lua-textfile
/install
165 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/prometheus-collectors
166 $(INSTALL_BIN
) .
/files
/usr
/lib
/lua
/prometheus-collectors
/textfile.lua
$(1)/usr
/lib
/lua
/prometheus-collectors
/
169 define Package
/prometheus-node-exporter-lua-uci_dhcp_host
170 $(call Package
/prometheus-node-exporter-lua
/Default
)
171 TITLE
+= (uci_dhcp_host collector
)
172 DEPENDS
:=prometheus-node-exporter-lua
+libuci-lua
175 define Package
/prometheus-node-exporter-lua-uci_dhcp_host
/install
176 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/prometheus-collectors
177 $(INSTALL_BIN
) .
/files
/usr
/lib
/lua
/prometheus-collectors
/uci_dhcp_host.lua
$(1)/usr
/lib
/lua
/prometheus-collectors
/
180 define Package
/prometheus-node-exporter-lua-wifi
181 $(call Package
/prometheus-node-exporter-lua
/Default
)
182 TITLE
+= (wifi collector
)
183 DEPENDS
:=prometheus-node-exporter-lua
+libiwinfo-lua
+libubus-lua
186 define Package
/prometheus-node-exporter-lua-wifi
/install
187 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/prometheus-collectors
188 $(INSTALL_BIN
) .
/files
/usr
/lib
/lua
/prometheus-collectors
/wifi.lua
$(1)/usr
/lib
/lua
/prometheus-collectors
/
191 define Package
/prometheus-node-exporter-lua-wifi_stations
192 $(call Package
/prometheus-node-exporter-lua
/Default
)
193 TITLE
+= (wifi_stations collector
)
194 DEPENDS
:=prometheus-node-exporter-lua
+libiwinfo-lua
+libubus-lua
197 define Package
/prometheus-node-exporter-lua-wifi_stations
/install
198 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/prometheus-collectors
199 $(INSTALL_BIN
) .
/files
/usr
/lib
/lua
/prometheus-collectors
/wifi_stations.lua
$(1)/usr
/lib
/lua
/prometheus-collectors
/
202 define Package
/prometheus-node-exporter-lua-snmp6
203 $(call Package
/prometheus-node-exporter-lua
/Default
)
204 TITLE
+= (snmp6 collector
)
205 DEPENDS
:=prometheus-node-exporter-lua
+libubus-lua
208 define Package
/prometheus-node-exporter-lua-snmp6
/install
209 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/prometheus-collectors
210 $(INSTALL_BIN
) .
/files
/usr
/lib
/lua
/prometheus-collectors
/snmp6.lua
$(1)/usr
/lib
/lua
/prometheus-collectors
/
213 $(eval
$(call BuildPackage
,prometheus-node-exporter-lua
))
214 $(eval
$(call BuildPackage
,prometheus-node-exporter-lua-bmx6
))
215 $(eval
$(call BuildPackage
,prometheus-node-exporter-lua-bmx7
))
216 $(eval
$(call BuildPackage
,prometheus-node-exporter-lua-dawn
))
217 $(eval
$(call BuildPackage
,prometheus-node-exporter-lua-hostapd_stations
))
218 $(eval
$(call BuildPackage
,prometheus-node-exporter-lua-hostapd_ubus_stations
))
219 $(eval
$(call BuildPackage
,prometheus-node-exporter-lua-ltq-dsl
))
220 $(eval
$(call BuildPackage
,prometheus-node-exporter-lua-nat_traffic
))
221 $(eval
$(call BuildPackage
,prometheus-node-exporter-lua-netstat
))
222 $(eval
$(call BuildPackage
,prometheus-node-exporter-lua-openwrt
))
223 $(eval
$(call BuildPackage
,prometheus-node-exporter-lua-textfile
))
224 $(eval
$(call BuildPackage
,prometheus-node-exporter-lua-uci_dhcp_host
))
225 $(eval
$(call BuildPackage
,prometheus-node-exporter-lua-wifi
))
226 $(eval
$(call BuildPackage
,prometheus-node-exporter-lua-wifi_stations
))
227 $(eval
$(call BuildPackage
,prometheus-node-exporter-lua-snmp6
))