Browse Source

prometheus-node-exporter-lua: split out nat_traffic and netstat

nat_traffic is too verbose to be really useful by default
netstat is broken by default on OpenWrt/LEDE

Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
lilik-openwrt-22.03
Etienne Champetier 7 years ago
parent
commit
84023027a2
1 changed files with 24 additions and 2 deletions
  1. +24
    -2
      utils/prometheus-node-exporter-lua/Makefile

+ 24
- 2
utils/prometheus-node-exporter-lua/Makefile View File

@ -34,6 +34,18 @@ define Package/prometheus-node-exporter-lua/description
This service is a lightweight rewrite in LUA of the offical Prometheus node_exporter. This service is a lightweight rewrite in LUA of the offical Prometheus node_exporter.
endef 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-netstat
$(call Package/prometheus-node-exporter-lua/Default)
TITLE+= (netstat collector)
DEPENDS:=prometheus-node-exporter-lua
endef
define Package/prometheus-node-exporter-lua-wifi define Package/prometheus-node-exporter-lua-wifi
$(call Package/prometheus-node-exporter-lua/Default) $(call Package/prometheus-node-exporter-lua/Default)
TITLE+= (wifi collector) TITLE+= (wifi collector)
@ -60,13 +72,21 @@ define Package/prometheus-node-exporter-lua/install
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/filefd.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/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/meminfo.lua $(1)/usr/lib/lua/prometheus-collectors/
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/nat_traffic.lua $(1)/usr/lib/lua/prometheus-collectors/
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/netstat.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/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/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/uname.lua $(1)/usr/lib/lua/prometheus-collectors/
endef endef
define Package/prometheus-node-exporter-lua-nat_traffic/install
$(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/nat_traffic.lua $(1)/usr/lib/lua/prometheus-collectors/
endef
define Package/prometheus-node-exporter-lua-netstat/install
$(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors
$(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 define Package/prometheus-node-exporter-lua-wifi/install
$(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors $(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/wifi.lua $(1)/usr/lib/lua/prometheus-collectors/ $(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/wifi.lua $(1)/usr/lib/lua/prometheus-collectors/
@ -78,5 +98,7 @@ define Package/prometheus-node-exporter-lua-wifi_stations/install
endef endef
$(eval $(call BuildPackage,prometheus-node-exporter-lua)) $(eval $(call BuildPackage,prometheus-node-exporter-lua))
$(eval $(call BuildPackage,prometheus-node-exporter-lua-nat_traffic))
$(eval $(call BuildPackage,prometheus-node-exporter-lua-netstat))
$(eval $(call BuildPackage,prometheus-node-exporter-lua-wifi)) $(eval $(call BuildPackage,prometheus-node-exporter-lua-wifi))
$(eval $(call BuildPackage,prometheus-node-exporter-lua-wifi_stations)) $(eval $(call BuildPackage,prometheus-node-exporter-lua-wifi_stations))

Loading…
Cancel
Save