X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/abd5ecd0198dd98d37c8cc13e457ce996b5b3d88..b767bc1e4b784c6613ff7ad009accdcd33263309:/cookbooks/munin/recipes/default.rb diff --git a/cookbooks/munin/recipes/default.rb b/cookbooks/munin/recipes/default.rb index fb1225c2f..bcd9dd07e 100644 --- a/cookbooks/munin/recipes/default.rb +++ b/cookbooks/munin/recipes/default.rb @@ -22,7 +22,9 @@ include_recipe "networking" package "munin-node" service "munin-node" do - if node[:lsb][:release].to_f >= 14.04 + if node[:lsb][:release].to_f >= 15.10 + provider Chef::Provider::Service::Systemd + elsif node[:lsb][:release].to_f >= 14.04 provider Chef::Provider::Service::Upstart end action [:enable, :start] @@ -49,7 +51,7 @@ template "/etc/munin/munin-node.conf" do source "munin-node.conf.erb" owner "root" group "root" - mode 0644 + mode 0o644 variables :servers => servers notifies :restart, "service[munin-node]" end @@ -58,10 +60,10 @@ remote_directory "/usr/local/share/munin/plugins" do source "plugins" owner "root" group "root" - mode 0755 + mode 0o755 files_owner "root" files_group "root" - files_mode 0755 + files_mode 0o755 purge true end @@ -69,10 +71,10 @@ remote_directory "/etc/munin/plugin-conf.d" do source "plugin-conf.d" owner "root" group "munin" - mode 0750 + mode 0o750 files_owner "root" files_group "root" - files_mode 0644 + files_mode 0o644 purge false notifies :restart, "service[munin-node]" end @@ -96,8 +98,13 @@ else end end +munin_plugin_conf "df" do + template "df.erb" +end + munin_plugin "df" munin_plugin "df_inode" + munin_plugin "diskstats" munin_plugin "entropy" munin_plugin "forks"