2017-05-07 01:18:10 +08:00
|
|
|
#
|
|
|
|
# Copyright (C) 2013-2017 OpenWrt.org
|
|
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=prometheus-node-exporter-lua
|
|
|
|
PKG_VERSION:=2017.05.07
|
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
|
|
|
PKG_MAINTAINER:=Christian Simon <simon@swine.de>
|
|
|
|
PKG_LICENSE:=Apache-2.0
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua
|
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Utilities
|
|
|
|
TITLE:=Provides system statistics as Prometheus scraping endpoint
|
prometheus-node-exporter-lua: rewrite wifi scraper
On my bullet m2, scrape duration goes from between 0.2 and 0.5 to a stable 0.025
We also don't depend on luci anymore
This remove wifi_network_up metric, but this metric was buggy
wifi_network_up{ifname="wlan0-1",ssid="test1",channel="11",mode="Master",bssid="12:34:56:78:9A:BC",country="FR",frequency="2.462"} 1
wifi_network_up{ifname="radio0.network2",ssid="test1",channel="11",mode="Master",country="US",frequency="2.462"} 0
Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
2017-12-09 11:03:36 +08:00
|
|
|
DEPENDS:=+luasocket +libiwinfo-lua +libubus-lua +lua
|
2017-05-07 01:18:10 +08:00
|
|
|
URL:=https://github.com/rbo/openwrt_exporter
|
|
|
|
PKGARCH:=all
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua/conffiles
|
|
|
|
/etc/config/prometheus-node-exporter-lua
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/prometheus-node-exporter-lua/description
|
|
|
|
Provides node metrics as Prometheus scraping endpoint.
|
|
|
|
|
|
|
|
This service is a lightweight rewrite in LUA of the offical Prometheus node_exporter.
|
|
|
|
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
|
2017-12-09 11:03:36 +08:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors
|
|
|
|
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/* $(1)/usr/lib/lua/prometheus-collectors/
|
2017-05-07 01:18:10 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,prometheus-node-exporter-lua))
|