|
|
@ -12,6 +12,8 @@ PKG_LICENSE:=Apache-2.0 |
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk |
|
|
|
|
|
|
|
Build/Compile= |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua/Default |
|
|
|
SECTION:=utils |
|
|
|
CATEGORY:=Utilities |
|
|
@ -24,6 +26,24 @@ define Package/prometheus-node-exporter-lua |
|
|
|
DEPENDS:=+luasocket +lua |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua/install |
|
|
|
$(INSTALL_DIR) $(1)/etc/config |
|
|
|
$(INSTALL_CONF) ./files/etc/config/prometheus-node-exporter-lua $(1)/etc/config/prometheus-node-exporter-lua |
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d |
|
|
|
$(INSTALL_BIN) ./files/etc/init.d/prometheus-node-exporter-lua $(1)/etc/init.d/prometheus-node-exporter-lua |
|
|
|
$(INSTALL_DIR) $(1)/usr/bin |
|
|
|
$(INSTALL_BIN) ./files/usr/bin/prometheus-node-exporter-lua $(1)/usr/bin/prometheus-node-exporter-lua |
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/cpu.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/conntrack.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/filefd.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/loadavg.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/meminfo.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/netdev.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/time.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/uname.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua/conffiles |
|
|
|
/etc/config/prometheus-node-exporter-lua |
|
|
|
endef |
|
|
@ -34,34 +54,28 @@ define Package/prometheus-node-exporter-lua/description |
|
|
|
This service is a lightweight rewrite in LUA of the offical Prometheus node_exporter. |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-nat_traffic |
|
|
|
$(call Package/prometheus-node-exporter-lua/Default) |
|
|
|
TITLE+= (nat_traffic collector) |
|
|
|
DEPENDS:=prometheus-node-exporter-lua |
|
|
|
endef |
|
|
|
# Additional optional exporters:
|
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-uci_dhcp_host |
|
|
|
define Package/prometheus-node-exporter-lua-bmx6 |
|
|
|
$(call Package/prometheus-node-exporter-lua/Default) |
|
|
|
TITLE+= (uci_dhcp_host collector) |
|
|
|
DEPENDS:=prometheus-node-exporter-lua +libuci-lua |
|
|
|
TITLE+= (bmx6 links collector) |
|
|
|
DEPENDS:=prometheus-node-exporter-lua bmx6 +lua-cjson +bmx6-json |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-netstat |
|
|
|
$(call Package/prometheus-node-exporter-lua/Default) |
|
|
|
TITLE+= (netstat collector) |
|
|
|
DEPENDS:=prometheus-node-exporter-lua |
|
|
|
define Package/prometheus-node-exporter-lua-bmx6/install |
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/bmx6.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-wifi |
|
|
|
define Package/prometheus-node-exporter-lua-bmx7 |
|
|
|
$(call Package/prometheus-node-exporter-lua/Default) |
|
|
|
TITLE+= (wifi collector) |
|
|
|
DEPENDS:=prometheus-node-exporter-lua +libiwinfo-lua +libubus-lua |
|
|
|
TITLE+= (bmx7 links collector) |
|
|
|
DEPENDS:=prometheus-node-exporter-lua bmx7 +lua-cjson +bmx7-json |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-wifi_stations |
|
|
|
$(call Package/prometheus-node-exporter-lua/Default) |
|
|
|
TITLE+= (wifi_stations collector) |
|
|
|
DEPENDS:=prometheus-node-exporter-lua +libiwinfo-lua +libubus-lua |
|
|
|
define Package/prometheus-node-exporter-lua-bmx7/install |
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/bmx7.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-hostapd_stations |
|
|
@ -70,28 +84,9 @@ define Package/prometheus-node-exporter-lua-hostapd_stations |
|
|
|
DEPENDS:=prometheus-node-exporter-lua +hostapd-utils +lua-bit32 +libubus-lua |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-bmx6 |
|
|
|
$(call Package/prometheus-node-exporter-lua/Default) |
|
|
|
TITLE+= (bmx6 links collector) |
|
|
|
DEPENDS:=prometheus-node-exporter-lua bmx6 +lua-cjson +bmx6-json |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-bmx7 |
|
|
|
$(call Package/prometheus-node-exporter-lua/Default) |
|
|
|
TITLE+= (bmx7 links collector) |
|
|
|
DEPENDS:=prometheus-node-exporter-lua bmx7 +lua-cjson +bmx7-json |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-textfile |
|
|
|
$(call Package/prometheus-node-exporter-lua/Default) |
|
|
|
TITLE+= (textfile collector) |
|
|
|
DEPENDS:=prometheus-node-exporter-lua +luci-lib-nixio |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-openwrt |
|
|
|
$(call Package/prometheus-node-exporter-lua/Default) |
|
|
|
TITLE+= (openwrt collector) |
|
|
|
DEPENDS:=prometheus-node-exporter-lua +libubus-lua |
|
|
|
define Package/prometheus-node-exporter-lua-hostapd_stations/install |
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/hostapd_stations.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-ltq-dsl |
|
|
@ -100,24 +95,15 @@ define Package/prometheus-node-exporter-lua-ltq-dsl |
|
|
|
DEPENDS:=prometheus-node-exporter-lua @(PACKAGE_ltq-adsl-app||PACKAGE_ltq-vdsl-app) |
|
|
|
endef |
|
|
|
|
|
|
|
Build/Compile= |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua/install |
|
|
|
$(INSTALL_DIR) $(1)/etc/config |
|
|
|
$(INSTALL_CONF) ./files/etc/config/prometheus-node-exporter-lua $(1)/etc/config/prometheus-node-exporter-lua |
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d |
|
|
|
$(INSTALL_BIN) ./files/etc/init.d/prometheus-node-exporter-lua $(1)/etc/init.d/prometheus-node-exporter-lua |
|
|
|
$(INSTALL_DIR) $(1)/usr/bin |
|
|
|
$(INSTALL_BIN) ./files/usr/bin/prometheus-node-exporter-lua $(1)/usr/bin/prometheus-node-exporter-lua |
|
|
|
define Package/prometheus-node-exporter-lua-ltq-dsl/install |
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/cpu.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/conntrack.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/filefd.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/loadavg.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/meminfo.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/netdev.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/time.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/uname.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/ltq-dsl.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-nat_traffic |
|
|
|
$(call Package/prometheus-node-exporter-lua/Default) |
|
|
|
TITLE+= (nat_traffic collector) |
|
|
|
DEPENDS:=prometheus-node-exporter-lua |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-nat_traffic/install |
|
|
@ -125,9 +111,10 @@ define Package/prometheus-node-exporter-lua-nat_traffic/install |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/nat_traffic.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-uci_dhcp_host/install |
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/uci_dhcp_host.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
define Package/prometheus-node-exporter-lua-netstat |
|
|
|
$(call Package/prometheus-node-exporter-lua/Default) |
|
|
|
TITLE+= (netstat collector) |
|
|
|
DEPENDS:=prometheus-node-exporter-lua |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-netstat/install |
|
|
@ -135,55 +122,70 @@ define Package/prometheus-node-exporter-lua-netstat/install |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/netstat.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-wifi/install |
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/wifi.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
define Package/prometheus-node-exporter-lua-openwrt |
|
|
|
$(call Package/prometheus-node-exporter-lua/Default) |
|
|
|
TITLE+= (openwrt collector) |
|
|
|
DEPENDS:=prometheus-node-exporter-lua +libubus-lua |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-wifi_stations/install |
|
|
|
define Package/prometheus-node-exporter-lua-openwrt/install |
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/wifi_stations.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/openwrt.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-hostapd_stations/install |
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/hostapd_stations.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
define Package/prometheus-node-exporter-lua-textfile |
|
|
|
$(call Package/prometheus-node-exporter-lua/Default) |
|
|
|
TITLE+= (textfile collector) |
|
|
|
DEPENDS:=prometheus-node-exporter-lua +luci-lib-nixio |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-bmx6/install |
|
|
|
define Package/prometheus-node-exporter-lua-textfile/install |
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/bmx6.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/textfile.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-bmx7/install |
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/bmx7.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
define Package/prometheus-node-exporter-lua-uci_dhcp_host |
|
|
|
$(call Package/prometheus-node-exporter-lua/Default) |
|
|
|
TITLE+= (uci_dhcp_host collector) |
|
|
|
DEPENDS:=prometheus-node-exporter-lua +libuci-lua |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-textfile/install |
|
|
|
define Package/prometheus-node-exporter-lua-uci_dhcp_host/install |
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/textfile.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/uci_dhcp_host.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-openwrt/install |
|
|
|
define Package/prometheus-node-exporter-lua-wifi |
|
|
|
$(call Package/prometheus-node-exporter-lua/Default) |
|
|
|
TITLE+= (wifi collector) |
|
|
|
DEPENDS:=prometheus-node-exporter-lua +libiwinfo-lua +libubus-lua |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-wifi/install |
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/openwrt.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/wifi.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-ltq-dsl/install |
|
|
|
define Package/prometheus-node-exporter-lua-wifi_stations |
|
|
|
$(call Package/prometheus-node-exporter-lua/Default) |
|
|
|
TITLE+= (wifi_stations collector) |
|
|
|
DEPENDS:=prometheus-node-exporter-lua +libiwinfo-lua +libubus-lua |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua-wifi_stations/install |
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/ltq-dsl.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/wifi_stations.lua $(1)/usr/lib/lua/prometheus-collectors/ |
|
|
|
endef |
|
|
|
|
|
|
|
$(eval $(call BuildPackage,prometheus-node-exporter-lua)) |
|
|
|
$(eval $(call BuildPackage,prometheus-node-exporter-lua-bmx6)) |
|
|
|
$(eval $(call BuildPackage,prometheus-node-exporter-lua-bmx7)) |
|
|
|
$(eval $(call BuildPackage,prometheus-node-exporter-lua-hostapd_stations)) |
|
|
|
$(eval $(call BuildPackage,prometheus-node-exporter-lua-ltq-dsl)) |
|
|
|
$(eval $(call BuildPackage,prometheus-node-exporter-lua-nat_traffic)) |
|
|
|
$(eval $(call BuildPackage,prometheus-node-exporter-lua-netstat)) |
|
|
|
$(eval $(call BuildPackage,prometheus-node-exporter-lua-openwrt)) |
|
|
|
$(eval $(call BuildPackage,prometheus-node-exporter-lua-textfile)) |
|
|
|
$(eval $(call BuildPackage,prometheus-node-exporter-lua-uci_dhcp_host)) |
|
|
|
$(eval $(call BuildPackage,prometheus-node-exporter-lua-wifi)) |
|
|
|
$(eval $(call BuildPackage,prometheus-node-exporter-lua-wifi_stations)) |
|
|
|
$(eval $(call BuildPackage,prometheus-node-exporter-lua-hostapd_stations)) |
|
|
|
$(eval $(call BuildPackage,prometheus-node-exporter-lua-bmx6)) |
|
|
|
$(eval $(call BuildPackage,prometheus-node-exporter-lua-bmx7)) |
|
|
|
$(eval $(call BuildPackage,prometheus-node-exporter-lua-textfile)) |
|
|
|
$(eval $(call BuildPackage,prometheus-node-exporter-lua-openwrt)) |
|
|
|
$(eval $(call BuildPackage,prometheus-node-exporter-lua-ltq-dsl)) |