]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/munin/recipes/default.rb
Exclude tmpfs, cgmfs and devtmpfs from df and df_inode graphs
[chef.git] / cookbooks / munin / recipes / default.rb
index 36ddd96b44e0997439d5dd7b6ff77d5a0c22b4ad..c01d84130a08469e9f0c32a66e0f475f94bbd28c 100644 (file)
@@ -22,14 +22,16 @@ 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]
   supports :status => true, :restart => true, :reload => true
 end
 
-servers = search(:node, "recipes:munin\\:\\:server")
+servers = search(:node, "recipes:munin\\:\\:server") # ~FC010
 
 servers.each do |server|
   server.interfaces(:role => :external) do |interface|
@@ -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"
@@ -180,6 +187,10 @@ munin_plugin "iostat"
 munin_plugin "iostat_ios"
 
 if Dir.glob("/dev/ipmi*").empty?
+  munin_plugin_conf "ipmi" do
+    action :delete
+  end
+
   munin_plugin "ipmi_fans" do
     action :delete
   end
@@ -193,6 +204,10 @@ if Dir.glob("/dev/ipmi*").empty?
     only_if { node[:lsb][:release].to_f >= 14.04 }
   end
 else
+  munin_plugin_conf "ipmi" do
+    template "ipmi.erb"
+  end
+
   munin_plugin "ipmi_fans" do
     target "ipmi_"
   end