mirror of
https://github.com/openwrt/packages.git
synced 2026-01-09 19:31:21 +00:00
prometheus-node-exporter-lua: add conntrack collector
Also fix missing dependency of openwrt collector Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
local function scrape()
|
||||
metric("node_nf_conntrack_entries", "gauge", nil,
|
||||
string.sub(get_contents("/proc/sys/net/netfilter/nf_conntrack_count"), 1, -2))
|
||||
metric("node_nf_conntrack_entries_limit", "gauge", nil,
|
||||
string.sub(get_contents("/proc/sys/net/netfilter/nf_conntrack_max"), 1, -2))
|
||||
end
|
||||
|
||||
return { scrape = scrape }
|
||||
Reference in New Issue
Block a user