X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/35b4dcdb0ea68b7afa7634eafb3546ee28ce1813..a585c97b901ea250d40f2d924d1a8ac5949751a4:/cookbooks/munin/recipes/default.rb diff --git a/cookbooks/munin/recipes/default.rb b/cookbooks/munin/recipes/default.rb index eac718fc0..3a5be0d61 100644 --- a/cookbooks/munin/recipes/default.rb +++ b/cookbooks/munin/recipes/default.rb @@ -50,7 +50,7 @@ template "/etc/munin/munin-node.conf" do group "root" mode 0644 variables :servers => servers - notifies :restart, resources(:service => "munin-node") + notifies :restart, "service[munin-node]" end remote_directory "/usr/local/share/munin/plugins" do @@ -73,7 +73,7 @@ remote_directory "/etc/munin/plugin-conf.d" do files_group "root" files_mode 0644 purge false - notifies :restart, resources(:service => "munin-node") + notifies :restart, "service[munin-node]" end if Dir.glob("/proc/acpi/thermal_zone/*/temperature").empty? @@ -102,6 +102,8 @@ munin_plugin "entropy" munin_plugin "forks" if node[:kernel][:modules].include?("nf_conntrack") + package "conntrack" + munin_plugin "fw_conntrack" munin_plugin "fw_forwarded_local" else @@ -114,7 +116,7 @@ else end end -if %x{sysctl -n net.ipv4.ip_forward}.chomp == "1" +if File.read("/proc/sys/net/ipv4/ip_forward").chomp == "1" munin_plugin "fw_packets" else munin_plugin "fw_packets" do