]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/hardware/templates/default/munin.hddtemp.erb
Update smart related munin plugins to handle all disks
[chef.git] / cookbooks / hardware / templates / default / munin.hddtemp.erb
diff --git a/cookbooks/hardware/templates/default/munin.hddtemp.erb b/cookbooks/hardware/templates/default/munin.hddtemp.erb
new file mode 100644 (file)
index 0000000..330be06
--- /dev/null
@@ -0,0 +1,10 @@
+# DO NOT EDIT - This file is being maintained by Chef
+
+[hddtemp_smartctl]
+env.drives <%= @disks.map { |d| d[:hddtemp] }.sort.join(" ") %>
+<% @disks.sort_by { |d| d[:hddtemp] }.each do |disk| -%>
+<% if disk[:driver] -%>
+env.type_<%= disk[:hddtemp] %> <%= disk[:driver] %>,<%= disk[:id] %>
+<% end -%>
+env.dev_<%= disk[:hddtemp] %> <%= disk[:device] %>
+<% end -%>