Remove smart monitoring for Equallogic RAID devices
[invirt/packages/xvm-munin-config.git] / debian / xvm-munin-host-config.postinst
index ce981db..1f64371 100755 (executable)
@@ -24,6 +24,8 @@ case "$1" in
         adduser munin adm
         
         # So munin can sudo to get to postfix queue info
+        # and smartctl info
+        # and info about running domains
         cat >>/etc/sudoers <<EOF
 ### BEGIN xvm-munin-config
 munin ALL=(postfix) SETENV: NOPASSWD: /etc/munin/plugins/postfix_mailqueue
@@ -34,6 +36,13 @@ EOF
         
         # Install munin plugins that are now configured
         munin-node-configure --suggest --shell | sh
+
+       (cd /etc/munin/plugins;
+           for i in smart_*; do
+               if smartctl -i /dev/${i#smart_} | grep Device | grep EQLOGIC; then
+                   rm -v $i;
+               fi
+           done)
         
         invoke-rc.d munin-node restart
     ;;