mirror of
https://github.com/openwrt/packages.git
synced 2025-12-26 11:16:31 +04:00
prometheus-node-exporter-lua: Added selinux.lua.
Signed-off-by: Jonathan Davies <jpds@protonmail.com>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
local function scrape()
|
||||
local enforcing_mode = get_contents("/sys/fs/selinux/enforce")
|
||||
|
||||
if enforcing_mode ~= nil then
|
||||
metric("node_selinux_enabled", "gauge", nil, 0)
|
||||
else
|
||||
metric("node_selinux_enabled", "gauge", nil, 1)
|
||||
metric("node_selinux_current_mode", "gauge", nil, enforcing_mode)
|
||||
end
|
||||
end
|
||||
|
||||
return { scrape = scrape }
|
||||
Reference in New Issue
Block a user