From 12d19de7922e15946167958e327500e0b32d6af7 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 12 Nov 2020 00:14:48 +0000 Subject: [PATCH] Enable prometheus SMART monitoring for Areca controllers --- cookbooks/hardware/recipes/default.rb | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index a9de7a2f4..42d2e9117 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -453,6 +453,18 @@ if disks.count.positive? subscribes :restart, "template[/etc/default/smartmontools]" 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 + # Don't try and do munin monitoring of disks behind # an Areca controller as they only allow one thing to # talk to the controller at a time and smartd will @@ -466,18 +478,6 @@ 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] -- 2.43.2