The official node_exporter reports node_time_seconds as a gauge, but
prometheus-node-exporter-lua reports it as a counter. To be consistent
with the official implementation, and because "gauge" is more correct
than "counter" for this metric (system time can decrease, but the
Prometheus documentation states, "A counter is a cumulative metric that
represents a single monotonically increasing counter whose value can
only increase or be reset to zero on restart."), change the type for
node_time_seconds to "gauge".
Signed-off-by: Forest Crossman <redacted>
PKG_NAME:=prometheus-node-exporter-lua
PKG_VERSION:=2020.02.03
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
PKG_LICENSE:=Apache-2.0
local function scrape()
-- current time
- metric("node_time_seconds", "counter", nil, os.time())
+ metric("node_time_seconds", "gauge", nil, os.time())
end
return { scrape = scrape }