module Mixin
module CPU
def cpu_cores
- [self.dig("cpu", "total").to_i, self.dig("cpu", "cores").to_i, 4].max
+ [dig("cpu", "total").to_i, dig("cpu", "cores").to_i, 4].max
end
end
end
end
end
-Chef::Recipe.include(OpenStreetMap::Mixin::EditFile)
+Chef::DSL::Recipe.include(OpenStreetMap::Mixin::EditFile)
end
end
-Chef::Recipe.include(OpenStreetMap::Mixin::PersistentToken)
+Chef::DSL::Recipe.include(OpenStreetMap::Mixin::PersistentToken)
user "root"
proc_subset "all"
protect_clock false
- restrict_address_families ["AF_UNIX", "AF_NETLINK"]
+ restrict_address_families %w[AF_UNIX AF_NETLINK]
system_call_filter ["@system-service", "@clock"]
options %w[
--collector.textfile.directory=/var/lib/prometheus/node-exporter