X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/2a67fe15cfd49735c38c944cf84481de6d126c6a..adcc3f6e33f061f3bcd8aa6f2870ac0fc772195f:/cookbooks/hardware/recipes/default.rb diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index c5b5ac226..27046a1f7 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -20,6 +20,7 @@ include_recipe "apt" include_recipe "git" include_recipe "munin" +include_recipe "prometheus" include_recipe "sysfs" include_recipe "tools" @@ -450,6 +451,18 @@ if disks.count.positive? conf_variables :disk => disk end end + + template "/etc/prometheus/collectors/smart.devices" do + source "smart.devices.erb" + owner "root" + group "root" + mode "644" + variables :disks => disks + end + + prometheus_collector "smart" do + interval "15m" + end else service "smartd" do action [:stop, :disable]